From 097a35cd4586c09513e0b4e187b72a59741b1131 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 23 Mar 2023 17:34:08 -0400 Subject: [PATCH] attempted to fix some cypress tests --- spiffworkflow-frontend/cypress/e2e/process_instances.cy.js | 5 ++++- spiffworkflow-frontend/cypress/support/commands.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js b/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js index 64e0418a..b1b87c46 100644 --- a/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js +++ b/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js @@ -162,7 +162,7 @@ describe('process-instances', () => { cy.getBySel('process-instance-log-list-link').click(); cy.getBySel('process-instance-log-detailed').click(); cy.contains('process_model_one'); - cy.contains('State change to COMPLETED'); + cy.contains('task_completed'); cy.basicPaginationTest(); }); @@ -184,9 +184,12 @@ describe('process-instances', () => { cy.getBySel(`process-instance-status-${processStatus}`); // there should really only be one, but in CI there are sometimes more cy.get('div[aria-label="Clear all selected items"]:first').click(); + cy.wait(1000); cy.get('div[aria-label="Clear all selected items"]').should( 'not.exist' ); + // it seems like the state isn't clearing as quickly as the clear label so let's wait + cy.wait(1000); } }); diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 404c9af7..f2d96939 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -154,6 +154,10 @@ Cypress.Commands.add( .then(($element) => { const oldId = $element.text().trim(); cy.get('.cds--pagination__button--forward').click(); + cy.contains( + `[data-qa=${dataQaTagToUseToEnsureTableHasLoaded}]`, + oldId + ).should('not.exist'); cy.contains(/\b3–4 of \d+/); cy.get('.cds--pagination__button--backward').click(); cy.contains(/\b1–2 of \d+/);