Skip to content

Add writing-tests-guidelines.md (#612) #613

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

Draft
wants to merge 10 commits into
base: next
Choose a base branch
from

Conversation

lukasbriza
Copy link
Collaborator

@lukasbriza lukasbriza commented Mar 21, 2025

Add new guideline to supply contributor with information how to write playwright tests in RUI.

Closes #612

@lukasbriza lukasbriza added the documentation Improvements or additions to documentation label Mar 21, 2025
@lukasbriza lukasbriza self-assigned this Mar 21, 2025
@lukasbriza lukasbriza requested a review from adamkudrna as a code owner March 21, 2025 11:13
Copy link
Member

@adamkudrna adamkudrna left a comment

Choose a reason for hiding this comment

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

Looks good! I just don't feel quialified for a ✅.

@lukasbriza lukasbriza requested a review from adamkudrna March 25, 2025 07:31
@lukasbriza lukasbriza force-pushed the documentation/playwright-test-rules-documentation branch from b876af0 to 4789b79 Compare April 1, 2025 06:59
@bedrich-schindler bedrich-schindler marked this pull request as draft April 7, 2025 11:50
Base automatically changed from task/587 to next April 15, 2025 11:09
An error occurred while trying to automatically change base from task/587 to next April 15, 2025 11:09
bedrich-schindler and others added 8 commits May 7, 2025 07:04
I introduced Playwright Component Testing as replacement for Jest and RTL.

Those tests must be run within `playwright` docker container with pre-installed
browsers to ensure uniform testing environment. `.env.playwright` is created
using `postinstall` script to follow zero-config setup. `.env.playwright` can
be used to tweak parameters for local development if needed.

`.env` newly contains Playwright related configuration for Docker.

Currently, only tests for `Alert` and `Button` components are migrated to
Playwright CT as this commit is supposed to be proof-of-concept. Rest should
be migrated in later pull request.

All visual tests use prop tests concept we already have for Jest to simplify
testing and to make it DRY. `mixPropTests()` is introduced to mix those
to create combinations to be tested.

New Github workflow is introduced to test only Playwright as it can be
time exhausting. Further improvements are expected to be make in the future.
Transform Playwright related files to Typescript and introduce temporary
configuration files `.eslintrc-ts`, `jest.config-ts.js` and `tsconfig.json`
that must be removed when whole package is transformed into Playwright.

Due to missing TypeScript support in the rest of the package, `*.spec.tsx`
and `*.story.tsx` file do not have complete types and might not be compatible
with strict type checking that should be introduced in #394.

The reason for such change is parallel work on transformation to TypeScript
and on Playwright tests.
@lukasbriza lukasbriza force-pushed the documentation/playwright-test-rules-documentation branch from 9716472 to af0cc33 Compare May 9, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants