Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
193 Mock Test Auth & 2 tests from 192 #197
193 Mock Test Auth & 2 tests from 192 #197
Changes from 11 commits
b2b31de
0f63749
eff04f8
e4a5d25
bfc8de8
6c82419
8502bfa
44a1e5e
7f80cd9
b74deea
fe85471
e5e2bb2
42adb27
a7f0fce
b44a746
c29c212
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that the wcl has been updated to display text when we have no requests, can that test be added too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was going to do that in a separate PR because i needed to figure out how and it was going to take a while. Since the e2e tests look at the db itself and use the real backend, and I already have requests, i also will not be able to check if a test like that is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, went ahead and included a check for this, but this is just checking that either of these elements exist when the user is signed in vs. saying that it needs to know whether or not a user has requests on their request list or not.
i think if we wanted to do the latter we would need to test the data itself, which isn't done with cypress out of the box but theres an add on called
cypress-react-selector
where we could potentially be able to do something like this.heres an example of how it could be used: https://glebbahmutov.com/blog/react-state-from-e2e-tests/
but this is more in depth and should probably be a separate ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is mock data not an option?
the current implementation is ok for now, but it should be expanded in the future. although the tests says it's checking for the existence of requests or a "no requests" message....it isn't. since we don't have a use case where tests exist, the "no requests" route is the only one that will ever return true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a way with cypress
fixtures
- if we did that and only wanted to use mock data, we would need to mock every single api call- this is an example of that: https://blog.bitsrc.io/mocking-http-calls-in-cypress-end-to-end-tests-fa2e6b7caaf7it can be done but it isn't really in the scope of this ticket