2020-06-02 21:21:44 +00:00
|
|
|
'use strict';
|
|
|
|
|
2019-12-17 19:31:52 +00:00
|
|
|
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();
|
|
|
|
iClickOnTheMask();
|
|
|
|
iShouldSeeNotTheReferenceDrawer();
|
|
|
|
} );
|
|
|
|
|
2020-07-28 19:44:28 +00:00
|
|
|
it( 'Opening a nested reference', () => {
|
2019-12-17 19:31:52 +00:00
|
|
|
iAmOnPage( 'Selenium References test page' );
|
|
|
|
iClickOnAReference();
|
|
|
|
iClickOnANestedReference();
|
|
|
|
iShouldSeeDrawerWithText( 'This is a nested ref.' );
|
|
|
|
} );
|
|
|
|
} );
|