Skip to content

Commit

Permalink
updated chrome options type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodek committed Jul 2, 2024
1 parent c959bcb commit 4431d83
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/WrapperApp/components/NavDrawer/NavDrawer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('NavDrawer component', () => {
beforeAll(async () => {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(new chrome.Options().addArguments('--headless'))
.setChromeOptions(new chrome.Options().addArguments('--headless') as chrome.Options)
.build();
}, 30000);
//test timeouts are set to 30000 ms, as default timeout of 5000 ms is not enough for the test to pass in github actions
Expand Down
7 changes: 5 additions & 2 deletions src/__tests__/FlukaConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe('Fluka Converter', () => {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(
new chrome.Options().addArguments('--window-size=1920,1080', '--headless')
new chrome.Options().addArguments(
'--window-size=1920,1080',
'--headless'
) as chrome.Options
)
.build();
}, 30_000);
Expand Down Expand Up @@ -93,7 +96,7 @@ describe('Fluka Converter', () => {

// select SHIELDHIT subsection
examplesPanel.findElement(By.xpath("//button[contains(text(),'shieldhit')]")).click();

//find the list of examples
const examplesList = await examplesPanel.findElement(By.id('Examples list'));

Expand Down
5 changes: 4 additions & 1 deletion src/__tests__/ShieldhitConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ describe('ShieldhitConverter', () => {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(
new chrome.Options().addArguments('--window-size=1920,1080', '--headless')
new chrome.Options().addArguments(
'--window-size=1920,1080',
'--headless'
) as chrome.Options
)
.build();
}, 30_000);
Expand Down
7 changes: 5 additions & 2 deletions src/__tests__/TopasConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe('TopasConverter', () => {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(
new chrome.Options().addArguments('--window-size=1920,1080', '--headless')
new chrome.Options().addArguments(
'--window-size=1920,1080',
'--headless'
) as chrome.Options
)
.build();
}, 30_000);
Expand All @@ -32,7 +35,7 @@ describe('TopasConverter', () => {
5_000
)
).toBeTruthy();

//find the "Editor" button on the left menu and assure it is already selected
const editorButton = await driver.findElement(By.xpath("//div[@aria-label = 'Editor']"));

Expand Down

0 comments on commit 4431d83

Please sign in to comment.