Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stabilize flaky embeddables/adding_children take 2 #68873

Merged
merged 8 commits into from
Jun 16, 2020
6 changes: 6 additions & 0 deletions test/examples/embeddables/adding_children.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
it('Can create a new child', async () => {
await testSubjects.click('embeddablePanelToggleMenuIcon');
await testSubjects.click('embeddablePanelAction-ACTION_ADD_PANEL');

// this seem like an overkill, but clicking this button which opens context menu was flaky
await testSubjects.waitForDeleted('savedObjectFinderLoadingIndicator');
await testSubjects.waitForEnabled('createNew');

await testSubjects.click('createNew');
await testSubjects.click('createNew-TODO_EMBEDDABLE');
await testSubjects.setValue('taskInputField', 'new task');
Expand All @@ -44,6 +49,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
it('Can add a child backed off a saved object', async () => {
await testSubjects.click('embeddablePanelToggleMenuIcon');
await testSubjects.click('embeddablePanelAction-ACTION_ADD_PANEL');
await testSubjects.waitForDeleted('savedObjectFinderLoadingIndicator');
await testSubjects.click('savedObjectTitleGarbage');
await testSubjects.moveMouseTo('euiFlyoutCloseButton');
await flyout.ensureClosed('dashboardAddPanel');
Expand Down