-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a typeText function to trigger change after setting element value…
… in tests
- Loading branch information
1 parent
dd5876e
commit e53c89b
Showing
4 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Fluent } from "@serenity-is/corelib"; | ||
|
||
export function typeText(editor: { value: string, element: Fluent }, value: string) { | ||
editor.element.trigger("focus"); | ||
editor.value = value; | ||
editor.element.trigger("blur"); | ||
editor.element.trigger("change"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./entitydialogutils"; | ||
export * from "./editorutils"; | ||
export * from "./mocks"; | ||
export * from "./waitutils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,4 +233,4 @@ export function mockGridSize() { | |
`; | ||
|
||
document.head.appendChild(style); | ||
} | ||
} |