Skip to content

Commit

Permalink
use should instead of then, as should is automatically retried
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Jan 8, 2024
1 parent ce2227a commit 26450a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/Incidents/incidents.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Manage Open Incidents', { failFast: { enabled: true } }, () => {

it('Select all incidents', () => {
selectAllIncidents();
cy.get('.selected-incidents-badge').then(($el) => {
cy.get('.selected-incidents-badge').should(($el) => {
const text = $el.text();
const incidentNumbers = text.split(' ')[0].split('/');
expect(incidentNumbers[0]).to.equal(incidentNumbers[1]);
Expand All @@ -59,7 +59,7 @@ describe('Manage Open Incidents', { failFast: { enabled: true } }, () => {
// Shift-select multiple incidents
selectIncident(0);
selectIncident(4, true);
cy.get('.selected-incidents-badge').then(($el) => {
cy.get('.selected-incidents-badge').should(($el) => {
const text = $el.text();
const incidentNumbers = text.split(' ')[0].split('/');
expect(incidentNumbers[0]).to.equal('5');
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const selectAllIncidents = () => {
};

export const checkNoIncidentsSelected = () => {
cy.get('.selected-incidents-badge').then(($el) => {
cy.get('.selected-incidents-badge').should(($el) => {
const text = $el.text();
const incidentNumbers = text.split(' ')[0].split('/');
expect(incidentNumbers[0]).to.equal('0');
Expand Down

0 comments on commit 26450a7

Please sign in to comment.