Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,12 @@ describe('Alerts', () => {

it('can be acknowledged via row button', () => {
// Filter the table to show only "Active" alerts
cy.get('[data-text="Status"]').click({ force: true });
cy.get('[class="euiFilterSelect__items"]').within(() => {
cy.contains('Active').click({ force: true });
});
cy.get('[data-text="Status"]').should('be.visible').click({ force: true });
cy.get('[class="euiFilterSelect__items"]')
.should('be.visible')
.within(() => {
cy.contains('Active').click({ force: true });
});

cy.get('tbody > tr')
.filter(`:contains(${alertName})`)
Expand All @@ -386,16 +388,24 @@ describe('Alerts', () => {
cy.get('[aria-label="Acknowledge"]').click({ force: true });
});

// Wait for acknowledge to go through
cy.wait(2000);
cy.get('tbody > tr')
.filter(`:contains(${alertName})`)
.should('have.length', 1);

// Filter the table to show only "Acknowledged" alerts
cy.get('[class="euiFilterSelect__items"]').within(() => {
cy.contains('Active').click({ force: true });
cy.contains('Acknowledged').click({ force: true });
});
cy.wait(2000);
cy.get('[data-text="Status"]').should('be.visible').click({ force: true });
cy.get('[class="euiFilterSelect__items"]')
.should('be.visible')
.within(() => {
cy.contains('Active').click({ force: true });
cy.contains('Acknowledged').click({ force: true });
});

// Wait for filter to apply
cy.wait(2000);
// Confirm there are now 3 "Acknowledged" alerts
cy.get('tbody > tr')
.filter(`:contains(${alertName})`)
Expand Down
Loading