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


![image](06a6673c-e92f-4a45-8910-8a0a1a7c5776)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2023-08-07 15:57:37 -06:00 committed by GitHub
parent 7ff43da226
commit 36f260593e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

View file

@ -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[];

View file

@ -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() {