Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

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

Closed tschaffter closed 9 months ago

tschaffter commented 9 months ago

What product(s) is this story for?

OpenChallenges

As a user, I want

No response

Description

See notes from #2379

Benefits:

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?

tschaffter commented 9 months ago

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

tschaffter commented 9 months ago

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 playwright@1.40.1 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 commented 9 months ago

Several browsers can be installed with a single command:

npx playwright@1.40.1 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