mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
(cherry picked from commit 395c65feca
)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
parent
cdc71634f0
commit
d910d0a43e
1 changed files with 9 additions and 4 deletions
|
@ -11,6 +11,7 @@ import { FtrService } from '../ftr_provider_context';
|
|||
export class FieldEditorService extends FtrService {
|
||||
private readonly browser = this.ctx.getService('browser');
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
private readonly retry = this.ctx.getService('retry');
|
||||
|
||||
public async setName(name: string, clearFirst = false, typeCharByChar = false) {
|
||||
await this.testSubjects.setValue('nameField > input', name, {
|
||||
|
@ -50,12 +51,16 @@ export class FieldEditorService extends FtrService {
|
|||
}
|
||||
|
||||
public async confirmSave() {
|
||||
await this.testSubjects.setValue('saveModalConfirmText', 'change');
|
||||
await this.testSubjects.click('confirmModalConfirmButton');
|
||||
await this.retry.try(async () => {
|
||||
await this.testSubjects.setValue('saveModalConfirmText', 'change');
|
||||
await this.testSubjects.clickWhenNotDisabled('confirmModalConfirmButton', { timeout: 1000 });
|
||||
});
|
||||
}
|
||||
|
||||
public async confirmDelete() {
|
||||
await this.testSubjects.setValue('deleteModalConfirmText', 'remove');
|
||||
await this.testSubjects.click('confirmModalConfirmButton');
|
||||
await this.retry.try(async () => {
|
||||
await this.testSubjects.setValue('deleteModalConfirmText', 'remove');
|
||||
await this.testSubjects.clickWhenNotDisabled('confirmModalConfirmButton', { timeout: 1000 });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue