mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.16`: - [[Infra] Attempt to fix home_page test (#202120)](https://github.com/elastic/kibana/pull/202120) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-28T11:49:00Z","message":"[Infra] Attempt to fix home_page test (#202120)\n\nfixes https://github.com/elastic/kibana/issues/194945\r\n\r\n## Summary\r\n\r\nAttempt to fix saved views test case in the home_page suite","sha":"1d0f80ffdf605ed89419691d7e95cb2126f0223e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-infra_services","v8.16.0","backport:version","v8.17.0"],"title":"[Infra] Attempt to fix home_page test","number":202120,"url":"https://github.com/elastic/kibana/pull/202120","mergeCommit":{"message":"[Infra] Attempt to fix home_page test (#202120)\n\nfixes https://github.com/elastic/kibana/issues/194945\r\n\r\n## Summary\r\n\r\nAttempt to fix saved views test case in the home_page suite","sha":"1d0f80ffdf605ed89419691d7e95cb2126f0223e"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202120","number":202120,"mergeCommit":{"message":"[Infra] Attempt to fix home_page test (#202120)\n\nfixes https://github.com/elastic/kibana/issues/194945\r\n\r\n## Summary\r\n\r\nAttempt to fix saved views test case in the home_page suite","sha":"1d0f80ffdf605ed89419691d7e95cb2126f0223e"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
This commit is contained in:
parent
55bac33c26
commit
78e477cb1f
1 changed files with 8 additions and 5 deletions
|
@ -13,6 +13,7 @@ export function InfraSavedViewsProvider({ getService }: FtrProviderContext) {
|
|||
const retry = getService('retry');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const browser = getService('browser');
|
||||
const config = getService('config');
|
||||
|
||||
return {
|
||||
async clickSavedViewsButton() {
|
||||
|
@ -25,13 +26,15 @@ export function InfraSavedViewsProvider({ getService }: FtrProviderContext) {
|
|||
|
||||
return button.click();
|
||||
},
|
||||
pressEsc() {
|
||||
async pressEsc() {
|
||||
return browser.pressKeys([Key.ESCAPE]);
|
||||
},
|
||||
|
||||
async closeSavedViewsPopover() {
|
||||
await testSubjects.find('savedViews-popover');
|
||||
return this.pressEsc();
|
||||
await retry.tryForTime(config.get('timeouts.try'), async () => {
|
||||
await this.pressEsc();
|
||||
await testSubjects.missingOrFail('loadViewsFlyout');
|
||||
});
|
||||
},
|
||||
|
||||
clickManageViewsButton() {
|
||||
|
@ -55,7 +58,7 @@ export function InfraSavedViewsProvider({ getService }: FtrProviderContext) {
|
|||
await testSubjects.setValue('savedViewName', name);
|
||||
await testSubjects.click('createSavedViewButton');
|
||||
await testSubjects.missingOrFail('createSavedViewButton', { timeout: 20000 });
|
||||
await retry.tryForTime(10 * 1000, async () => {
|
||||
await retry.tryForTime(config.get('timeouts.try'), async () => {
|
||||
await testSubjects.missingOrFail('savedViews-upsertModal');
|
||||
});
|
||||
},
|
||||
|
@ -71,7 +74,7 @@ export function InfraSavedViewsProvider({ getService }: FtrProviderContext) {
|
|||
},
|
||||
|
||||
async ensureViewIsLoaded(name: string) {
|
||||
await retry.tryForTime(5000, async () => {
|
||||
await retry.tryForTime(config.get('timeouts.try'), async () => {
|
||||
const subject = await testSubjects.find('savedViews-openPopover');
|
||||
expect(await subject.getVisibleText()).to.be(name);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue