selenium: Toolbar should open structure options menu

Bug: T296187
Change-Id: Ia8abb12c911174c2c6778b5aff4272a9b14fbbe0
This commit is contained in:
Esther Akinloose 2022-12-02 22:38:34 +00:00
parent 71dcfaebde
commit 4df16fac5b
2 changed files with 8 additions and 0 deletions

View file

@ -3,6 +3,7 @@ const Page = require( 'wdio-mediawiki/Page' );
class EditPage extends Page {
get bulletListOption() { return $( '.oo-ui-tool-name-bullet' ); }
get content() { return $( '#content' ); }
get edited() { return $( '*=Your edit was saved' ); }
get helpPopup() { return $( '.ve-ui-mwHelpPopupTool-items' ); }
@ -20,6 +21,7 @@ class EditPage extends Page {
get savePageDots() { return $( '.ve-ui-toolbar-saveButton' ); }
get specialCharacterElement() { return $( '.oo-ui-tool-name-specialCharacter' ); }
get specialCharacterMenu() { return $( '.oo-ui-menuLayout' ); }
get structureOptionsElement() { return $( '.ve-ui-toolbar-group-structure' ); }
get switchEditorElement() { return $( '.ve-ui-toolbar-group-editMode' ); }
get toolbar() { return $( '.ve-init-mw-desktopArticleTarget-toolbar-open' ); }
get veBodyContent() { return $( '.mw-body-content.ve-ui-surface' ); }

View file

@ -55,4 +55,10 @@ describe( 'Toolbar', function () {
assert( await EditPage.insertMenu.isDisplayed() );
} );
it( 'should open structure options menu', async function () {
await EditPage.structureOptionsElement.click();
assert( await EditPage.bulletListOption.isDisplayed() );
} );
} );