mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
55419f9bcc
Assert the drawer is visible before clicking it. Bug: T266704 Change-Id: Iec1d2a2c0a4b34509f4b73ed87ccc63eeecad671
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
const {
|
|
pageExistsWithText,
|
|
iAmUsingTheMobileSite,
|
|
iAmOnPage
|
|
} = require( '../features/step_definitions/common_steps' ),
|
|
{
|
|
iClickOnAReference,
|
|
iClickOnTheMask,
|
|
iShouldSeeNotTheReferenceDrawer,
|
|
iClickOnANestedReference,
|
|
iShouldSeeDrawerWithText
|
|
} = require( '../features/step_definitions/reference_steps' );
|
|
|
|
// @chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant
|
|
describe( 'Opening and closing the reference drawer', () => {
|
|
|
|
before( () => {
|
|
pageExistsWithText( 'Selenium References test page', `MinervaNeue is a MediaWiki skin.
|
|
{{#tag:ref|This is a note.<ref>This is a nested ref.</ref>|group=note}}
|
|
==Notes==
|
|
<references group=note />
|
|
==References==
|
|
<references/>
|
|
` );
|
|
} );
|
|
|
|
beforeEach( () => {
|
|
iAmUsingTheMobileSite();
|
|
} );
|
|
|
|
it( 'Opening a reference', () => {
|
|
iAmOnPage( 'Selenium References test page' );
|
|
iClickOnAReference();
|
|
iShouldSeeDrawerWithText( 'This is a note.' );
|
|
iClickOnTheMask();
|
|
iShouldSeeNotTheReferenceDrawer();
|
|
} );
|
|
|
|
it( 'Opening a nested reference', () => {
|
|
iAmOnPage( 'Selenium References test page' );
|
|
iClickOnAReference();
|
|
iShouldSeeDrawerWithText( 'This is a note.' );
|
|
iClickOnANestedReference();
|
|
iShouldSeeDrawerWithText( 'This is a nested ref.' );
|
|
} );
|
|
} );
|