Skip to content

Commit

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

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 5db8065)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
  • Loading branch information
opensearch-trigger-bot[bot] and AWSHurneyt authored Nov 27, 2023
1 parent a0be908 commit e08e137
Showing 1 changed file with 7 additions and 2 deletions.
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 e08e137

Please sign in to comment.