Skip to content

Commit

Permalink
[Response Ops] Fix Flaky Stack Alerts Page E2E Test (elastic#192045)
Browse files Browse the repository at this point in the history
## Summary
Resolves: elastic#184882

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
JiaweiWu and elasticmachine authored Sep 6, 2024
1 parent d968cc0 commit bc13d8f
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/184882
describe.skip('Loads the page', () => {
describe('Loads the page', () => {
beforeEach(async () => {
await security.testUser.restoreDefaults();
await pageObjects.common.navigateToUrl(
Expand Down Expand Up @@ -141,10 +140,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
firstSolutionFilter = quickFilters
.filter((_: number, f: any) => f.attribs['data-test-subj'].endsWith('rule types'))
.first();
expect(firstSolutionFilter).to.not.be(null);

expect(typeof firstSolutionFilter?.attr('data-test-subj')).to.be('string');
});

await testSubjects.click(firstSolutionFilter!.attr('data-test-subj'));
await testSubjects.click(firstSolutionFilter.attr('data-test-subj'));

await retry.try(async () => {
const appliedFilters = await pageObjects.triggersActionsUI.getAlertsPageAppliedFilters();
Expand All @@ -165,9 +165,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
f.attribs['data-test-subj'].includes('Security rule types')
)
.first();
expect(filter).to.not.be(null);

expect(typeof filter?.attr('data-test-subj')).to.be('string');
});
await testSubjects.click(filter!.attr('data-test-subj'));

await testSubjects.click(filter.attr('data-test-subj'));

await retry.try(async () => {
quickFilters = await pageObjects.triggersActionsUI.getAlertsPageQuickFilters();
Expand Down Expand Up @@ -196,10 +198,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
return testSubj.includes('rule types') && !testSubj.includes('Security');
})
.first();
expect(filter).to.not.be(null);

expect(typeof filter?.attr('data-test-subj')).to.be('string');
});

await testSubjects.click(filter!.attr('data-test-subj'));
await testSubjects.click(filter.attr('data-test-subj'));

await retry.try(async () => {
quickFilters = await pageObjects.triggersActionsUI.getAlertsPageQuickFilters();
Expand Down

0 comments on commit bc13d8f

Please sign in to comment.