Skip to content

Commit

Permalink
Add a getTextInput helper
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan committed Oct 13, 2024
1 parent 2ceb7bf commit dd5876e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/test-utils/entitydialogutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ export class EntityDialogWrapper<TDialog extends EntityDialog<any, any>> {
return waitForAjaxRequests();
}

getTextInput(name: string) {
var input = this.actual["byId"](name);
if (!input.length)
throw `getTextInput: Input with name ${name} is not found in the dialog!`;
return input.val();
}

setTextInput(name: string, value: any) {
var input = this.actual["byId"](name);
if (!input.length)
throw `Input not found in the dialog: ${name}!`;
throw `setTextInput: Input with name ${name} is not found in the dialog!`;
input.val(value).trigger("change");
}

Expand Down

0 comments on commit dd5876e

Please sign in to comment.