[Dashboard] Fix edit embeddable test (#158847)

Closes #156671.

This unskips the edit embeddable functional tests and makes the tests
wait for the dashboard to load before grabbing the original panel for
comparison after editing embeddables.

Flaky test runner x 100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2352#_
This commit is contained in:
Catherine Liu 2023-06-06 09:52:56 -07:00 committed by GitHub
parent 44fa3d1880
commit d1da0ee836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,8 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dashboardPanelActions = getService('dashboardPanelActions');
const dashboardAddPanel = getService('dashboardAddPanel');
// Failing: See https://github.com/elastic/kibana/issues/156671
describe.skip('edit embeddable redirects', () => {
describe('edit embeddable redirects', () => {
before(async () => {
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
@ -44,8 +43,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('redirects via save as button after edit, renaming itself', async () => {
const newTitle = 'wowee, looks like I have a new title';
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
await PageObjects.header.waitUntilLoadingHasFinished();
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.clickEdit();
await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, {
@ -61,8 +60,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('redirects via save as button after edit, adding a new panel', async () => {
const newTitle = 'wowee, my title just got cooler';
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
await PageObjects.header.waitUntilLoadingHasFinished();
const originalPanelCount = await PageObjects.dashboard.getPanelCount();
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.clickEdit();
await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, {