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

Restructure UI Tests to rely on Firestore Seeding #59

Closed
1 task done
nriedman opened this issue Aug 5, 2024 · 2 comments
Closed
1 task done

Restructure UI Tests to rely on Firestore Seeding #59

nriedman opened this issue Aug 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@nriedman
Copy link
Contributor

nriedman commented Aug 5, 2024

Problem

@pauljohanneskraft recently merged seeding functionality into StanfordBDHG/ENGAGE-HF-Firebase that will allow us to fill the emulators with mock data. However, our CI build currently does not use the StanfordBDHG/ENGAGE-HF-Firebase emulator. This is a blocking issue for testing views such as Education that rely on static data from the seeding function.

Solution

Restructure the build-and-test job to clone the main branch of StanfordBDHG/ENGAGE-HF-Firebase, then start the emulator using the seeding function as described in the StanfordBDHG/ENGAGE-HF-Firebase documentation. Then, refactor the existing UI Tests to be compatible with the new emulator. Finally, write Unit Tests for the Education section targeting VideoManager / decoding videos from Firestore.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@nriedman nriedman added the enhancement New feature or request label Aug 5, 2024
@nriedman nriedman mentioned this issue Aug 5, 2024
1 task
@Supereg
Copy link
Member

Supereg commented Aug 5, 2024

To ensure UI test continue to work on the local machine, I would suggest to include the Firebase repo as a git submodule and update the checkout action to clone submodules. This might be an easy change in our. Build action hosted in the global .github repository.
What do you think?

@nriedman
Copy link
Contributor Author

nriedman commented Aug 5, 2024

That sounds great @Supereg. @pauljohanneskraft had started with a slightly different approach in #24, but after discussing with him I think I'll go with the submodule route -- it seems like this use case is pretty much exactly what that's for!

nriedman added a commit that referenced this issue Aug 6, 2024
# Educational Videos Page

## ♻️ Current situation & Problem
We are in need of a view for displaying educational videos. Certain
tasks associated with messages will be to watch a video, and "more
information" buttons in the Medications view links to the videos as
well. Before we can implement these features, we need videos to
reference.


## ⚙️ Release Notes 
- Implemented an environment-accessible VideoManager module that
downloads the static videos data from Firestore on sign in.
- Built out the Education tab with a sectioned-list style UI. Each
section is expandable and features a header and a collection of video
thumbnails.
- The video thumbnails are linked to a view that has an embedded video
and a description of the contents of the video.
- Implemented the asynchronous components (fetching videos and
thumbnails) with state/error handling and progress views.

The Education tab now looks like this:

|  Education Page  |  Video View    |   With Video Descriptions   |
| --- | --- | --- |
|
![expanded-no-description](https://github.com/user-attachments/assets/8d9c4b58-4cb3-470c-81c3-35e6fd1f4534)
|
![loaded-video](https://github.com/user-attachments/assets/df9abee4-8fef-4b38-a1d3-61dafcdbe89e)
|
![expanded-with-descriptions](https://github.com/user-attachments/assets/c8ea5a66-e42d-4a16-830a-4567e118350e)
|
|
![scrolled-down](https://github.com/user-attachments/assets/e7861c2b-51f6-4d81-a18c-592f742f0af1)
|
![loading-video](https://github.com/user-attachments/assets/012e45ef-e38c-43b2-b51b-eca804b03b25)
|
![video-short-description](https://github.com/user-attachments/assets/e912dd0d-5b8b-42d4-87a2-804e67668cbc)
|
|
![all-collapsed](https://github.com/user-attachments/assets/6456184f-b517-4a74-a300-0bbdebb12b55)
|
![video-full-screen](https://github.com/user-attachments/assets/2829bd8b-87eb-46cb-a635-6f75c65e56df)
|
![video-long-description](https://github.com/user-attachments/assets/c7e54529-d85c-49b1-9583-113d3f805e53)
|


## 📚 Documentation
Note: At the moment, the server does not contain descriptions for the
videos, so no videos will feature descriptions.


## ✅ Testing
Note: At the moment, testing decoding videos from Firestore is not
possible until the emulator in the build-and-test job of the CI is
seeded by the new seeding functionality in
StanfordBDHG/ENGAGE-HF-Firebase. Testing the VideoManager's
functionality will be complete with a Unit test once the server seeding
data feature is integrated into the iOS CI (see #59). Until then, UI
tests are done by skipping decoding the videos from the emulator.


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [X] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants