mediawiki-skins-MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js
Ed Sanders a32999e641 build: Update eslint-config-wikimedia to 0.16.0
Change-Id: Icabf6e065ed5685207731262db72faf848a0a04d
2020-06-04 08:39:32 -07:00

35 lines
882 B
JavaScript

'use strict';
const { ArticlePage } = require( './../support/world' );
const iClickOnTheMask = () => {
ArticlePage.drawer_mask_element.waitForVisible();
ArticlePage.drawer_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
};