Skip to content

Commit 1574eb5

Browse files
committed
Attempt to solve timeout issue when loading legacy visualizations dashboard (#271948)
Closes #271816 ## Summary ### Theory [#271520](#271520) exposed the issue because it changed the timing of FTR’s first authenticated navigation. Before that PR, common.navigateToApp('dashboards') hit the login page, filled the UI form, waited for Kibana chrome, then navigated to the app URL again. That slower, multi-step flow gave the Dashboards app more time to settle on #/list before the next call to loadDashboardInEditMode(). After that PR, login is done by API and cookie injection. loginIfPrompted() now injects the sid cookie and navigates directly to the target app URL. That is faster and skips some of the old UI-login waits. So the test reaches: ``` dashboard.initTests() -> dashboard.loadDashboardInEditMode() -> gotoDashboardLandingPage() ``` sooner, while the Dashboards route can still be settling. The underlying bug was already in gotoDashboardLandingPage(): it checks the URL once, and if it does not see dashboards#/list at that exact moment, it assumes it must be inside a dashboard and waits for the in-dashboard breadcrumb. (cherry picked from commit 5ed988c)
1 parent 0efcb0e commit 1574eb5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • x-pack/platform/test/functional/apps/lens/open_in_lens/dashboard

x-pack/platform/test/functional/apps/lens/open_in_lens/dashboard/dashboard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ const TIMELION_PANEL_INDEX = 1;
2020
const HISTOGRAM_PANEL_INDEX = 2;
2121

2222
export default function ({ getPageObjects, getService }: FtrProviderContext) {
23-
const { lens, dashboard } = getPageObjects(['lens', 'dashboard']);
23+
const { header, lens, dashboard } = getPageObjects(['header', 'lens', 'dashboard']);
2424

2525
const testSubjects = getService('testSubjects');
2626
const panelActions = getService('dashboardPanelActions');
2727
const filterBar = getService('filterBar');
2828

29-
// Failing: See https://github.com/elastic/kibana/issues/271816
30-
describe.skip('Convert to Lens action on dashboard', function describeIndexTests() {
29+
describe('Convert to Lens action on dashboard', function describeIndexTests() {
3130
before(async () => {
3231
await dashboard.initTests();
32+
await header.waitUntilLoadingHasFinished();
3333
await dashboard.loadDashboardInEditMode('legacy visualizations');
3434
});
3535

0 commit comments

Comments
 (0)