Skip to content

Commit

Permalink
More accurate test interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Dec 1, 2020
1 parent 5910e81 commit cac53b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x-pack/test/functional/services/uptime/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export function UptimeAlertsProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const find = getService('find');
const browser = getService('browser');

return {
Expand Down Expand Up @@ -99,17 +100,17 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) {
async clickLocationExpression(filter: string) {
await testSubjects.click('uptimeCreateStatusAlert.filter_location');
await testSubjects.click(`filter-popover-item_${filter}`);
return testSubjects.click('uptimeCreateStatusAlert.filter_location');
return find.clickByCssSelector('body');
},
async clickPortExpression(filter: string) {
await testSubjects.click('uptimeCreateStatusAlert.filter_port');
await testSubjects.click(`filter-popover-item_${filter}`);
return testSubjects.click('uptimeCreateStatusAlert.filter_port');
return find.clickByCssSelector('body');
},
async clickTypeExpression(filter: string) {
await testSubjects.click('uptimeCreateStatusAlert.filter_scheme');
await testSubjects.click(`filter-popover-item_${filter}`);
return testSubjects.click('uptimeCreateStatusAlert.filter_scheme');
return find.clickByCssSelector('body');
},
async clickSaveAlertButton() {
return testSubjects.click('saveAlertButton');
Expand Down

0 comments on commit cac53b1

Please sign in to comment.