diff --git a/cypress/e2e/NewLexemeForm.cy.js b/cypress/e2e/NewLexemeForm.cy.js index 9a5ef20f..b38b2bb1 100644 --- a/cypress/e2e/NewLexemeForm.cy.js +++ b/cypress/e2e/NewLexemeForm.cy.js @@ -66,13 +66,16 @@ describe( 'NewLexemeForm', () => { cy.get( '.wbl-snl-language-lookup input' ) .type( '=Q123', { delay: 0 } ); checkA11y( '.wbl-snl-language-lookup' ); - cy.get( '.wbl-snl-language-lookup .wikit-OptionsMenu__item' ).click(); + cy.get( 'li.cdx-menu-item' ).contains( 'No match was found' ).should( 'not.exist' ); + checkA11y( '.wbl-snl-language-lookup' ); + cy.get( '.wbl-snl-language-lookup .cdx-menu-item' ).click(); cy.wait( '@LanguageCodeRetrieval' ); cy.get( '.wbl-snl-lexical-category-lookup input' ) .type( '=Q456', { delay: 0 } ); - cy.get( '.wbl-snl-lexical-category-lookup .wikit-OptionsMenu__item' ).click(); + cy.get( 'li.cdx-menu-item' ).contains( 'No match was found' ).should( 'not.exist' ); + cy.get( '.wbl-snl-lexical-category-lookup .cdx-menu-item' ).click(); cy.get( '.wbl-snl-form' ) .submit(); @@ -99,17 +102,20 @@ describe( 'NewLexemeForm', () => { cy.get( '.wbl-snl-language-lookup input' ) .type( '=Q123', { delay: 0 } ); - cy.get( '.wbl-snl-language-lookup .wikit-OptionsMenu__item' ).click(); + cy.get( '.wbl-snl-language-lookup li.cdx-menu-item' ).contains( 'No match was found' ).should( 'not.exist' ); + cy.get( '.wbl-snl-language-lookup .cdx-menu-item' ).click(); cy.get( '.wbl-snl-lexical-category-lookup input' ) .type( '=Q456', { delay: 0 } ); - cy.get( '.wbl-snl-lexical-category-lookup .wikit-OptionsMenu__item' ).click(); + cy.get( '.wbl-snl-lexical-category-lookup li.cdx-menu-item' ).contains( 'No match was found' ).should( 'not.exist' ); + cy.get( '.wbl-snl-lexical-category-lookup .cdx-menu-item' ).click(); cy.wait( '@LanguageCodeRetrieval' ); cy.get( '.wbl-snl-spelling-variant-lookup input' ) .type( 'en-ca', { delay: 0 } ); - cy.get( '.wbl-snl-spelling-variant-lookup .wikit-OptionsMenu__item' ).click(); + cy.get( '.wbl-snl-spelling-variant-lookup li.cdx-menu-item' ).contains( 'No match was found' ).should( 'not.exist' ); + cy.get( '.wbl-snl-spelling-variant-lookup .cdx-menu-item' ).click(); cy.get( '.wbl-snl-form' ) .submit(); @@ -151,12 +157,12 @@ describe( 'NewLexemeForm', () => { cy.get( '.wbl-snl-language-lookup input' ).click(); - cy.get( '.wbl-snl-language-lookup .wikit-OptionsMenu__item__label' ) + cy.get( '.wbl-snl-language-lookup .cdx-menu-item__text__label' ) .then( ( $element ) => { expect( $element ).to.have.text( 'test language' ); } ); - cy.get( '.wbl-snl-language-lookup .wikit-OptionsMenu__item__description' ) + cy.get( '.wbl-snl-language-lookup .cdx-menu-item__text__description' ) .then( ( $element ) => { expect( $element ).to.have.text( 'test language description' ); } ); diff --git a/src/components/ItemLookup.vue b/src/components/ItemLookup.vue index ec67129d..b087ba5c 100644 --- a/src/components/ItemLookup.vue +++ b/src/components/ItemLookup.vue @@ -1,10 +1,20 @@