Skip to content

Commit

Permalink
changed test order
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
  • Loading branch information
amsiglan committed May 9, 2024
1 parent ba69d57 commit bc97934
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions cypress/integration/4_findings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,27 @@ describe('Findings', () => {
});
});

it('shows document not found warning when the document is empty', () => {
cy.deleteIndex(indexName);
cy.reload();

// Wait for page to load
cy.waitForPageLoad('findings', {
contains: 'Findings',
});

// filter table to show only sample_detector findings
cy.get(`input[placeholder="Search findings"]`).ospSearch(indexName);

// open Finding details flyout via finding id link. cy.wait essential, timeout insufficient.
cy.getTableFirstRow('[data-test-subj="view-details-icon"]').then(($el) => {
cy.get($el).click({ force: true });
});

// Flyout should show 'Document not found' warning
cy.contains('Document not found');
});

it('...can delete detector', () => {
// Visit Detectors page
cy.visit(`${OPENSEARCH_DASHBOARDS_URL}/detectors`);
Expand Down Expand Up @@ -202,26 +223,5 @@ describe('Findings', () => {
});
});

it('shows document not found warning when the document is empty', () => {
cy.deleteIndex(indexName);
cy.reload();

// Wait for page to load
cy.waitForPageLoad('findings', {
contains: 'Findings',
});

// filter table to show only sample_detector findings
cy.get(`input[placeholder="Search findings"]`).ospSearch(indexName);

// open Finding details flyout via finding id link. cy.wait essential, timeout insufficient.
cy.getTableFirstRow('[data-test-subj="view-details-icon"]').then(($el) => {
cy.get($el).click({ force: true });
});

// Flyout should show 'Document not found' warning
cy.contains('Document not found');
});

after(() => cy.cleanUpTests());
});

0 comments on commit bc97934

Please sign in to comment.