mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
unskip Failing test: Dashboard Elements - Controls tests.test/functional/apps/dashboard_elements/controls/common/control_group_chaining·ts - Controls Dashboard control group hierarchical chaining Creating "does not exist" query from first control filters the second and third controls (#163350)
Closes https://github.com/elastic/kibana/issues/162777
flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2811
Failure image shows options list is still open. PR updates
optionsListEnsurePopoverIsClosed with logic to prevent 2 possible issues
1) retry added to ensure missed click will attempt to close options list
again
2) check options list is open before clicking. This will resolve issue
where options list is closed and clicking actually opens it again

---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
7ff43da226
commit
36f260593e
2 changed files with 16 additions and 5 deletions
|
@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
'header',
|
||||
]);
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/162777
|
||||
describe.skip('Dashboard control group hierarchical chaining', () => {
|
||||
describe('Dashboard control group hierarchical chaining', () => {
|
||||
const newDocuments: Array<{ index: string; id: string }> = [];
|
||||
let controlIds: string[];
|
||||
|
||||
|
|
|
@ -394,8 +394,15 @@ export class DashboardPageControls extends FtrService {
|
|||
return (await controlElement.getVisibleText()).split('\n')[1];
|
||||
}
|
||||
|
||||
public async isOptionsListPopoverOpen(controlId: string) {
|
||||
const isPopoverOpen = await this.find.existsByCssSelector(`#control-popover-${controlId}`);
|
||||
this.log.debug(`Is popover open: ${isPopoverOpen} for Options List: ${controlId}`);
|
||||
return isPopoverOpen;
|
||||
}
|
||||
|
||||
public async optionsListOpenPopover(controlId: string) {
|
||||
this.log.debug(`Opening popover for Options List: ${controlId}`);
|
||||
|
||||
await this.testSubjects.click(`optionsList-control-${controlId}`);
|
||||
await this.retry.try(async () => {
|
||||
await this.testSubjects.existOrFail(`optionsList-control-popover`);
|
||||
|
@ -403,9 +410,14 @@ export class DashboardPageControls extends FtrService {
|
|||
}
|
||||
|
||||
public async optionsListEnsurePopoverIsClosed(controlId: string) {
|
||||
this.log.debug(`Opening popover for Options List: ${controlId}`);
|
||||
await this.testSubjects.click(`optionsList-control-${controlId}`);
|
||||
await this.testSubjects.waitForDeleted(`optionsList-control-available-options`);
|
||||
this.log.debug(`Ensure popover is closed for Options List: ${controlId}`);
|
||||
await this.retry.try(async () => {
|
||||
const isPopoverOpen = await this.isOptionsListPopoverOpen(controlId);
|
||||
if (isPopoverOpen) {
|
||||
await this.testSubjects.click(`optionsList-control-${controlId}`);
|
||||
await this.testSubjects.waitForDeleted(`optionsList-control-available-options`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async optionsListPopoverAssertOpen() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue