mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 08:31:23 -05:00
integration tests use waitUntilVisible in more places
This commit is contained in:
parent
ec60e53be2
commit
d899d72ef4
2 changed files with 5 additions and 3 deletions
|
@ -3,9 +3,10 @@
|
|||
const SeleniumHelper = require('./selenium-helpers.js');
|
||||
|
||||
const {
|
||||
findByXpath,
|
||||
buildDriver,
|
||||
clickXpath,
|
||||
buildDriver
|
||||
findByXpath,
|
||||
waitUntilVisible
|
||||
} = new SeleniumHelper();
|
||||
|
||||
let remote = process.env.SMOKE_REMOTE || false;
|
||||
|
@ -31,7 +32,7 @@ describe('www-integration project-page signed out', () => {
|
|||
beforeEach(async () => {
|
||||
await driver.get(projectUrl);
|
||||
let gfOverlay = await findByXpath('//div[@class="stage-wrapper_stage-wrapper_2bejr box_box_2jjDp"]');
|
||||
await gfOverlay.isDisplayed();
|
||||
await waitUntilVisible(gfOverlay, driver);
|
||||
});
|
||||
|
||||
afterAll(async () => await driver.quit());
|
||||
|
|
|
@ -113,6 +113,7 @@ describe('www-integration sign-in-and-out', () => {
|
|||
|
||||
// find error
|
||||
let error = await findByXpath('//form[@id="login"]//div[@class="error"]');
|
||||
await waitUntilVisible(error, driver);
|
||||
let errorText = await error.getText();
|
||||
await expect(errorText).toEqual('This field is required.');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue