mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
stabilize flaky embeddables/adding_children take 2 (#68873)
* wait for loading indicator to be deleted * improve with retry * Update test/examples/embeddables/adding_children.ts Co-authored-by: Spencer <email@spalger.com> Co-authored-by: Spencer <email@spalger.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
833ce08259
commit
721125772f
1 changed files with 10 additions and 1 deletions
|
@ -24,6 +24,7 @@ import { PluginFunctionalProviderContext } from 'test/plugin_functional/services
|
|||
export default function ({ getService }: PluginFunctionalProviderContext) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const flyout = getService('flyout');
|
||||
const retry = getService('retry');
|
||||
|
||||
describe('creating and adding children', () => {
|
||||
before(async () => {
|
||||
|
@ -33,8 +34,15 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
it('Can create a new child', async () => {
|
||||
await testSubjects.click('embeddablePanelToggleMenuIcon');
|
||||
await testSubjects.click('embeddablePanelAction-ACTION_ADD_PANEL');
|
||||
await testSubjects.click('createNew');
|
||||
|
||||
// this seem like an overkill, but clicking this button which opens context menu was flaky
|
||||
await testSubjects.waitForEnabled('createNew');
|
||||
await retry.waitFor('createNew popover opened', async () => {
|
||||
await testSubjects.click('createNew');
|
||||
return await testSubjects.exists('createNew-TODO_EMBEDDABLE');
|
||||
});
|
||||
await testSubjects.click('createNew-TODO_EMBEDDABLE');
|
||||
|
||||
await testSubjects.setValue('taskInputField', 'new task');
|
||||
await testSubjects.click('createTodoEmbeddable');
|
||||
const tasks = await testSubjects.getVisibleTextAll('todoEmbeddableTask');
|
||||
|
@ -44,6 +52,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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue