mediawiki-skins-MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js
jdlrobson 428047087a QA: Move reference browser test to Node.js suite
Ruby is not supported. The test often flakes.

Change-Id: I883cf283ea5307cdc0daebf41f20928d1adb309a
2019-12-18 00:40:27 +00:00

33 lines
853 B
JavaScript

const { ArticlePage } = require( './../support/world' );
const iClickOnTheMask = () => {
ArticlePage.mask_element.waitForVisible();
ArticlePage.mask_element.click();
};
const iShouldSeeNotTheReferenceDrawer = () => {
browser.waitUntil( () => !ArticlePage.drawer_element.isVisible() );
};
const iClickOnAReference = () => {
ArticlePage.reference_element.click();
};
const iClickOnANestedReference = () => {
ArticlePage.drawer_reference_element.waitForVisible();
ArticlePage.drawer_reference_element.click();
};
const iShouldSeeDrawerWithText = ( text ) => {
ArticlePage.drawer_element.waitForVisible();
browser.waitUntil( () => ArticlePage.drawer_element.getText().indexOf( text ) > -1 );
};
module.exports = {
iClickOnAReference,
iClickOnTheMask,
iShouldSeeNotTheReferenceDrawer,
iClickOnANestedReference,
iShouldSeeDrawerWithText
};