Replies: 1 comment
-
In general, tests should not depend on one another. It's a bad thing. For this reason (and a few and other), you cannot nest patrolTest() in one another. What I suggest is to extract the common sign-in logic to a function. Then you'll be able to simply call that function at the beginning of a test. There's also another solution: you can pump your app in a state with a dummy user already signed in. That's more involved and easier to get wrong, but it's definitely possible, and might make sense if the sign-in process is long. But bear in mind that in this case your test won't be truly end-to-end. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating integration tests of our app, every test will need to do the same redundant task of logging in to the app which will result in a lot of code duplication. Is there a way for a patrolTest function to call upon another function which calls a patrolTest function? Like this:
The code above doesn't seem to work. How could I do this?
Beta Was this translation helpful? Give feedback.
All reactions