Skip to content

Commit

Permalink
[8.12] [Discover] Unskip update data view test (#176508) (#176740)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.12`:
- [[Discover] Unskip update data view test
(#176508)](#176508)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-12T18:21:00Z","message":"[Discover]
Unskip update data view test (#176508)\n\n- Closes
https://github.com/elastic/kibana/issues/174066\r\n\r\n95x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5099\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0f31c0bff36a375f47aefc41d604551e56fac181","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.13.0"],"title":"[Discover]
Unskip update data view
test","number":176508,"url":"https://github.com/elastic/kibana/pull/176508","mergeCommit":{"message":"[Discover]
Unskip update data view test (#176508)\n\n- Closes
https://github.com/elastic/kibana/issues/174066\r\n\r\n95x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5099\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0f31c0bff36a375f47aefc41d604551e56fac181"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176508","number":176508,"mergeCommit":{"message":"[Discover]
Unskip update data view test (#176508)\n\n- Closes
https://github.com/elastic/kibana/issues/174066\r\n\r\n95x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5099\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0f31c0bff36a375f47aefc41d604551e56fac181"}}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <[email protected]>
  • Loading branch information
kibanamachine and jughosta authored Feb 12, 2024
1 parent bea3819 commit b3354bc
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 b3354bc

Please sign in to comment.