mediawiki-skins-MinervaNeue/tests/selenium/specs/references.js
jdlrobson 065b6e52b2 QA: Restore nested reference test
References clicks should now apply to the `sup` element not `a`
as the `a` element can contain spans.

Depends-On: I0d5bb398e99465ade357743dd3ff34ae551243c5
Bug: T258096
Change-Id: I5d8cae5f465a86282796b3fdc6bc658f6c836432
2020-07-28 21:53:19 +00:00

47 lines
1.2 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();
iClickOnTheMask();
iShouldSeeNotTheReferenceDrawer();
} );
it( 'Opening a nested reference', () => {
iAmOnPage( 'Selenium References test page' );
iClickOnAReference();
iClickOnANestedReference();
iShouldSeeDrawerWithText( 'This is a nested ref.' );
} );
} );