From b561f69394f1477239ab557ae2d9fdd71b8e5fb3 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 7 Apr 2020 11:28:11 -0400 Subject: [PATCH 1/9] Use of testSubjects.setValue --- .../apps/triggers_actions_ui/alerts.ts | 46 +++++-------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 029af1ea06e4f..12f94b6860a1e 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -38,8 +38,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { return createdAlert; } - // FLAKY: https://github.com/elastic/kibana/issues/62472 - describe.skip('alerts', function() { + describe('alerts', function() { before(async () => { await pageObjects.common.navigateToApp('triggersActions'); await testSubjects.click('alertsTab'); @@ -48,10 +47,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('should create an alert', async () => { const alertName = generateUniqueKey(); await pageObjects.triggersActionsUI.clickCreateAlertButton(); - const nameInput = await testSubjects.find('alertNameInput'); - await nameInput.click(); - await nameInput.clearValue(); - await nameInput.type(alertName); + await testSubjects.setValue('alertNameInput', alertName); await testSubjects.click('.index-threshold-SelectOption'); await testSubjects.click('selectIndexExpression'); const comboBox = await find.byCssSelector('#indexSelectSearchBox'); @@ -63,24 +59,15 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const fieldOptions = await find.allByCssSelector('#thresholdTimeField option'); await fieldOptions[1].click(); // need this two out of popup clicks to close them + const nameInput = await testSubjects.find('alertNameInput'); await nameInput.click(); await testSubjects.click('.slack-ActionTypeSelectOption'); await testSubjects.click('createActionConnectorButton'); - const connectorNameInput = await testSubjects.find('nameInput'); - await connectorNameInput.click(); - await connectorNameInput.clearValue(); - const connectorName = generateUniqueKey(); - await connectorNameInput.type(connectorName); - const slackWebhookUrlInput = await testSubjects.find('slackWebhookUrlInput'); - await slackWebhookUrlInput.click(); - await slackWebhookUrlInput.clearValue(); - await slackWebhookUrlInput.type('https://test'); + await testSubjects.setValue('nameInput', generateUniqueKey()); + await testSubjects.setValue('slackWebhookUrlInput', 'https://test'); await find.clickByCssSelector('[data-test-subj="saveActionButtonModal"]:not(disabled)'); - const loggingMessageInput = await testSubjects.find('slackMessageTextArea'); - await loggingMessageInput.click(); - await loggingMessageInput.clearValue(); - await loggingMessageInput.type('test message'); + await testSubjects.setValue('slackMessageTextArea', 'test message'); await testSubjects.click('slackAddVariableButton'); const variableMenuButton = await testSubjects.find('variableMenuButton-0'); await variableMenuButton.click(); @@ -134,7 +121,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('should edit an alert', async () => { const createdAlert = await createAlert({ alertTypeId: '.index-threshold', - name: 'new alert', + name: generateUniqueKey(), params: { aggType: 'count', termSize: 5, @@ -162,11 +149,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - const updatedAlertName = 'Changed Alert Name'; - const nameInputToUpdate = await testSubjects.find('alertNameInput'); - await nameInputToUpdate.click(); - await nameInputToUpdate.clearValue(); - await nameInputToUpdate.type(updatedAlertName); + const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; + await testSubjects.setValue('alertNameInput', updatedAlertName); await find.clickByCssSelector('[data-test-subj="saveEditedAlertButton"]:not(disabled)'); @@ -219,10 +203,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - const throttleInputToSetInitialValue = await testSubjects.find('throttleInput'); - await throttleInputToSetInitialValue.click(); - await throttleInputToSetInitialValue.clearValue(); - await throttleInputToSetInitialValue.type('1'); + await testSubjects.setValue('throttleInput', '1'); await find.clickByCssSelector('[data-test-subj="saveEditedAlertButton"]:not(disabled)'); @@ -310,11 +291,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - const updatedAlertName = 'Changed Alert Name'; - const nameInputToUpdate = await testSubjects.find('alertNameInput'); - await nameInputToUpdate.click(); - await nameInputToUpdate.clearValue(); - await nameInputToUpdate.type(updatedAlertName); + const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; + await testSubjects.setValue('alertNameInput', updatedAlertName); await testSubjects.click('cancelSaveEditedAlertButton'); await find.waitForDeletedByCssSelector('[data-test-subj="cancelSaveEditedAlertButton"]'); From 02417961f9ef0b0068cbeeaf17110844f133c189 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 7 Apr 2020 13:36:49 -0400 Subject: [PATCH 2/9] Add waitForEditAlertFlyout --- .../apps/triggers_actions_ui/alerts.ts | 9 ++++++--- .../page_objects/triggers_actions_ui_page.ts | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 12f94b6860a1e..1d8ce08d1cccf 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -148,6 +148,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ]); const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); + await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; await testSubjects.setValue('alertNameInput', updatedAlertName); @@ -202,6 +203,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); + await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); await testSubjects.setValue('throttleInput', '1'); @@ -249,6 +251,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); + await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const throttleInputToUnsetValue = await testSubjects.find('throttleInput'); @@ -290,6 +293,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); + await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; await testSubjects.setValue('alertNameInput', updatedAlertName); @@ -300,9 +304,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLinkPostCancel = await testSubjects.findAll('alertsTableCell-editLink'); await editLinkPostCancel[0].click(); - const nameInputAfterCancel = await testSubjects.find('alertNameInput'); - const textAfterCancel = await nameInputAfterCancel.getAttribute('value'); - expect(textAfterCancel).to.eql(createdAlert.name); + // This will assert that the input got reverted to its original value and NOT updatedAlertName + await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); }); it('should search for tags', async () => { diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index 2a50c0117eae9..95318b90e91a6 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -142,5 +142,11 @@ export function TriggersActionsPageProvider({ getService }: FtrProviderContext) ); await createBtn.click(); }, + async waitForEditAlertFlyout({ name }: { name: string }) { + await retry.try(async () => { + const inputValue = await testSubjects.getAttribute('alertNameInput', 'value'); + expect(inputValue).to.eql(name); + }); + }, }; } From 3293f7afe603c636fd2902bf2628a74c8125e755 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 7 Apr 2020 13:59:55 -0400 Subject: [PATCH 3/9] Fix some extra flakiness --- .../components/builtin_alert_types/threshold/expression.tsx | 1 + .../sections/action_connector_form/action_form.tsx | 1 + .../apps/triggers_actions_ui/alerts.ts | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx index 5bbec1221a3ac..7557b17f5b67d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx @@ -328,6 +328,7 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent { setActiveActionItem({ actionTypeId: actionItem.actionTypeId, index }); setAddModalVisibility(true); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 1d8ce08d1cccf..02a3ee98491e2 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -17,6 +17,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); const supertest = getService('supertest'); const find = getService('find'); + const retry = getService('retry'); async function createAlert(overwrites: Record = {}) { const { body: createdAlert } = await supertest @@ -57,7 +58,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await filterSelectItem.click(); await testSubjects.click('thresholdAlertTimeFieldSelect'); const fieldOptions = await find.allByCssSelector('#thresholdTimeField option'); + await retry.try(async () => { + expect(fieldOptions[1]).not.to.be(undefined); + }); await fieldOptions[1].click(); + await testSubjects.click('closePopover'); // need this two out of popup clicks to close them const nameInput = await testSubjects.find('alertNameInput'); await nameInput.click(); From 9ebf97fb0113957750d9351b2d521c7b3268e596 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Wed, 8 Apr 2020 11:52:45 -0400 Subject: [PATCH 4/9] Test half second sleep to confirm cause of flakiness --- .../page_objects/triggers_actions_ui_page.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index 95318b90e91a6..cd0b682d6fe7c 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -9,10 +9,11 @@ import { FtrProviderContext } from '../ftr_provider_context'; const ENTER_KEY = '\uE007'; -export function TriggersActionsPageProvider({ getService }: FtrProviderContext) { +export function TriggersActionsPageProvider({ getPageObjects, getService }: FtrProviderContext) { const find = getService('find'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); + const pageObjects = getPageObjects(['common']); return { async getSectionHeadingText() { @@ -147,6 +148,7 @@ export function TriggersActionsPageProvider({ getService }: FtrProviderContext) const inputValue = await testSubjects.getAttribute('alertNameInput', 'value'); expect(inputValue).to.eql(name); }); + await pageObjects.common.sleep(500); }, }; } From 58dbd4999261e0e128671ad824bd0d93b18387df Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Thu, 9 Apr 2020 15:25:49 -0400 Subject: [PATCH 5/9] Revert 02417961f9ef0b0068cbeeaf17110844f133c189 --- .../apps/triggers_actions_ui/alerts.ts | 9 +++------ .../page_objects/triggers_actions_ui_page.ts | 10 +--------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 02a3ee98491e2..da97b0efa399c 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -153,7 +153,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ]); const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; await testSubjects.setValue('alertNameInput', updatedAlertName); @@ -208,7 +207,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); await testSubjects.setValue('throttleInput', '1'); @@ -256,7 +254,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const throttleInputToUnsetValue = await testSubjects.find('throttleInput'); @@ -298,7 +295,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; await testSubjects.setValue('alertNameInput', updatedAlertName); @@ -309,8 +305,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLinkPostCancel = await testSubjects.findAll('alertsTableCell-editLink'); await editLinkPostCancel[0].click(); - // This will assert that the input got reverted to its original value and NOT updatedAlertName - await pageObjects.triggersActionsUI.waitForEditAlertFlyout({ name: createdAlert.name }); + const nameInputAfterCancel = await testSubjects.find('alertNameInput'); + const textAfterCancel = await nameInputAfterCancel.getAttribute('value'); + expect(textAfterCancel).to.eql(createdAlert.name); }); it('should search for tags', async () => { diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index cd0b682d6fe7c..2a50c0117eae9 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -9,11 +9,10 @@ import { FtrProviderContext } from '../ftr_provider_context'; const ENTER_KEY = '\uE007'; -export function TriggersActionsPageProvider({ getPageObjects, getService }: FtrProviderContext) { +export function TriggersActionsPageProvider({ getService }: FtrProviderContext) { const find = getService('find'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const pageObjects = getPageObjects(['common']); return { async getSectionHeadingText() { @@ -143,12 +142,5 @@ export function TriggersActionsPageProvider({ getPageObjects, getService }: FtrP ); await createBtn.click(); }, - async waitForEditAlertFlyout({ name }: { name: string }) { - await retry.try(async () => { - const inputValue = await testSubjects.getAttribute('alertNameInput', 'value'); - expect(inputValue).to.eql(name); - }); - await pageObjects.common.sleep(500); - }, }; } From 1f3252cdde5388db5dc584e4dc8ebfb58a780de8 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Thu, 9 Apr 2020 15:44:44 -0400 Subject: [PATCH 6/9] Try clearWithKeyboard --- .../apps/triggers_actions_ui/alerts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index da97b0efa399c..f7c17607c1bb2 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -57,11 +57,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const filterSelectItem = await find.byCssSelector(`.euiFilterSelectItem`); await filterSelectItem.click(); await testSubjects.click('thresholdAlertTimeFieldSelect'); - const fieldOptions = await find.allByCssSelector('#thresholdTimeField option'); await retry.try(async () => { + const fieldOptions = await find.allByCssSelector('#thresholdTimeField option'); expect(fieldOptions[1]).not.to.be(undefined); + await fieldOptions[1].click(); }); - await fieldOptions[1].click(); await testSubjects.click('closePopover'); // need this two out of popup clicks to close them const nameInput = await testSubjects.find('alertNameInput'); @@ -155,7 +155,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await editLink[0].click(); const updatedAlertName = `Changed Alert Name ${generateUniqueKey()}`; - await testSubjects.setValue('alertNameInput', updatedAlertName); + await testSubjects.setValue('alertNameInput', updatedAlertName, { clearWithKeyboard: true }); await find.clickByCssSelector('[data-test-subj="saveEditedAlertButton"]:not(disabled)'); @@ -208,7 +208,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const editLink = await testSubjects.findAll('alertsTableCell-editLink'); await editLink[0].click(); - await testSubjects.setValue('throttleInput', '1'); + await testSubjects.setValue('throttleInput', '1', { clearWithKeyboard: true }); await find.clickByCssSelector('[data-test-subj="saveEditedAlertButton"]:not(disabled)'); From c81db4701092addf0bdb1996ee4fd0174f632c93 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 14 Apr 2020 09:25:28 -0400 Subject: [PATCH 7/9] Fix test failures --- .../apps/triggers_actions_ui/alerts.ts | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 1bb6fd140a919..bce8e08cd16d3 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -67,20 +67,18 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const nameInput = await testSubjects.find('alertNameInput'); await nameInput.click(); - // test for normal connector - await testSubjects.click('.webhook-ActionTypeSelectOption'); - const webhookBodyInput = await find.byCssSelector('.ace_text-input'); - await webhookBodyInput.focus(); - await webhookBodyInput.type('{\\"test\\":1}'); - - await testSubjects.click('addAlertActionButton'); - // pre-configured connector is loaded an displayed correctly await testSubjects.click('.slack-ActionTypeSelectOption'); - expect(await (await find.byCssSelector('#my-slack1')).isDisplayed()).to.be(true); + await testSubjects.click('createActionConnectorButton'); + const slackConnectorName = generateUniqueKey(); + await testSubjects.setValue('nameInput', slackConnectorName); + await testSubjects.setValue('slackWebhookUrlInput', 'https://test'); + await find.clickByCssSelector('[data-test-subj="saveActionButtonModal"]:not(disabled)'); + const createdConnectorToastTitle = await pageObjects.common.closeToast(); + expect(createdConnectorToastTitle).to.eql(`Created '${slackConnectorName}'`); await testSubjects.setValue('slackMessageTextArea', 'test message'); await testSubjects.click('messageAddVariableButton'); - const variableMenuButton = await testSubjects.find('variableMenuButton-0'); - await variableMenuButton.click(); + await testSubjects.click('variableMenuButton-0'); + await testSubjects.click('saveAlertButton'); const toastTitle = await pageObjects.common.closeToast(); expect(toastTitle).to.eql(`Saved '${alertName}'`); From 877a0f2836a87bc6324051992c2641690634bad0 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 14 Apr 2020 09:30:34 -0400 Subject: [PATCH 8/9] Fix uptime tests --- x-pack/test/functional/services/uptime/alerts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/services/uptime/alerts.ts b/x-pack/test/functional/services/uptime/alerts.ts index 3a8193ff3d327..c73f81094da7a 100644 --- a/x-pack/test/functional/services/uptime/alerts.ts +++ b/x-pack/test/functional/services/uptime/alerts.ts @@ -26,13 +26,13 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) { } }, async setAlertName(name: string) { - return testSubjects.setValue('alertNameInput', name); + return testSubjects.setValue('alertNameInput', name, { clearWithKeyboard: true }); }, async setAlertInterval(value: string) { - return testSubjects.setValue('intervalInput', value); + return testSubjects.setValue('intervalInput', value, { clearWithKeyboard: true }); }, async setAlertThrottleInterval(value: string) { - return testSubjects.setValue('throttleInput', value); + return testSubjects.setValue('throttleInput', value, { clearWithKeyboard: true }); }, async setAlertExpressionValue( expressionAttribute: string, @@ -40,7 +40,7 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) { value: string ) { await testSubjects.click(expressionAttribute); - await testSubjects.setValue(fieldAttribute, value); + await testSubjects.setValue(fieldAttribute, value, { clearWithKeyboard: true }); return browser.pressKeys(browser.keys.ESCAPE); }, async setAlertStatusNumTimes(value: string) { From ce8d27e5a5924491e19a295916d49df324e3700b Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 14 Apr 2020 13:18:34 -0400 Subject: [PATCH 9/9] Revert uptime changes --- x-pack/test/functional/services/uptime/alerts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/services/uptime/alerts.ts b/x-pack/test/functional/services/uptime/alerts.ts index c73f81094da7a..3a8193ff3d327 100644 --- a/x-pack/test/functional/services/uptime/alerts.ts +++ b/x-pack/test/functional/services/uptime/alerts.ts @@ -26,13 +26,13 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) { } }, async setAlertName(name: string) { - return testSubjects.setValue('alertNameInput', name, { clearWithKeyboard: true }); + return testSubjects.setValue('alertNameInput', name); }, async setAlertInterval(value: string) { - return testSubjects.setValue('intervalInput', value, { clearWithKeyboard: true }); + return testSubjects.setValue('intervalInput', value); }, async setAlertThrottleInterval(value: string) { - return testSubjects.setValue('throttleInput', value, { clearWithKeyboard: true }); + return testSubjects.setValue('throttleInput', value); }, async setAlertExpressionValue( expressionAttribute: string, @@ -40,7 +40,7 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) { value: string ) { await testSubjects.click(expressionAttribute); - await testSubjects.setValue(fieldAttribute, value, { clearWithKeyboard: true }); + await testSubjects.setValue(fieldAttribute, value); return browser.pressKeys(browser.keys.ESCAPE); }, async setAlertStatusNumTimes(value: string) {