Skip to content

Commit

Permalink
[Discover] Unskip update data view test (#176508)
Browse files Browse the repository at this point in the history
- Closes #174066

95x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5099

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
  • Loading branch information
jughosta authored Feb 12, 2024
1 parent e93add0 commit 0f31c0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
const PageObjects = getPageObjects(['settings', 'common', 'header']);

// FLAKY: https://github.com/elastic/kibana/issues/174066
describe.skip('creating and deleting default data view', function describeIndexTests() {
describe('creating and deleting default data view', function describeIndexTests() {
before(async function () {
await esArchiver.emptyKibanaIndex();
await esArchiver.loadIfNeeded(
Expand Down
16 changes: 12 additions & 4 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ export class SettingsPageObject extends FtrService {
}

async getSaveDataViewButtonActive() {
await this.retry.try(async () => {
expect(
await this.retry.waitFor('active save button', async () => {
return (
(
await this.find.allByCssSelector(
'[data-test-subj="saveIndexPatternButton"]:not(.euiButton-isDisabled)'
)
).length
).to.be(1);
).length === 1
);
});
return await this.testSubjects.find('saveIndexPatternButton');
}
Expand Down Expand Up @@ -615,7 +615,13 @@ export class SettingsPageObject extends FtrService {
await this.clickEditIndexButton();
await this.header.waitUntilLoadingHasFinished();

let hasSubmittedTheForm = false;

await this.retry.try(async () => {
if (hasSubmittedTheForm && !(await this.testSubjects.exists('indexPatternEditorFlyout'))) {
// the flyout got closed
return;
}
if (dataViewName) {
await this.setNameField(dataViewName);
}
Expand All @@ -627,6 +633,8 @@ export class SettingsPageObject extends FtrService {
const indexPatternSaveBtn = await this.getSaveIndexPatternButton();
await indexPatternSaveBtn.click();

hasSubmittedTheForm = true;

const form = await this.testSubjects.findAll('indexPatternEditorForm');
const hasValidationErrors =
form.length !== 0 && (await form[0].getAttribute('data-validation-error')) === '1';
Expand Down

0 comments on commit 0f31c0b

Please sign in to comment.