mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 23:50:30 +00:00
selenium: Ensure .waitForDisplayed() before .click()
Avoid time outs Error in "Opening and closing the reference drawer.Opening a nested reference" Error: waitUntil condition timed out after 5000ms at Browser.<anonymous> (/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24) at iShouldSeeDrawerWithText (/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:25:10) at Context.<anonymous> (/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:44:3) FAILED in chrome - /tests/selenium/specs/references.js Change-Id: Ia5d493fba4995c1122721b76ae98d6ba60399238
This commit is contained in:
parent
9074976583
commit
791cb1081a
|
@ -103,6 +103,7 @@ const iClickTheBrowserBackButton = () => {
|
|||
|
||||
const iClickTheOverlayCloseButton = () => {
|
||||
waitForPropagation( 2000 );
|
||||
ArticlePageWithOverlay.overlay_close_element.waitForDisplayed();
|
||||
ArticlePageWithOverlay.overlay_close_element.click();
|
||||
};
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ const watch = ( title ) => {
|
|||
// So we run the non-js workflow.
|
||||
const page = new Page();
|
||||
page.openTitle( title, { action: 'watch' } );
|
||||
$( '#mw-content-text button[type="submit"]' ).waitForDisplayed();
|
||||
$( '#mw-content-text button[type="submit"]' ).click();
|
||||
waitForPropagation( 10000 );
|
||||
page.openTitle( title );
|
||||
|
|
|
@ -8,6 +8,7 @@ const iSeeALinkToAboutPage = () => {
|
|||
};
|
||||
|
||||
const iClickOnTheMainNavigationButton = () => {
|
||||
ArticlePage.menu_button_element.waitForDisplayed();
|
||||
ArticlePage.menu_button_element.click();
|
||||
};
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ const iHaveNoNotifications = () => {
|
|||
|
||||
const iClickOnTheNotificationIcon = () => {
|
||||
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.scripts' );
|
||||
ArticlePage.notifications_button_element.waitForDisplayed();
|
||||
ArticlePage.notifications_button_element.click();
|
||||
};
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ const iShouldSeeNotTheReferenceDrawer = () => {
|
|||
};
|
||||
|
||||
const iClickOnAReference = () => {
|
||||
ArticlePage.reference_element.waitForDisplayed();
|
||||
ArticlePage.reference_element.click();
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ const { ArticlePage } = require( '../support/world.js' );
|
|||
const ArticlePageWithOverlay = require( '../support/pages/article_page_with_overlay' );
|
||||
|
||||
const iClickTheSearchIcon = () => {
|
||||
ArticlePage.search_icon_element.waitForDisplayed();
|
||||
ArticlePage.search_icon_element.click();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue