2019-12-17 19:31:52 +00:00
|
|
|
const { ArticlePage } = require( './../support/world' );
|
|
|
|
|
|
|
|
const iClickOnTheMask = () => {
|
2020-01-13 23:32:05 +00:00
|
|
|
ArticlePage.drawer_mask_element.waitForVisible();
|
|
|
|
ArticlePage.drawer_mask_element.click();
|
2019-12-17 19:31:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
};
|