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

Edit Item Espresso tests and Add method to mock Items for Firestore test users #57

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

owencooke
Copy link
Contributor

@owencooke owencooke commented Nov 9, 2023

Describe your changes

This PR accomplishes the following:

  • adds Espresso tests for the Edit Item page
  • adds a method for creating a test item in the auto-generated Firebase test user's items
  • replaces waitForView with a more general waitFor method, to prevent tests failing due to slow Firebase updates

Issue ticket number and link

This PR addresses: #14

Checklist before requesting a review

  • I have performed a self-review of my code
  • Necessary java docs are present
  • Necessary UML diagrams are created
  • Necessary tests are written

@owencooke owencooke marked this pull request as ready for review November 9, 2023 20:29
@owencooke
Copy link
Contributor Author

@ldbonkowski here's the method to mock an item in Firebase. Lemme know ur thoughts

@owencooke owencooke self-assigned this Nov 9, 2023
Copy link
Contributor

@ldbonkowski ldbonkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why things are failing on the runners, provided you can pass the checks everything looks good to me

…able

This is an attempt to fix issues where Espresso tries to check Views before Firebase snapshot updates
@owencooke
Copy link
Contributor Author

@ldbonkowski texts go green 🟢.

A re-review would be lovely. I've decided to change waitForView to just a general waitFor that takes a lambda function and tries running it multiple times within a 10s timeout.

This way we can just pass any Espresso statement(s) we like into this method, when we know there's a chance the Firebase updates might be slow.

Copy link
Contributor

@ldbonkowski ldbonkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@MatthewNeufeld MatthewNeufeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff @owencooke. Just don't forget UML diagrams :)

@MatthewNeufeld MatthewNeufeld merged commit 67b37b4 into main Nov 10, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants