From 791fcb0131006603510d63e714c41b5c6ba0e9f3 Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Wed, 6 Nov 2024 16:54:26 +0100 Subject: [PATCH] test: add test for updating variants list according to witnesses selection when disabling single select mode --- tests/cypress/e2e/variants.cy.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/cypress/e2e/variants.cy.js b/tests/cypress/e2e/variants.cy.js index abe2f645..50d82e3d 100644 --- a/tests/cypress/e2e/variants.cy.js +++ b/tests/cypress/e2e/variants.cy.js @@ -554,9 +554,31 @@ const selectors = { cy .get(selectors.list) .should('be.visible') - .children() - .should("have.length", 13) // we have 11 variant items as in the normal mode - no single select mode + .find('div[data-annotation-id]') + .should("have.length", 11) // we have 11 variant items as in the normal mode - no single select mode }) }) + + it('should show only the variants items according to witnesses drop down selection after disabling single select mode', () => { + cy.get(selectors.list) + .clickWitnessItem('4 Witnesses selected', 'Cod. Arab. 236') + .parent().parent() + .contains('DFM 614').click() + + cy.get(selectors.panel4) + .contains('2 Witnesses selected') + .click({force: true}) + + cy + .clickSingleSelectButton() + cy + .clickSingleSelectButton() + cy + .get(selectors.list) + .should('be.visible') + .find('div[data-annotation-id]') + .should("have.length", 6) + + }) }) }); \ No newline at end of file