Skip to content

Commit bc13d8f

Browse files
[Response Ops] Fix Flaky Stack Alerts Page E2E Test (elastic#192045)
## 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]>
1 parent d968cc0 commit bc13d8f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/stack_alerts_page.ts

+11-8
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
9898
});
9999
});
100100

101-
// FLAKY: https://github.com/elastic/kibana/issues/184882
102-
describe.skip('Loads the page', () => {
101+
describe('Loads the page', () => {
103102
beforeEach(async () => {
104103
await security.testUser.restoreDefaults();
105104
await pageObjects.common.navigateToUrl(
@@ -141,10 +140,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
141140
firstSolutionFilter = quickFilters
142141
.filter((_: number, f: any) => f.attribs['data-test-subj'].endsWith('rule types'))
143142
.first();
144-
expect(firstSolutionFilter).to.not.be(null);
143+
144+
expect(typeof firstSolutionFilter?.attr('data-test-subj')).to.be('string');
145145
});
146146

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

149149
await retry.try(async () => {
150150
const appliedFilters = await pageObjects.triggersActionsUI.getAlertsPageAppliedFilters();
@@ -165,9 +165,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
165165
f.attribs['data-test-subj'].includes('Security rule types')
166166
)
167167
.first();
168-
expect(filter).to.not.be(null);
168+
169+
expect(typeof filter?.attr('data-test-subj')).to.be('string');
169170
});
170-
await testSubjects.click(filter!.attr('data-test-subj'));
171+
172+
await testSubjects.click(filter.attr('data-test-subj'));
171173

172174
await retry.try(async () => {
173175
quickFilters = await pageObjects.triggersActionsUI.getAlertsPageQuickFilters();
@@ -196,10 +198,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
196198
return testSubj.includes('rule types') && !testSubj.includes('Security');
197199
})
198200
.first();
199-
expect(filter).to.not.be(null);
201+
202+
expect(typeof filter?.attr('data-test-subj')).to.be('string');
200203
});
201204

202-
await testSubjects.click(filter!.attr('data-test-subj'));
205+
await testSubjects.click(filter.attr('data-test-subj'));
203206

204207
await retry.try(async () => {
205208
quickFilters = await pageObjects.triggersActionsUI.getAlertsPageQuickFilters();

0 commit comments

Comments
 (0)