Skip to content

Commit

Permalink
[Discover] Unskip search alert tests (#190519)
Browse files Browse the repository at this point in the history
- Closes #190090
  • Loading branch information
jughosta committed Aug 20, 2024
1 parent 854f727 commit e66098a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
const es = getService('es');
const monacoEditor = getService('monacoEditor');
const PageObjects = getPageObjects(['settings', 'common', 'header', 'discover', 'timePicker']);
const PageObjects = getPageObjects([
'settings',
'common',
'header',
'discover',
'timePicker',
'unifiedFieldList',
]);
const deployment = getService('deployment');
const dataGrid = getService('dataGrid');
const browser = getService('browser');
Expand Down Expand Up @@ -325,8 +332,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(await titleElem.getAttribute('value')).to.equal(dataView);
};

// FLAKY: https://github.com/elastic/kibana/issues/190090
describe.skip('Search source Alert', () => {
describe('Search source Alert', () => {
before(async () => {
await security.testUser.setRoles(['discover_alert']);

Expand Down Expand Up @@ -527,7 +533,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

await PageObjects.timePicker.setCommonlyUsedTime('Last_15 minutes');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.addRuntimeField('runtime-message-field', `emit('mock-message')`);
await retry.try(async () => {
expect(await PageObjects.unifiedFieldList.getAllFieldNames()).to.contain(
'runtime-message-field'
);
});

// create an alert
await openDiscoverAlertFlyout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'discover',
'timePicker',
'dashboard',
'unifiedFieldList',
]);
const deployment = getService('deployment');
const dataGrid = getService('dataGrid');
Expand Down Expand Up @@ -364,7 +365,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(await titleElem.getAttribute('value')).to.equal(dataView);
};

describe('Search source Alert', function () {
describe('Search source Alert', () => {
before(async () => {
await security.testUser.setRoles(['discover_alert']);
await PageObjects.svlCommonPage.loginAsAdmin();
Expand Down Expand Up @@ -562,7 +563,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

await PageObjects.timePicker.setCommonlyUsedTime('Last_15 minutes');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.addRuntimeField('runtime-message-field', `emit('mock-message')`);
await retry.try(async () => {
expect(await PageObjects.unifiedFieldList.getAllFieldNames()).to.contain(
'runtime-message-field'
);
});

// create an alert
await openDiscoverAlertFlyout();
Expand Down

0 comments on commit e66098a

Please sign in to comment.