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

Run e2e tests in docker #4563

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Run e2e tests in docker #4563

wants to merge 5 commits into from

Conversation

nicodh
Copy link
Member

@nicodh nicodh commented Jan 26, 2025

Reduced Dockerfile

Use only Chrome as playwright project to reduce test duration:

  • webkit does not yet support clipboard access in playwright
  • firefox will probably never be used (in tauri)

- use appropriate UID & GID
- reduce data on image
- avoid unneeded data in working dir
.dockerignore Outdated Show resolved Hide resolved
docs/E2E-TESTING.md Outdated Show resolved Hide resolved
docs/E2E-TESTING.md Outdated Show resolved Hide resolved
packages/e2e-tests/Dockerfile Outdated Show resolved Hide resolved
packages/e2e-tests/Dockerfile Outdated Show resolved Hide resolved
packages/e2e-tests/Dockerfile Show resolved Hide resolved
packages/e2e-tests/Dockerfile Outdated Show resolved Hide resolved
docker-compose.e2e-tests.yml Show resolved Hide resolved
@nicodh nicodh marked this pull request as draft January 27, 2025 12:22
@nicodh nicodh marked this pull request as ready for review January 28, 2025 11:42
@nicodh nicodh requested a review from WofWca January 28, 2025 11:43
@Simon-Laux
Copy link
Member

webkit does not yet support clipboard access in playwright

you could also do:

  • ignore clipboard dependent tests on webkit but run the other tests
  • provide a different runtime while the browser version is in testing -> a testing runtime.js that mocks the clipboard access (and let's you control it from playwright)

Comment on lines +9 to +11
# add a user "noone" with the same uid and gid as the host user
RUN groupadd -g $gid -o noone
RUN useradd -ms /bin/bash -u $uid -g $gid noone
Copy link
Collaborator

@WofWca WofWca Jan 28, 2025

Choose a reason for hiding this comment

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

I can see that this now doesn't override node_modules. Very nice. But still, what files does this write? Why do we need this? Is this the HTML report file that Playwright generates? Wouldn't it be better to keep it in the container instead of writing to host? Using the outputFolder option.

@nicodh nicodh marked this pull request as draft January 28, 2025 15:23
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