Skip to content

Commit

Permalink
[8.9] [FTR] unskip tsvb time series tests for Chrome (#163510) (#163555)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.9`:
- [[FTR] unskip tsvb time series tests for Chrome
(#163510)](#163510)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-10T07:17:12Z","message":"[FTR]
unskip tsvb time series tests for Chrome (#163510)\n\n##
Summary\r\n\r\nRelated to #162995\r\n\r\nThis PR unskip TSVB tests for
Chrome browser since it is proved to
be\r\nstable\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2836\r\n100x
passed\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835\r\n100x
passed\r\nOn Firefox the flakiness is related to Terms 2nd aggregation
field\r\nsometimes is not selected. I tested it manually in Firefox 116
and was\r\nable to set fields, though I have a feeling that values are
not always\r\nselected on click in the drop-down. But I didn't see any
errors in\r\nconsole.\r\n\r\nI also returned back retry for dropdown
selection I removed in #161202\r\nthough flaky-test-runner proves there
is no need. Let's have just to\r\nkeep logic as before my
PR.","sha":"072ad967fc04e2b79bf75fd9e6618f3bf0e46b9f","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.10.0","v8.9.1"],"number":163510,"url":"https://github.com/elastic/kibana/pull/163510","mergeCommit":{"message":"[FTR]
unskip tsvb time series tests for Chrome (#163510)\n\n##
Summary\r\n\r\nRelated to #162995\r\n\r\nThis PR unskip TSVB tests for
Chrome browser since it is proved to
be\r\nstable\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2836\r\n100x
passed\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835\r\n100x
passed\r\nOn Firefox the flakiness is related to Terms 2nd aggregation
field\r\nsometimes is not selected. I tested it manually in Firefox 116
and was\r\nable to set fields, though I have a feeling that values are
not always\r\nselected on click in the drop-down. But I didn't see any
errors in\r\nconsole.\r\n\r\nI also returned back retry for dropdown
selection I removed in #161202\r\nthough flaky-test-runner proves there
is no need. Let's have just to\r\nkeep logic as before my
PR.","sha":"072ad967fc04e2b79bf75fd9e6618f3bf0e46b9f"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163510","number":163510,"mergeCommit":{"message":"[FTR]
unskip tsvb time series tests for Chrome (#163510)\n\n##
Summary\r\n\r\nRelated to #162995\r\n\r\nThis PR unskip TSVB tests for
Chrome browser since it is proved to
be\r\nstable\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2836\r\n100x
passed\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835\r\n100x
passed\r\nOn Firefox the flakiness is related to Terms 2nd aggregation
field\r\nsometimes is not selected. I tested it manually in Firefox 116
and was\r\nable to set fields, though I have a feeling that values are
not always\r\nselected on click in the drop-down. But I didn't see any
errors in\r\nconsole.\r\n\r\nI also returned back retry for dropdown
selection I removed in #161202\r\nthough flaky-test-runner proves there
is no need. Let's have just to\r\nkeep logic as before my
PR.","sha":"072ad967fc04e2b79bf75fd9e6618f3bf0e46b9f"}},{"branch":"8.9","label":"v8.9.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <[email protected]>
  • Loading branch information
kibanamachine and dmlemeshko authored Aug 10, 2023
1 parent f343ff6 commit 86f579d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions test/functional/apps/visualize/group5/_tsvb_time_series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');

// Failing: See https://github.com/elastic/kibana/issues/162995
describe.skip('visual builder', function describeIndexTests() {
describe('visual builder', function describeIndexTests() {
before(async () => {
await security.testUser.setRoles([
'kibana_admin',
Expand Down Expand Up @@ -167,7 +166,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});

describe('Clicking on the chart', () => {
describe('Clicking on the chart', function () {
this.tags('skipFirefox');
const act = async (visName: string, clickCoordinates: { x: number; y: number }) => {
await testSubjects.click('visualizeSaveButton');

Expand Down
29 changes: 18 additions & 11 deletions test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import type { DebugState } from '@elastic/charts';
import expect from '@kbn/expect';
import { FtrService } from '../ftr_provider_context';
import { WebElementWrapper } from '../services/lib/web_element_wrapper';

Expand Down Expand Up @@ -845,10 +844,14 @@ export class VisualBuilderPageObject extends FtrService {
) {
await this.setMetricsGroupBy('terms');
await this.common.sleep(1000);
const byField = await this.testSubjects.find('groupByField');
await this.comboBox.setElement(byField, field);
const isSelected = await this.comboBox.isOptionSelected(byField, field);
expect(isSelected).to.be(true);
await this.retry.try(async () => {
const byField = await this.testSubjects.find('groupByField');
await this.comboBox.setElement(byField, field);
const isSelected = await this.comboBox.isOptionSelected(byField, field);
if (!isSelected) {
throw new Error(`setMetricsGroupByTerms: failed to set '${field}' field`);
}
});
await this.setMetricsGroupByFiltering(filtering.include, filtering.exclude);
}

Expand All @@ -860,13 +863,17 @@ export class VisualBuilderPageObject extends FtrService {
// In case of StaleElementReferenceError 'browser' service will try to find element again
await fieldSelectAddButtonLast.click();
await this.common.sleep(2000);
const selectedByField = await this.find.byXPath(
`(//*[@data-test-subj='fieldSelectItem'])[last()]`
);

await this.comboBox.setElement(selectedByField, field);
const isSelected = await this.comboBox.isOptionSelected(selectedByField, field);
expect(isSelected).to.be(true);
await this.retry.try(async () => {
const selectedByField = await this.find.byXPath(
`(//*[@data-test-subj='fieldSelectItem'])[last()]`
);
await this.comboBox.setElement(selectedByField, field);
const isSelected = await this.comboBox.isOptionSelected(selectedByField, field);
if (!isSelected) {
throw new Error(`setAnotherGroupByTermsField: failed to set '${field}' field`);
}
});
}

public async setMetricsGroupByFiltering(include?: string, exclude?: string) {
Expand Down

0 comments on commit 86f579d

Please sign in to comment.