Skip to content
Merged
Show file tree
Hide file tree
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 @@ -24,8 +24,11 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {

function createCustomThresholdRule({ ruleName }: { ruleName: string }) {
it('navigates to the rules page', async () => {
await svlCommonNavigation.sidenav.clickLink({ text: 'Alerts' });
await testSubjects.click('manageRulesPageButton');
await retry.try(async () => {
await svlCommonNavigation.sidenav.clickLink({ text: 'Alerts' });
expect(await testSubjects.exists('manageRulesPageButton')).toBeTruthy();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help to wait for the page to be loaded using something like:

await pageObjects.header.waitUntilLoadingHasFinished();

We had a flaky test before which I tried to fix it that way.

Copy link
Copy Markdown
Contributor Author

@cesco-f cesco-f Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the problem there is that the page is not loaded, I think that when clicking on the Alerts side nav button for some reason the navigation does not happen and the test was stuck in looking for the manageRulesPageButton but without trying clicking the Alerts button again.

Also worth mentioning that I was able to reproduce this only starting the server pointing to a Kibana build I previously created, I couldn't reproduce the issue running the server with the local Kibana.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting, thanks for the explanation.

await testSubjects.click('manageRulesPageButton');
});
});

it('should open the rule creation flyout', async () => {
Expand Down Expand Up @@ -58,9 +61,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});
}

// Failing: See https://github.com/elastic/kibana/issues/225800
// Failing: See https://github.com/elastic/kibana/issues/224460
describe.skip('Custom threshold rule - consumers', function () {
describe('Custom threshold rule - consumers', function () {
// custom roles are not yet supported in MKI
this.tags(['skipMKI']);
const ruleIdList: string[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {

function createESQueryRule({ ruleName }: { ruleName: string }) {
it('navigates to the rules page', async () => {
await svlCommonNavigation.sidenav.clickLink({ text: 'Alerts' });
await testSubjects.click('manageRulesPageButton');
await retry.try(async () => {
await svlCommonNavigation.sidenav.clickLink({ text: 'Alerts' });
expect(await testSubjects.exists('manageRulesPageButton')).toBeTruthy();
await testSubjects.click('manageRulesPageButton');
});
});

it('should open the rule creation flyout', async () => {
Expand Down Expand Up @@ -57,8 +60,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});
}

// FLAKY: https://github.com/elastic/kibana/issues/225813
describe.skip('ES Query rule - consumers', function () {
describe('ES Query rule - consumers', function () {
// custom roles are not yet supported in MKI
this.tags(['skipMKI']);
const ruleIdList: string[] = [];
Expand Down