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

[Story] Add system dependencies required to run e2e test for chromium, FF and webkit to the dev container #2387

Closed
1 task done
Tracked by #2618
tschaffter opened this issue Dec 5, 2023 · 3 comments · Fixed by #2391
Closed
1 task done
Tracked by #2618
Assignees
Labels
dev/devcontainer Development environment and containers frontend Frontend development test

Comments

@tschaffter
Copy link
Member

What product(s) is this story for?

OpenChallenges

As a user, I want

No response

Description

See notes from #2379

Benefits:

  • Dependencies comes pre-installed for the developers
  • Dependencies comes pre-installed for the CI workflow, which will speed it up

I'm considering leaving out the dependencies for Chrome and Edge because of some behavior documented in #2379 that could reduce the DX.

Acceptance criteria

No response

Tasks

No response

Anything else?

No response

Have you linked this story to a GitHub Project?

  • I have linked this story to a GitHub Project and set its metadata.
@tschaffter tschaffter added frontend Frontend development dev/devcontainer Development environment and containers test labels Dec 5, 2023
@tschaffter tschaffter self-assigned this Dec 5, 2023
@tschaffter
Copy link
Member Author

Consider updating the min version of VS Code at the same time.

@tschaffter
Copy link
Member Author

The following message is displayed when installing the browsers from home (repo folder not yet available in the dev container Dockerfile):

vscode@9f210d49fa49:~$ npx --yes [email protected] install --with-deps firefox
╔═══════════════════════════════════════════════════════════════════════════════╗
║ WARNING: It looks like you are running 'npx playwright install' without first ║
║ installing your project's dependencies.                                       ║
║                                                                               ║
║ To avoid unexpected behavior, please install your dependencies first, and     ║
║ then run Playwright's install command:                                        ║
║                                                                               ║
║     npm install                                                               ║
║     npx playwright install                                                    ║
║                                                                               ║
║ If your project does not yet depend on Playwright, first install the          ║
║ applicable npm package (most commonly @playwright/test), and                  ║
║ then run Playwright's install command to download the browsers:               ║
║                                                                               ║
║     npm install @playwright/test                                              ║
║     npx playwright install                                                    ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝

@tschaffter
Copy link
Member Author

tschaffter commented Dec 5, 2023

Several browsers can be installed with a single command:

npx [email protected] install --with-deps firefox chromium webkit

To get the list of system packages installed:

$ npx playwright install --with-deps firefox --dry-run
sudo -- sh -c "apt-get update&& apt-get install -y --no-install-recommends ffmpeg libasound2 libatk1.0-0 libcairo-gobject2 libcairo2 libdbus-1-3 libdbus-glib-1-2 libfontconfig1 libfreetype6 libgdk-pixbuf-2.0-0 libglib2.0-0 libgtk-3-0 libpango-1.0-0 libpangocairo-1.0-0 libx11-6 libx11-xcb1 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxtst6 xvfb fonts-noto-color-emoji fonts-unifont xfonts-cyrillic xfonts-scalable fonts-liberation fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf fonts-freefont-ttf"
browser: firefox version 119.0
  Install location:    /home/vscode/.cache/ms-playwright/firefox-1429
  Download url:        https://playwright.azureedge.net/builds/firefox/1429/firefox-ubuntu-22.04.zip
  Download fallback 1: https://playwright-akamai.azureedge.net/builds/firefox/1429/firefox-ubuntu-22.04.zip
  Download fallback 2: https://playwright-verizon.azureedge.net/builds/firefox/1429/firefox-ubuntu-22.04.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/devcontainer Development environment and containers frontend Frontend development test
Projects
None yet
1 participant