mediawiki-skins-MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js
Edward Tadros c8ce9608c0 Selenium: Update WebdriverIO to version 5
Bug: T255447
Change-Id: I4cdde3070a6dc4e742ea37a78a17dfd556103dd6
2020-06-30 08:27:05 -07:00

35 lines
890 B
JavaScript

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