Skip to content

Commit

Permalink
Enable Test Isolation for query.spec.js
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Dec 6, 2023
1 parent 920ce28 commit 00be3fe
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions cypress/e2e/Query/query.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,14 @@ import {
registerLocale('en-GB', gb);
moment.locale('en-GB');

describe('Query Incidents', { failFast: { enabled: true } }, () => {
before(() => {
describe('Query Incidents', { failFast: { enabled: true }, testIsolation: true }, () => {
beforeEach(() => {
acceptDisclaimer();
manageIncidentTableColumns('remove', ['latest_note']);
manageIncidentTableColumns('add', ['urgency', 'teams', 'escalation_policy']);
// priorityNames.forEach((currentPriority) => {
// activateButton(`query-priority-${currentPriority}-button`);
// });
waitForIncidentTable();
});

beforeEach(() => {
if (cy.state('test').currentRetry() > 1) {
acceptDisclaimer();
manageIncidentTableColumns('remove', ['latest_note']);
manageIncidentTableColumns('add', ['urgency', 'teams', 'escalation_policy']);
}
// priorityNames.forEach((currentPriority) => {
// activateButton(`query-priority-${currentPriority}-button`);
// });
});

it('Query for incidents within T-1 since date', () => {
// Limit dataset to high-urgency triggered, ackd and resolved incidents
// activateButton('query-status-resolved-button');
Expand Down Expand Up @@ -226,27 +212,23 @@ describe('Query Incidents', { failFast: { enabled: true } }, () => {
cy.get('#query-user-select').click().type('{del}{del}{del}');
});

it('Sort incident column "#" by ascending order', () => {
it('Sort incident columns', () => {
cy.get('[data-column-name="#"]')
.click()
.then(($el) => {
const cls = $el.attr('class');
expect(cls).to.contain('th-sorted');
cy.wrap($el).contains('# ▲');
});
});

it('Sort incident column "#" by descending order', () => {
cy.get('[data-column-name="#"]')
.click()
.then(($el) => {
const cls = $el.attr('class');
expect(cls).to.contain('th-sorted');
cy.wrap($el).contains('# ▼');
});
});

it('Clear sort on incident column "#"', () => {
cy.get('[data-column-name="#"]')
.click()
.then(($el) => {
Expand Down

0 comments on commit 00be3fe

Please sign in to comment.