Skip to content

Commit

Permalink
fix Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/funct…
Browse files Browse the repository at this point in the history
…ional/apps/dashboard/group2/sync_colors·ts (elastic#150087)

Fixes elastic#148557 and
elastic#148558

Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1854

See
elastic#148557 (comment)
for explanation of failure. PR resolves flakiness by adding retry in
clickCreateNewLink, ensuring clickCreateNewLink opens lens or else
retries.
  • Loading branch information
nreese authored and kqualters-elastic committed Feb 6, 2023
1 parent c1644f1 commit fa5772d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 8 additions & 3 deletions test/functional/services/dashboard/add_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ export class DashboardAddPanelService extends FtrService {

async clickCreateNewLink() {
this.log.debug('DashboardAddPanel.clickAddNewPanelButton');
await this.testSubjects.click('dashboardAddNewPanelButton');
// Give some time for the animation to complete
await this.common.sleep(500);
await this.retry.try(async () => {
await this.testSubjects.click('dashboardAddNewPanelButton');
await this.testSubjects.waitForDeleted('dashboardAddNewPanelButton');
await this.header.waitUntilLoadingHasFinished();
await this.testSubjects.existOrFail('lnsApp', {
timeout: 5000,
});
});
}

async clickQuickButton(visType: string) {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/functional/apps/dashboard/group2/sync_colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await elasticChart.setNewChartUiDebugFlag(true);
await PageObjects.dashboard.clickCreateDashboardPrompt();
await dashboardAddPanel.clickCreateNewLink();
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.lens.goToTimeRange();

await PageObjects.lens.configureDimension({
Expand All @@ -72,7 +71,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.lens.save('vis1', false, true);
await PageObjects.header.waitUntilLoadingHasFinished();
await dashboardAddPanel.clickCreateNewLink();
await PageObjects.header.waitUntilLoadingHasFinished();

await PageObjects.lens.configureDimension({
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension',
Expand Down

0 comments on commit fa5772d

Please sign in to comment.