From 7ecb89d1c49f5125b1015bfa896076eba328da98 Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 11 Nov 2022 22:15:39 -0500 Subject: [PATCH] dedup --- .../cypress/e2e/process_instances.cy.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js b/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js index 6999acc2b..09cad2987 100644 --- a/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js +++ b/spiffworkflow-frontend/cypress/e2e/process_instances.cy.js @@ -169,14 +169,13 @@ describe('process-instances', () => { cy.getBySel('process-instance-list-link').click(); cy.assertAtLeastOneItemInPaginatedResults(); + const statusSelect = '#process-instance-status-select'; PROCESS_STATUSES.forEach((processStatus) => { if (!['all', 'waiting'].includes(processStatus)) { - cy.get('#process-instance-status-select').click(); - cy.get('#process-instance-status-select') - .contains(processStatus) - .click(); + cy.get(statusSelect).click(); + cy.get(statusSelect).contains(processStatus).click(); // close the dropdown again - cy.get('#process-instance-status-select').click(); + cy.get(statusSelect).click(); cy.getBySel('filter-button').click(); cy.assertAtLeastOneItemInPaginatedResults(); cy.getBySel(`process-instance-status-${processStatus}`).contains(