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

Add frontend tests #71

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Add frontend tests #71

merged 3 commits into from
Jul 11, 2024

Conversation

Firebird1029
Copy link
Member

@Firebird1029 Firebird1029 commented Jul 8, 2024

Add frontend tests

Problem

Currently, the Electron app frontend lacks frontend tests.

Solution

This PR adds some frontend tests to ensure the Electron app works correctly.

Result

To run the tests:

cd frontend
npx playwright test

To install the tests (once):

cd frontend
npm install
npx playwright install

Signed-off-by: Brandon Yee <6111102+Firebird1029@users.noreply.github.com>
Signed-off-by: Brandon Yee <6111102+Firebird1029@users.noreply.github.com>
Copy link
Collaborator

@natalialuzuriaga natalialuzuriaga left a comment

Choose a reason for hiding this comment

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

Solid work Brandon 🔥 Definitely would like to get Pat's thoughts on the download test before we merge this in

frontend/tests/frontend.spec.js Show resolved Hide resolved
frontend/tests/frontend.spec.js Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
Copy link
Contributor

@patsier-cms patsier-cms left a comment

Choose a reason for hiding this comment

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

This is looking great! I have a few comments but in general I was able to run this easily and the tests seam reasonable

frontend/package.json Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
frontend/tests/frontend.spec.js Outdated Show resolved Hide resolved
Signed-off-by: Brandon Yee <6111102+Firebird1029@users.noreply.github.com>
Copy link
Contributor

@patsier-cms patsier-cms left a comment

Choose a reason for hiding this comment

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

Great work on this! One thing I'm realizing I missed is adding this to the GitHub Actions frontend-checks. There may be separate issues with that though, so it could make the most sense to add in a separate PR

@Firebird1029
Copy link
Member Author

Yeah, I discussed it with Natalia, I originally added it to frontend-checks but couldn't figure it out since Electron requires a GUI to test but the Ubuntu Github Actions servers don't have GUIs by default. Should be possible but might need some time to figure out.

@patsier-cms
Copy link
Contributor

@Firebird1029 let's definitely split this out, but you should be able to use a headless browser specifically for this, and playwright has built-in support. Happy to set up some time to talk through it a bit more

Copy link
Collaborator

@natalialuzuriaga natalialuzuriaga left a comment

Choose a reason for hiding this comment

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

LGTM 🙌

@IsaacMilarky IsaacMilarky merged commit 65f7115 into dev Jul 11, 2024
8 of 9 checks passed
@Firebird1029 Firebird1029 deleted the frontend-tests-2 branch July 11, 2024 18:15
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.

4 participants