[8.9] [TSVB] Stabilize the functional test (#160847) (#160878)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[TSVB] Stabilize the functional test
(#160847)](https://github.com/elastic/kibana/pull/160847)

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

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2023-06-29T12:17:27Z","message":"[TSVB]
Stabilize the functional test (#160847)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/158972\r\n\r\nI think this
change is going to stabilize this test once and for all.\r\n\r\nRunner
100times\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2532","sha":"5f5d5525c4dd64d58bcf5fc67c2469bccf7a4f70","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:TSVB","Team:Visualizations","release_note:skip","backport:prev-minor","v8.9.0","v8.10.0"],"number":160847,"url":"https://github.com/elastic/kibana/pull/160847","mergeCommit":{"message":"[TSVB]
Stabilize the functional test (#160847)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/158972\r\n\r\nI think this
change is going to stabilize this test once and for all.\r\n\r\nRunner
100times\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2532","sha":"5f5d5525c4dd64d58bcf5fc67c2469bccf7a4f70"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160847","number":160847,"mergeCommit":{"message":"[TSVB]
Stabilize the functional test (#160847)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/158972\r\n\r\nI think this
change is going to stabilize this test once and for all.\r\n\r\nRunner
100times\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2532","sha":"5f5d5525c4dd64d58bcf5fc67c2469bccf7a4f70"}}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Kibana Machine 2023-06-29 09:39:48 -04:00 committed by GitHub
parent 19d0a103f2
commit e82e814392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,14 +11,16 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { visualize, visualBuilder, timeToVisualize, dashboard, header, common } = getPageObjects([
'visualBuilder',
'visualize',
'timeToVisualize',
'dashboard',
'header',
'common',
]);
const { visualize, visualBuilder, timeToVisualize, dashboard, header, common, visChart } =
getPageObjects([
'visualBuilder',
'visualize',
'timeToVisualize',
'dashboard',
'header',
'common',
'visChart',
]);
const security = getService('security');
const testSubjects = getService('testSubjects');
const retry = getService('retry');
@ -28,8 +30,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
// Failing: See https://github.com/elastic/kibana/issues/158972
describe.skip('visual builder', function describeIndexTests() {
describe('visual builder', function describeIndexTests() {
before(async () => {
await security.testUser.setRoles([
'kibana_admin',
@ -223,11 +224,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should create a filter for series with multiple split by terms fields one of which has formatting', async () => {
const expectedFilterPills = ['0, win 7'];
await visualBuilder.setMetricsGroupByTerms('bytes');
await visChart.waitForVisualizationRenderingStabilized();
await header.waitUntilLoadingHasFinished();
await visualBuilder.setAnotherGroupByTermsField('machine.os.raw');
await visChart.waitForVisualizationRenderingStabilized();
await header.waitUntilLoadingHasFinished();
await visualBuilder.clickSeriesOption();
await visualBuilder.setChartType('Bar');
await visChart.waitForVisualizationRenderingStabilized();
await header.waitUntilLoadingHasFinished();
await visualBuilder.clickPanelOptions('timeSeries');
await visualBuilder.setIntervalValue('1w');