parent
7e196a0353
commit
e5c58751d5
|
@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const savedQueryManagementComponent = getService('savedQueryManagementComponent');
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/89477
|
||||
describe.skip('saved queries saved objects', function describeIndexTests() {
|
||||
describe('saved queries saved objects', function describeIndexTests() {
|
||||
before(async function () {
|
||||
log.debug('load kibana index with default index pattern');
|
||||
await esArchiver.load('discover');
|
||||
|
@ -120,6 +119,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('does not allow saving a query with a non-unique name', async () => {
|
||||
// this check allows this test to run stand alone, also should fix occacional flakiness
|
||||
const savedQueryExists = await savedQueryManagementComponent.savedQueryExist('OkResponse');
|
||||
if (!savedQueryExists) {
|
||||
await savedQueryManagementComponent.saveNewQuery(
|
||||
'OkResponse',
|
||||
'200 responses for .jpg over 24 hours',
|
||||
true,
|
||||
true
|
||||
);
|
||||
await savedQueryManagementComponent.clearCurrentlyLoadedQuery();
|
||||
}
|
||||
await savedQueryManagementComponent.saveNewQueryWithNameError('OkResponse');
|
||||
});
|
||||
|
||||
|
|
|
@ -139,6 +139,13 @@ export function SavedQueryManagementComponentProvider({
|
|||
await testSubjects.click('savedQueryFormSaveButton');
|
||||
}
|
||||
|
||||
async savedQueryExist(title: string) {
|
||||
await this.openSavedQueryManagementComponent();
|
||||
const exists = testSubjects.exists(`~load-saved-query-${title}-button`);
|
||||
await this.closeSavedQueryManagementComponent();
|
||||
return exists;
|
||||
}
|
||||
|
||||
async savedQueryExistOrFail(title: string) {
|
||||
await this.openSavedQueryManagementComponent();
|
||||
await testSubjects.existOrFail(`~load-saved-query-${title}-button`);
|
||||
|
|
Loading…
Reference in a new issue