From 55a04d3485bbaa2d61167ae24426e256a8c7a953 Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Mon, 28 Oct 2024 14:47:28 +0100 Subject: [PATCH] test: show the content of the new item after clicking a few variants at one item and switching to another item --- tests/cypress/e2e/variants.cy.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/cypress/e2e/variants.cy.js b/tests/cypress/e2e/variants.cy.js index 14769860..226ae181 100644 --- a/tests/cypress/e2e/variants.cy.js +++ b/tests/cypress/e2e/variants.cy.js @@ -97,6 +97,32 @@ const selectors = { .should('have.length', 11) }) + it('Should switch normally to the new item when first selecting a few annotations and then switching the item', () => { + // show the annotation content of the new item + cy + .get(selectors.list) + .children() + .eq(0) + .click() + .next() + .click() + .get(selectors.panel1) + .find('ul[role="tree"]') + .find('ul[role="group"]') + .find('div').contains('182b') + .click() + .checkNoAnnotationsAvailable() + + // show the text content of the new item + .get('#text-content') + .find('div') + .should('have.class', 'body karshuni') + .find('div[id="MD12675N1l4l2l6l4l4"]') + .children() + .eq(0) + .should('have.class', 'hi red') + }) + it('select (unselect) a variant item', () => { // should select a variant item and add its witness after the highlighted text + the highlighted text should become light blue cy