attempted to fix some cypress tests

This commit is contained in:
jasquat 2023-03-23 17:34:08 -04:00
parent af97fee56c
commit 097a35cd45
No known key found for this signature in database
2 changed files with 8 additions and 1 deletions

View File

@ -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);
}
});

View File

@ -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(/\b34 of \d+/);
cy.get('.cds--pagination__button--backward').click();
cy.contains(/\b12 of \d+/);