From 2968185bf07a0e7098fc71f642cf90403ced90a9 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Thu, 19 Dec 2024 18:52:56 +0100 Subject: [PATCH] [Cypress] Remove replaced backlinks tests See QUnit replacement in Ic6aa2c657f047b417e5ae8a3a7049f87568b7963 Bug: T368267 Bug: T381468 Change-Id: I610c1edd137cc4ea7454dd80170869c675f606a0 --- tests/cypress/e2e/tests/backlinks.cy.js | 69 ------------------------- 1 file changed, 69 deletions(-) delete mode 100644 tests/cypress/e2e/tests/backlinks.cy.js diff --git a/tests/cypress/e2e/tests/backlinks.cy.js b/tests/cypress/e2e/tests/backlinks.cy.js deleted file mode 100644 index 3cf49cb58..000000000 --- a/tests/cypress/e2e/tests/backlinks.cy.js +++ /dev/null @@ -1,69 +0,0 @@ -import * as helper from '../utils/functions.helper.js'; - -const title = helper.getTestString( 'CiteTest-title' ); - -describe.skip( 'Cite backlinks test', () => { - before( () => { - helper.visitTitle( '' ); - - const wikiText = 'This is reference #1: This is citation #1 for reference #1 and #2
' + - 'This is reference #2:
' + - 'This is reference #3: This is citation #2
' + - ''; - - helper.editPage( title, wikiText ); - } ); - - beforeEach( () => { - helper.visitTitle( title ); - helper.waitForModuleReady( 'ext.cite.ux-enhancements' ); - } ); - - // T368267 - it( 'hides clickable up arrow by default when there are multiple backlinks', () => { - helper.getCiteMultiBacklink( 1 ).should( 'not.exist' ); - } ); - - it( 'hides clickable up arrow when jumping back from multiple used references', () => { - helper.getReference( 2 ).click(); - helper.getCiteMultiBacklink( 1 ).click(); - // The up-pointing arrow in the reference line is not linked - helper.getCiteMultiBacklink( 1 ).should( 'not.be.visible' ); - } ); - - it( 'shows clickable up arrow when jumping to multiple used references', () => { - helper.getReference( 2 ).click(); - helper.getCiteMultiBacklink( 1 ).should( 'be.visible' ); - - helper.getFragmentFromLink( helper.getCiteMultiBacklink( 1 ) ).then( ( linkFragment ) => { - helper.getReference( 2 ).invoke( 'attr', 'id' ).should( 'eq', linkFragment ); - } ); - } ); - - it( 'highlights backlink in the reference list for the clicked reference when there are multiple used references', () => { - cy.get( '.mw-page-title-main' ).should( 'be.visible' ); - helper.getReference( 2 ).click(); - helper.getCiteSubBacklink( 2 ).should( 'have.class', 'mw-cite-targeted-backlink' ); - } ); - - it( 'uses the last clicked target for the clickable up arrow on multiple used references', () => { - helper.getReference( 2 ).click(); - helper.getReference( 1 ).click(); - - helper.getFragmentFromLink( helper.getCiteMultiBacklink( 1 ) ).then( ( linkFragment ) => { - helper.getReference( 1 ).invoke( 'attr', 'id' ).then( ( referenceId ) => { - expect( linkFragment ).to.equal( referenceId ); - - } ); - } ); - } ); - - it( 'retains backlink visibility for unnamed references when interacting with other references', () => { - helper.getReference( 3 ).click(); - helper.getCiteSingleBacklink( 2 ).click(); - // Doesn' matter what is focused next, just needs to be something else - helper.getReference( 1 ).click(); - // The backlink of the unnamed reference is still visible - helper.getCiteSingleBacklink( 2 ).should( 'be.visible' ); - } ); -} );