Skip to content

Commit

Permalink
[8.5] Adding dashboard render verify tests to upgraded saved objects …
Browse files Browse the repository at this point in the history
…in integration test (#145036) (#145056)

# Backport

This will backport the following commits from `main` to `8.5`:
- [Adding dashboard render verify tests to upgraded saved objects in
integration test
(#145036)](#145036)

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

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

<!--BACKPORT [{"author":{"name":"Bhavya
RM","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-11T16:42:34Z","message":"Adding
dashboard render verify tests to upgraded saved objects in integration
test (#145036)\n\nPlease note these tests don't run in
ci","sha":"6d1f17cedafa8a4b5502bb51c349a8dff511cf5b","branchLabelMapping":{"^v8.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","backport:prev-minor","v8.6.0"],"number":145036,"url":"https://github.com/elastic/kibana/pull/145036","mergeCommit":{"message":"Adding
dashboard render verify tests to upgraded saved objects in integration
test (#145036)\n\nPlease note these tests don't run in
ci","sha":"6d1f17cedafa8a4b5502bb51c349a8dff511cf5b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.6.0","labelRegex":"^v8.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145036","number":145036,"mergeCommit":{"message":"Adding
dashboard render verify tests to upgraded saved objects in integration
test (#145036)\n\nPlease note these tests don't run in
ci","sha":"6d1f17cedafa8a4b5502bb51c349a8dff511cf5b"}}]}] BACKPORT-->

Co-authored-by: Bhavya RM <[email protected]>
  • Loading branch information
kibanamachine and bhavyarm authored Nov 11, 2022
1 parent 5ef1155 commit c23f85a
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../../functional/ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Saved objects upgrade tests', function () {
loadTestFile(require.resolve('./upgraded_dashboards'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../../functional/ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('Verify upgraded dashboards', function () {
const PageObjects = getPageObjects(['common', 'dashboard', 'timePicker']);
const renderService = getService('renderable');
before(async () => {
await PageObjects.common.navigateToApp('management', { insertTimestamp: false });
});

it('should be able to verify that dashboards rendered correctly in 6.x space', async function () {
await PageObjects.common.navigateToUrl('dashboard', undefined, {
basePath: `/s/6x`,
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
shouldUseHashForSubUrl: false,
});
await PageObjects.dashboard.loadSavedDashboard('shakespeare_dashboard');
await PageObjects.dashboard.expectOnDashboard('shakespeare_dashboard');

await renderService.waitForRender(6);

await PageObjects.dashboard.verifyNoRenderErrors();

await PageObjects.timePicker.setDefaultAbsoluteRange();

await PageObjects.dashboard.loadSavedDashboard('logstash_dashboardwithfilters');
await PageObjects.dashboard.expectOnDashboard('logstash_dashboardwithfilters');

await renderService.waitForRender(20);

await PageObjects.dashboard.verifyNoRenderErrors();
});

it('should be able to verify that dashboards rendered correctly in 7.x space', async function () {
await PageObjects.common.navigateToUrl('dashboard', undefined, {
basePath: `/s/7x`,
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
shouldUseHashForSubUrl: false,
});
await PageObjects.dashboard.loadSavedDashboard('nontimebased_shakespeare_drilldown');
await PageObjects.dashboard.expectOnDashboard('nontimebased_shakespeare_drilldown');

await renderService.waitForRender(2);

await PageObjects.dashboard.verifyNoRenderErrors();

await PageObjects.timePicker.setDefaultAbsoluteRange();

await PageObjects.dashboard.loadSavedDashboard('by_reference_drilldown');
await PageObjects.dashboard.expectOnDashboard('by_reference_drilldown');

await renderService.waitForRender(4);

await PageObjects.dashboard.verifyNoRenderErrors();
});
});
}

0 comments on commit c23f85a

Please sign in to comment.