Skip to content

Commit da37de1

Browse files
authored
Merge pull request #245 from thc202/itest-help
Test that the help page can be accessed
2 parents 1cf63c1 + d39e7cf commit da37de1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/ContentScript/integrationTests.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ import {
4646
downloadScriptName,
4747
} from './utils';
4848

49+
const testif = (condition: boolean): jest.It => (condition ? it : it.skip);
50+
4951
function integrationTests(
5052
browserName: string,
5153
_HTTPPORT: number,
@@ -842,6 +844,20 @@ function integrationTests(
842844
reportZestStatementClose(3),
843845
]);
844846
});
847+
848+
testif(browserName === BROWSERNAME.FIREFOX)(
849+
'Should open help from popup',
850+
async () => {
851+
// Given / When
852+
const wd = await driver.getWebDriver();
853+
await wd.get(await driver.getPopupURL());
854+
await wd.findElement(By.id('help-btn')).click();
855+
await eventsProcessed();
856+
await wd.switchTo().window((await wd.getAllWindowHandles())[0]);
857+
// Then
858+
expect(await wd.getPageSource()).toContain('Summary');
859+
}
860+
);
845861
}
846862

847863
describe('Chrome Integration Test', () => {

0 commit comments

Comments
 (0)