diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts index 215d552d07f7d..4c71693dd4125 100644 --- a/test/functional/page_objects/common_page.ts +++ b/test/functional/page_objects/common_page.ts @@ -387,6 +387,12 @@ export class CommonPageObject extends FtrService { this.log.debug('Clicking modal confirm'); // make sure this data-test-subj 'confirmModalTitleText' exists because we're going to wait for it to be gone later await this.testSubjects.exists('confirmModalTitleText'); + // make sure button is enabled before clicking it + // (and conveniently give UI enough time to bind a handler to it) + const isEnabled = await this.testSubjects.isEnabled('confirmModalConfirmButton'); + if (!isEnabled) { + throw new Error('Modal confirm button is not enabled'); + } await this.testSubjects.click('confirmModalConfirmButton'); if (ensureHidden) { await this.ensureModalOverlayHidden(); diff --git a/x-pack/test/functional/page_objects/tag_management_page.ts b/x-pack/test/functional/page_objects/tag_management_page.ts index 50d1453c1fe0f..5eb93aa977cf5 100644 --- a/x-pack/test/functional/page_objects/tag_management_page.ts +++ b/x-pack/test/functional/page_objects/tag_management_page.ts @@ -65,6 +65,7 @@ class TagModal extends FtrService { }); } if (fields.color !== undefined) { + await this.testSubjects.click('~createModalField-color'); await this.testSubjects.setValue('~createModalField-color', fields.color, { clearWithKeyboard, }); diff --git a/x-pack/test/saved_object_tagging/functional/tests/bulk_actions.ts b/x-pack/test/saved_object_tagging/functional/tests/bulk_actions.ts index f75e51851528c..d4aef2d44856f 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/bulk_actions.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/bulk_actions.ts @@ -27,8 +27,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); }); - // FLAKY: https://github.com/elastic/kibana/issues/163817 - describe.skip('bulk delete', () => { + describe('bulk delete', () => { it('deletes multiple tags', async () => { const initialDisplayedTags = await tagManagementPage.getDisplayedTagNames(); await tagManagementPage.selectTagByName('tag-1'); diff --git a/x-pack/test/saved_object_tagging/functional/tests/create.ts b/x-pack/test/saved_object_tagging/functional/tests/create.ts index a2bde4ab579dc..0e2f3f52566c7 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/create.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/create.ts @@ -15,8 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const tagManagementPage = PageObjects.tagManagement; - // FLAKY: https://github.com/elastic/kibana/issues/167812 - describe.skip('create tag', () => { + describe('create tag', () => { let tagModal: typeof tagManagementPage['tagModal']; before(async () => { @@ -45,7 +44,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'I just added this tag', color: '#FF00CC', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); await tagModal.waitUntilClosed(); await tagManagementPage.waitUntilTableIsLoaded(); @@ -65,7 +67,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'The name will fails validation', color: '#FF00CC', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); expect(await tagModal.isOpened()).to.be(true); @@ -84,7 +89,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'The name will fails validation', color: '#FF00CC', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); expect(await tagModal.isOpened()).to.be(true); @@ -94,7 +102,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { { name: 'valid name', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); await tagModal.waitUntilClosed(); @@ -114,7 +125,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'I will not add this tag', color: '#FF00CC', }, - { submit: false } + { + submit: false, + clearWithKeyboard: true, + } ); await tagModal.clickCancel(); await tagModal.waitUntilClosed(); diff --git a/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts index 024c7265a72bf..18be683db1d05 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/dashboard_integration.ts @@ -118,6 +118,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }, { submit: true, + clearWithKeyboard: true, } ); diff --git a/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts index 7a82d0aec5d34..8258b4570ed9b 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/discover_integration.ts @@ -52,8 +52,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }; - // Failing: See https://github.com/elastic/kibana/issues/150249 - describe.skip('discover integration', () => { + describe('discover integration', () => { before(async () => { await kibanaServer.importExport.load( 'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/discover/data.json' @@ -143,6 +142,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }, { submit: true, + clearWithKeyboard: true, } ); expect(await tagModal.isOpened()).to.be(false); diff --git a/x-pack/test/saved_object_tagging/functional/tests/edit.ts b/x-pack/test/saved_object_tagging/functional/tests/edit.ts index f29212b251827..76e14d76a47a8 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/edit.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/edit.ts @@ -15,8 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const tagManagementPage = PageObjects.tagManagement; - // Failing: See https://github.com/elastic/kibana/issues/167560 - describe.skip('edit tag', () => { + describe('edit tag', () => { let tagModal: typeof tagManagementPage['tagModal']; before(async () => { @@ -56,7 +55,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'This was edited', color: '#FFCC00', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); await tagModal.waitUntilClosed(); await tagManagementPage.waitUntilTableIsLoaded(); @@ -79,7 +81,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { { name: 'a', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); expect(await tagModal.isOpened()).to.be(true); @@ -98,7 +103,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'edited description', color: '#FF00CC', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); expect(await tagModal.isOpened()).to.be(true); @@ -108,7 +116,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { { name: 'edited name', }, - { submit: true } + { + submit: true, + clearWithKeyboard: true, + } ); await tagModal.waitUntilClosed(); @@ -130,7 +141,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { description: 'I will not add this tag', color: '#FF00CC', }, - { submit: false } + { + submit: false, + clearWithKeyboard: true, + } ); await tagModal.clickCancel(); await tagModal.waitUntilClosed(); @@ -153,13 +167,16 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('should disable save button if no property is changed', async () => { await tagModal.openEdit('tag-3'); - await tagModal.fillForm(tag3Unmodified, { submit: false }); + await tagModal.fillForm(tag3Unmodified, { submit: false, clearWithKeyboard: true }); expect(await tagModal.isConfirmDisabled()).to.be(true); }); it('should enable save button if name is changed', async () => { await tagModal.openEdit('tag-3'); - await tagModal.fillForm({ ...tag3Unmodified, name: 'changed name' }, { submit: false }); + await tagModal.fillForm( + { ...tag3Unmodified, name: 'changed name' }, + { submit: false, clearWithKeyboard: true } + ); expect(await tagModal.isConfirmDisabled()).to.be(false); }); it('should enable save button if description is changed', async () => { @@ -167,14 +184,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await tagModal.fillForm( { ...tag3Unmodified, description: 'changed description' }, - { submit: false } + { submit: false, clearWithKeyboard: true } ); expect(await tagModal.isConfirmDisabled()).to.be(false); }); it('should enable save button if color is changed', async () => { await tagModal.openEdit('tag-3'); - await tagModal.fillForm({ ...tag3Unmodified, color: '#FF0000' }, { submit: false }); + await tagModal.fillForm( + { ...tag3Unmodified, color: '#FF0000' }, + { submit: false, clearWithKeyboard: true } + ); expect(await tagModal.isConfirmDisabled()).to.be(false); }); }); diff --git a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts index 7532263b4518c..8d57f68c501c1 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/maps_integration.ts @@ -98,6 +98,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }, { submit: true, + clearWithKeyboard: true, } ); diff --git a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts index a7a03a58ba0cf..61b7a2c1e9711 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts @@ -173,6 +173,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }, { submit: true, + clearWithKeyboard: true, } );