Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: I cannot expect a string with a dollar sign in it #407

Open
rekire opened this issue Mar 16, 2024 · 3 comments
Open

fix: I cannot expect a string with a dollar sign in it #407

rekire opened this issue Mar 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rekire
Copy link

rekire commented Mar 16, 2024

Description

I cannot expect that a string with a dollar sign is visible or not.

Steps To Reproduce

  1. Open a shell
  2. Install the CLI via flutter pub global activate fluttium_cli (on Windows 11 if that matters)
  3. Go to your flutter project in my case autologin/example (even not sure if that matters)
  4. Run fluttium new flow foo
  5. Use this three steps:
    - pressOn: "Enter sample data"
    - expectVisible: "Some-Username"
    - expectNotVisible: "Example-P@§$w0rd!"
  6. Execute the flow/test via fluttium test .\foo.yaml

Expected Behavior

A passed test. Actual I get a compile error.

Screenshots

Temp/fluttium_b62c6914/lib/fluttium_test_runner.dart:24:60: Error: Undefined name 'w0rd'.
    UserFlowStep.fromJson({"expectNotVisible":"Example-P@§$w0rd!"}),
                                                           ^^^^
Failed to compile application.

Additional Context

It is cool that you can click on icons when they have a tooltip.

@rekire rekire added the bug Something isn't working label Mar 16, 2024
@rekire
Copy link
Author

rekire commented Mar 17, 2024

My current workaround is to use this \\u0024 as a replacement for the $. Very ugly but it works.

@ZimboPro
Copy link

Is it possible because the text is converted to Regex? According to the docs, the string can also be regex and '$' is used in regex https://fluttium.dev/docs/actions/built-in/expectations

@rekire
Copy link
Author

rekire commented May 20, 2024

The compile error shows that the dollar sign is interpreted for embedding a variable. This is nothing about regular expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants