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

[Maintenance] Move unit testing for frontend components to real browser backend #357

Open
2 tasks done
devtobi opened this issue Sep 19, 2024 · 1 comment
Open
2 tasks done
Labels
Priority: Medium The issue contains work with medium priority. Template: Frontend Issues regarding the frontend template. Template: Webcomponent Issues regarding the webcomponent template. Type: Maintenance The issue contains maintenance work.

Comments

@devtobi
Copy link
Member

devtobi commented Sep 19, 2024

Relevant template

refarch-frontend, refarch-webcomponent

Problem description (optional)

We are currently using jsdom as a DOM implementation when running Unit tests for Vue components.
However jsdom only tries to mimic a real browser and does not 100% behave like a real one.
That's where https://vitest.dev/guide/browser/ and https://github.com/vitest-dev/vitest-browser-vue can help out by allowing the unit tests to be run in a real browser (headless or via Cypress-like UI).

The usage of this library has to be evaluated. It's especially interesting to check if it can run properly in an CI/CD environment like GitHub Actions.

Desired solution

Move from jsdom based DOM implementation to a real browser using https://vitest.dev/guide/browser/ and https://github.com/vitest-dev/vitest-browser-vue

Considered alternatives (optional)

No response

Additional context (optional)

No response

No duplicate

  • I confirm that this issue is not a duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct
@devtobi devtobi added Template: Webcomponent Issues regarding the webcomponent template. Template: Frontend Issues regarding the frontend template. Type: Maintenance The issue contains maintenance work. Priority: Medium The issue contains work with medium priority. labels Sep 19, 2024
@devtobi
Copy link
Member Author

devtobi commented Sep 19, 2024

Settings this to blocked for now because usage of Vite Browser Mode is currently only "experimental" and no stable API is provided yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium The issue contains work with medium priority. Template: Frontend Issues regarding the frontend template. Template: Webcomponent Issues regarding the webcomponent template. Type: Maintenance The issue contains maintenance work.
Projects
Status: Blocked
Development

No branches or pull requests

1 participant