mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
fix flaky test x-pack/test/functional/apps/dashboard/group2/panel_time_range·ts (#150630)
Fixers https://github.com/elastic/kibana/issues/150490 flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1899 Failures caused by settings panel not closing. PR resolves issue by dismissing toasts so save button is clickable and retrying if settings panel does not close. <img width="500" alt="Screen Shot 2023-02-08 at 12 30 19 PM" src="https://user-images.githubusercontent.com/373691/217639189-c1da31e8-b9d8-4d60-b95f-2e04b1d5c228.png"> --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
3faf6f519c
commit
cb17912b6c
1 changed files with 11 additions and 2 deletions
|
@ -11,6 +11,8 @@ import { CommonlyUsed } from '../../page_objects/time_picker';
|
|||
|
||||
export function DashboardCustomizePanelProvider({ getService }: FtrProviderContext) {
|
||||
const log = getService('log');
|
||||
const retry = getService('retry');
|
||||
const toasts = getService('toasts');
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
return new (class DashboardCustomizePanel {
|
||||
|
@ -95,12 +97,19 @@ export function DashboardCustomizePanelProvider({ getService }: FtrProviderConte
|
|||
|
||||
public async clickSaveButton() {
|
||||
log.debug('clickSaveButton');
|
||||
await testSubjects.click('saveCustomizePanelButton');
|
||||
await retry.try(async () => {
|
||||
await toasts.dismissAllToasts();
|
||||
await testSubjects.click('saveCustomizePanelButton');
|
||||
await testSubjects.waitForDeleted('saveCustomizePanelButton');
|
||||
});
|
||||
}
|
||||
|
||||
public async clickCancelButton() {
|
||||
log.debug('clickCancelButton');
|
||||
await testSubjects.click('cancelCustomizePanelButton');
|
||||
await retry.try(async () => {
|
||||
await testSubjects.click('cancelCustomizePanelButton');
|
||||
await testSubjects.waitForDeleted('cancelCustomizePanelButton');
|
||||
});
|
||||
}
|
||||
|
||||
public async clickToggleShowCustomTimeRange() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue