Skip to content

Commit 6aa9e57

Browse files
committed
ui tests: support a regular expression for popup text
The popup text may contain placeholder, like the name of the participant. It should be possible to specify a regular expression for the `popupText` of the `inputPopupButtonTest`. Example usage: if a popup has a text with `Hello {{nickname}}`, we can send `/Hello .*/` for the popupText value instead of a string `"Hello I don't know what to put here"`.
1 parent 5b8ce3d commit 6aa9e57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/evolution-frontend/tests/ui-testing/testHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type InputCheckboxTest = (params: { path: Path; values: Value[] } & CommonTestPa
7676
type InputMapFindPlaceTest = (params: { path: Path } & CommonTestParameters) => void;
7777
type WaitForMapLoadedTest = (params: CommonTestParameters) => void;
7878
type InputNextButtonTest = (params: { text: Text; nextPageUrl: Url } & CommonTestParameters) => void;
79-
type InputPopupButtonTest = (params: { text: Text; popupText: Text } & CommonTestParameters) => void;
79+
type InputPopupButtonTest = (params: { text: Text; popupText: Text | RegExp } & CommonTestParameters) => void;
8080
type RedirectionTest = (
8181
params: { buttonText: Text; expectedRedirectionUrl: Url; nextPageUrl: Url } & CommonTestParameters
8282
) => void;

0 commit comments

Comments
 (0)