mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-04 19:38:16 +00:00
b411dc50a2
Implemented the test case as described in the ticket. Deviated from ticket's approach for creating a new page by manual creation instead of API, to verify the end-to-end functionality through the interface & ensure the entire proccess works seamlessly. Bug: T353439 Change-Id: I8f863ae0bd8fdb1fb0f1b103d98ba9f2306f3df2
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
export function getReference( num ) {
|
|
return cy.get( `#mw-content-text .reference:nth-of-type(${ num })` );
|
|
|
|
}
|
|
|
|
export function getCiteSubBacklink( num ) {
|
|
return cy.get( `.mw-cite-backlink sup:nth-of-type(${ num }) a` );
|
|
}
|
|
|
|
export function getCiteMultiBacklink( num ) {
|
|
return cy.get( `.references li:nth-of-type(${ num }) .mw-cite-up-arrow-backlink` );
|
|
}
|
|
|
|
export function getCiteSingleBacklink( num ) {
|
|
return cy.get( `.references li:nth-of-type(${ num }) .mw-cite-backlink a` );
|
|
}
|
|
|
|
export function getFragmentFromLink( linkElement ) {
|
|
return linkElement.invoke( 'attr', 'href' ).then( ( href ) => {
|
|
return href.split( '#' )[ 1 ];
|
|
} );
|
|
}
|
|
export function getVEFootnoteMarker( refName, sequenceNumber, index ) {
|
|
return cy.get( `sup.ve-ce-mwReferenceNode#cite_ref-${ refName }_${ sequenceNumber }-${ index - 1 }` );
|
|
}
|
|
|
|
export function getVEReferencePopup() {
|
|
return cy.get( '.oo-ui-popupWidget-popup .ve-ui-mwReferenceContextItem .mw-content-ltr' );
|
|
}
|
|
|
|
export function getVEDialog() {
|
|
return cy.get( '.oo-ui-dialog-content .oo-ui-fieldsetLayout .ve-ui-mwTargetWidget .ve-ce-generated-wrapper' );
|
|
}
|