From 9fc0ecb89b38243d026a8cc9afa03c830efcc379 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Wed, 11 Dec 2024 17:22:42 +0200 Subject: [PATCH] test(editor): Update `28-debug` e2e tests for new canvas (no-changelog) (#12151) --- cypress/e2e/28-debug.cy.ts | 40 ++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/28-debug.cy.ts b/cypress/e2e/28-debug.cy.ts index b5159951a7..9149e2e478 100644 --- a/cypress/e2e/28-debug.cy.ts +++ b/cypress/e2e/28-debug.cy.ts @@ -87,11 +87,28 @@ describe('Debug', () => { confirmDialog.get('.btn--confirm').click(); cy.url().should('include', '/debug'); - workflowPage.getters.canvasNodes().first().should('have.descendants', '.node-pin-data-icon'); - workflowPage.getters - .canvasNodes() - .not(':first') - .should('not.have.descendants', '.node-pin-data-icon'); + cy.ifCanvasVersion( + () => { + workflowPage.getters + .canvasNodes() + .first() + .should('have.descendants', '.node-pin-data-icon'); + workflowPage.getters + .canvasNodes() + .not(':first') + .should('not.have.descendants', '.node-pin-data-icon'); + }, + () => { + workflowPage.getters + .canvasNodes() + .first() + .should('have.descendants', '[data-test-id="canvas-node-status-pinned"]'); + workflowPage.getters + .canvasNodes() + .not(':first') + .should('not.have.descendants', '[data-test-id="canvas-node-status-pinned"]'); + }, + ); cy.reload(true); cy.wait(['@getExecution']); @@ -114,7 +131,18 @@ describe('Debug', () => { confirmDialog.get('.btn--confirm').click(); cy.url().should('include', '/debug'); - workflowPage.getters.canvasNodes().last().find('.node-info-icon').should('be.empty'); + cy.ifCanvasVersion( + () => { + workflowPage.getters.canvasNodes().last().find('.node-info-icon').should('be.empty'); + }, + () => { + workflowPage.getters + .canvasNodes() + .last() + .find('[class*="statusIcons"]') + .should('not.exist'); + }, + ); workflowPage.getters.canvasNodes().first().dblclick(); ndv.actions.unPinData();