From 3262f3919e82202bfba33420674e93971843cdeb Mon Sep 17 00:00:00 2001 From: Oluwatobi Bamidele Date: Thu, 25 Jul 2024 14:56:20 +0100 Subject: [PATCH] fix: ensured the last new element is what's select each time --- cypress/e2e/addNode/addNodeType.cy.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/addNode/addNodeType.cy.ts b/cypress/e2e/addNode/addNodeType.cy.ts index e2255db12..fa699d896 100644 --- a/cypress/e2e/addNode/addNodeType.cy.ts +++ b/cypress/e2e/addNode/addNodeType.cy.ts @@ -28,10 +28,11 @@ describe('Add Node Type Via BluePrint', () => { cy.get('[data-testid="add-attribute-btn"]').click() cy.wait(500) - cy.get('[data-testid="cy-item-name-1"]').type('age') - cy.get('[data-testid="cy-item-select-1"]').click() + cy.get('[data-testid^="cy-item-name-"]').last().type('age') + + cy.get('[data-testid^="cy-item-select-"]').last().click() cy.contains('number').click() - cy.get('[data-testid="cy-item-1"]').click() + cy.get('[data-testid^="cy-item-"]').last().click() cy.wait(200) cy.contains('Confirm').click()