Skip to content

Commit

Permalink
[Discover] Unskip update data view test (elastic#176508)
Browse files Browse the repository at this point in the history
- Closes elastic#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

(cherry picked from commit 0f31c0b)
  • Loading branch information
jughosta committed Feb 12, 2024
1 parent c7faa67 commit d14ec63
Showing 1 changed file with 12 additions and 4 deletions.
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 @@ -212,14 +212,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 @@ -584,7 +584,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 @@ -596,6 +602,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 d14ec63

Please sign in to comment.