Skip to content

Commit

Permalink
cypress: change highlight test
Browse files Browse the repository at this point in the history
Remove bit of test that checks whether the first hit of the text
search term is in highlighted class, as it actually gets a
MuiChip-label pill.
  • Loading branch information
abhidg committed Apr 28, 2022
1 parent a4a738e commit 2201142
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,15 @@ describe('View case', function () {
cy.visit('/cases');
cy.wait('@getCases');

cy.get('input[id="search-field"]').type('Andorrean{enter}');
cy.get('input[id="search-field"]').type('example{enter}');

cy.get('body').then(($body) => {
if ($body.find('.iubenda-cs-accept-btn').length) {
cy.get('.iubenda-cs-accept-btn').click();
}
});

cy.contains('France').click();
cy.contains('Andorrean')
.should('have.attr', 'class')
.and('equal', 'highlighted');
cy.get('.highlighted').children('mark').contains('Andorrean');
cy.get('.highlighted').children('mark').contains('example');
});

// View of a full case is covered in the curator test.
Expand Down

0 comments on commit 2201142

Please sign in to comment.