2020-06-02 21:21:44 +00:00
|
|
|
'use strict';
|
|
|
|
|
2019-12-17 19:31:52 +00:00
|
|
|
const { ArticlePage } = require( './../support/world' );
|
|
|
|
|
|
|
|
const iClickOnTheMask = () => {
|
2020-06-15 14:54:05 +00:00
|
|
|
ArticlePage.drawer_mask_element.waitForDisplayed();
|
2020-01-13 23:32:05 +00:00
|
|
|
ArticlePage.drawer_mask_element.click();
|
2019-12-17 19:31:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const iShouldSeeNotTheReferenceDrawer = () => {
|
2020-06-15 14:54:05 +00:00
|
|
|
browser.waitUntil( () => !ArticlePage.drawer_element.isDisplayed() );
|
2019-12-17 19:31:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const iClickOnAReference = () => {
|
|
|
|
ArticlePage.reference_element.click();
|
|
|
|
};
|
|
|
|
|
|
|
|
const iClickOnANestedReference = () => {
|
2020-06-15 14:54:05 +00:00
|
|
|
ArticlePage.drawer_reference_element.waitForDisplayed();
|
2019-12-17 19:31:52 +00:00
|
|
|
ArticlePage.drawer_reference_element.click();
|
|
|
|
};
|
|
|
|
|
|
|
|
const iShouldSeeDrawerWithText = ( text ) => {
|
2020-06-15 14:54:05 +00:00
|
|
|
ArticlePage.drawer_element.waitForDisplayed();
|
2021-11-09 14:48:40 +00:00
|
|
|
browser.waitUntil( () => ArticlePage.drawer_element.getText().includes( text ) );
|
2019-12-17 19:31:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
iClickOnAReference,
|
|
|
|
iClickOnTheMask,
|
|
|
|
iShouldSeeNotTheReferenceDrawer,
|
|
|
|
iClickOnANestedReference,
|
|
|
|
iShouldSeeDrawerWithText
|
|
|
|
};
|