[8.11] [QA] Change default time interval in upgrade tests for stack integration (#171705) (#171817)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[QA] Change default time interval in upgrade tests for stack
integration (#171705)](https://github.com/elastic/kibana/pull/171705)

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

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

<!--BACKPORT [{"author":{"name":"Marius
Dragomir","email":"marius-dr@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-11-23T06:51:17Z","message":"[QA]
Change default time interval in upgrade tests for stack integration
(#171705)\n\n## Summary\r\n\r\nSimilar to
https://github.com/elastic/kibana/pull/170483, it just fixes\r\nthe
interval in one other
place.","sha":"358cff48f1e632041f9d31318e4cdee2b5fe99f9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:QA","release_note:skip","test-stack-integration","v8.12.0","v8.11.2"],"number":171705,"url":"https://github.com/elastic/kibana/pull/171705","mergeCommit":{"message":"[QA]
Change default time interval in upgrade tests for stack integration
(#171705)\n\n## Summary\r\n\r\nSimilar to
https://github.com/elastic/kibana/pull/170483, it just fixes\r\nthe
interval in one other
place.","sha":"358cff48f1e632041f9d31318e4cdee2b5fe99f9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171705","number":171705,"mergeCommit":{"message":"[QA]
Change default time interval in upgrade tests for stack integration
(#171705)\n\n## Summary\r\n\r\nSimilar to
https://github.com/elastic/kibana/pull/170483, it just fixes\r\nthe
interval in one other
place.","sha":"358cff48f1e632041f9d31318e4cdee2b5fe99f9"}},{"branch":"8.11","label":"v8.11.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Marius Dragomir <marius-dr@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-11-23 02:53:54 -05:00 committed by GitHub
parent 4951fe268a
commit c0735c61ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const log = getService('log');
const renderable = getService('renderable');
const dashboardExpect = getService('dashboardExpect');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard', 'timePicker']);
const browser = getService('browser');
@ -40,8 +41,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
dashboardTests.forEach(({ name, numPanels }) => {
it('should launch sample ' + name + ' data set dashboard', async () => {
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "now-5y", "to": "now"}`,
});
await PageObjects.home.launchSampleDashboard(name);
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const panelCount = await PageObjects.dashboard.getPanelCount();
@ -49,9 +52,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});
it('should render visualizations', async () => {
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "now-5y", "to": "now"}`,
});
await PageObjects.home.launchSampleDashboard('flights');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
await renderable.waitForRender();
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(49);