Appearance
fresh-playwright-project
Fresh Playwright Test project with TypeScript, automatically generated everyday with yarn create playwright
Result
Time spent | 0m 45s |
---|---|
Disk usage | 13 MB |
pwuser@factory:/workspace$ bash -exc 'yarn create playwright fresh-app --quiet --lang=TypeScript --gha --no-browsers
> cd fresh-app
> export PLAYWRIGHT_BROWSERS_PATH=/workspace/pw-browsers # Do not interfere with browsers provided by Docker image
> sudo rm -f /ms-playwright/.docker-info # Trick Playwright that we are not in Docker
> sudo -E yarn playwright install --with-deps # Install browsers because it may be out-of-sync with Playwright image
> yarn playwright test' < /dev/null; echo 'Finished running generator.'
+ yarn create playwright fresh-app --quiet --lang=TypeScript --gha --no-browsers
cd /workspace/fresh-app/playwright-report
yarn create v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-playwright@1.17.124" with binaries:
- create-playwright
[##] 2/2Getting started with writing end-to-end tests with Playwright:
Initializing project in 'fresh-app'
Initializing Yarn project (yarn init -y)…
yarn init v1.22.19
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
success Saved package.json
Done in 0.03s.
Installing Playwright Test (yarn add --dev @playwright/test)…
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 3 new dependencies.
info Direct dependencies
└─ @playwright/test@1.28.1
info All dependencies
├─ @playwright/test@1.28.1
├─ @types/node@18.11.12
└─ playwright-core@1.28.1
Done in 1.38s.
Writing fresh-app/playwright.config.ts.
Writing fresh-app/.github/workflows/playwright.yml.
Writing fresh-app/tests/example.spec.ts.
Writing fresh-app/tests-examples/demo-todo-app.spec.ts.
Writing fresh-app/package.json.
✔ Success! Created a Playwright Test project at /workspace/fresh-app
Inside that directory, you can run several commands:
yarn playwright test
Runs the end-to-end tests.
yarn playwright test --project=chromium
Runs the tests only on Desktop Chrome.
yarn playwright test example
Runs the tests in a specific file.
yarn playwright test --debug
Runs the tests in debug mode.
yarn playwright codegen
Auto generate tests with Codegen.
We suggest that you begin by typing:
cd fresh-app
yarn playwright test
And check out the following files:
- ./fresh-app/tests/example.spec.ts - Example end-to-end test
- ./fresh-app/tests-examples/demo-todo-app.spec.ts - Demo Todo App end-to-end tests
- ./fresh-app/playwright.config.ts - Playwright Test configuration
Visit https://playwright.dev/docs/intro for more information. ✨
Happy hacking! 🎭
Done in 2.29s.
+ cd fresh-app
+ export PLAYWRIGHT_BROWSERS_PATH=/workspace/pw-browsers
+ PLAYWRIGHT_BROWSERS_PATH=/workspace/pw-browsers
+ sudo rm -f /ms-playwright/.docker-info
+ sudo -E yarn playwright install --with-deps
yarn run v1.22.19
$ /workspace/fresh-app/node_modules/.bin/playwright install --with-deps
/opt/factory/bin/screenshot 'http-server' 8080 || true; echo 'Finished taking screenshot.'
exit
Installing dependencies...
Hit:1 https://deb.nodesource.com/node_16.x focal InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [972 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1275 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2353 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2825 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.7 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1772 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.4 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1890 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
Fetched 11.6 MB in 2s (6713 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libfontconfig1' instead of 'libfontconfig'
fonts-liberation is already the newest version (1:1.07.4-11).
libatk1.0-0 is already the newest version (2.35.1-1ubuntu2).
libatspi2.0-0 is already the newest version (2.36.0-2).
libcairo-gobject2 is already the newest version (1.16.0-4ubuntu1).
libcairo2 is already the newest version (1.16.0-4ubuntu1).
libdbus-glib-1-2 is already the newest version (0.110-5fakssync1).
libepoxy0 is already the newest version (1.5.4-1).
libfontconfig1 is already the newest version (2.13.1-2ubuntu3).
libhyphen0 is already the newest version (2.8.8-7).
libnspr4 is already the newest version (2:4.25-1).
libopus0 is already the newest version (1.3.1-0ubuntu1).
libpango-1.0-0 is already the newest version (1.44.7-2ubuntu4).
libpangocairo-1.0-0 is already the newest version (1.44.7-2ubuntu4).
libpangoft2-1.0-0 is already the newest version (1.44.7-2ubuntu4).
libpng16-16 is already the newest version (1.6.37-2).
libsoup2.4-1 is already the newest version (2.70.0-1).
libvpx6 is already the newest version (1.8.2-1build1).
libwoff1 is already the newest version (1.0.2-1build2).
libxcb-shm0 is already the newest version (1.14-2).
libxcb1 is already the newest version (1.14-2).
libxcomposite1 is already the newest version (1:0.4.5-1).
libxcursor1 is already the newest version (1:1.2.0-2).
libxdamage1 is already the newest version (1:1.1.5-2).
libxext6 is already the newest version (2:1.3.4-0ubuntu1).
libxfixes3 is already the newest version (1:5.0.3-2).
libxi6 is already the newest version (2:1.7.10-0ubuntu1).
libxkbcommon0 is already the newest version (0.10.0-1).
libxrandr2 is already the newest version (2:1.5.2-0ubuntu1).
libxrender1 is already the newest version (1:0.9.10-1).
libxshmfence1 is already the newest version (1.3-1).
libxt6 is already the newest version (1:1.1.5-1).
libxtst6 is already the newest version (2:1.2.3-1).
ttf-unifont is already the newest version (1:12.0.01-2).
xfonts-scalable is already the newest version (1:1.0.3-1.1).
fonts-ipafont-gothic is already the newest version (00303-18ubuntu1).
fonts-tlwg-loma-otf is already the newest version (1:0.7.1-3).
fonts-wqy-zenhei is already the newest version (0.9.45-7ubuntu1).
gstreamer1.0-libav is already the newest version (1.16.2-2).
libenchant1c2a is already the newest version (1.6.0-11.3build1).
ttf-ubuntu-font-family is already the newest version (1:0.83-4ubuntu1).
xfonts-cyrillic is already the newest version (1:1.0.4).
fonts-noto-color-emoji is already the newest version (0~20200916-1~ubuntu20.04.1).
gstreamer1.0-plugins-base is already the newest version (1.16.3-0ubuntu1.1).
gstreamer1.0-plugins-good is already the newest version (1.16.3-0ubuntu1.1).
libasound2 is already the newest version (1.2.2-2.1ubuntu2.5).
libatk-bridge2.0-0 is already the newest version (2.34.2-0ubuntu2~20.04.1).
libatomic1 is already the newest version (10.3.0-1ubuntu1~20.04).
libcups2 is already the newest version (2.3.1-9ubuntu1.2).
libdrm2 is already the newest version (2.4.107-8ubuntu1~20.04.2).
libegl1 is already the newest version (1.3.2-1~ubuntu0.20.04.2).
libenchant-2-2 is already the newest version (2.2.8-1ubuntu0.20.04.1).
libevdev2 is already the newest version (1.9.0+dfsg-1ubuntu0.2).
libfreetype6 is already the newest version (2.10.1-2ubuntu0.2).
libgbm1 is already the newest version (21.2.6-0ubuntu0.1~20.04.2).
libgdk-pixbuf2.0-0 is already the newest version (2.40.0+dfsg-3ubuntu0.4).
libgl1 is already the newest version (1.3.2-1~ubuntu0.20.04.2).
libgles2 is already the newest version (1.3.2-1~ubuntu0.20.04.2).
libglib2.0-0 is already the newest version (2.64.6-1~ubuntu20.04.4).
libgstreamer-gl1.0-0 is already the newest version (1.16.3-0ubuntu1.1).
libgstreamer1.0-0 is already the newest version (1.16.3-0ubuntu1.1).
libgtk-3-0 is already the newest version (3.24.20-0ubuntu1.1).
libharfbuzz-icu0 is already the newest version (2.6.4-1ubuntu4.2).
libharfbuzz0b is already the newest version (2.6.4-1ubuntu4.2).
libicu66 is already the newest version (66.1-2ubuntu2.1).
libnotify4 is already the newest version (0.7.9-1ubuntu3.20.04.2).
libnss3 is already the newest version (2:3.49.1-1ubuntu1.8).
libopengl0 is already the newest version (1.3.2-1~ubuntu0.20.04.2).
libopenjp2-7 is already the newest version (2.3.1-1ubuntu4.20.04.1).
libsecret-1-0 is already the newest version (0.20.4-0ubuntu1).
libwayland-client0 is already the newest version (1.18.0-1ubuntu0.1).
libwayland-egl1 is already the newest version (1.18.0-1ubuntu0.1).
libwayland-server0 is already the newest version (1.18.0-1ubuntu0.1).
libwebp6 is already the newest version (0.6.1-2ubuntu0.20.04.1).
libwebpdemux2 is already the newest version (0.6.1-2ubuntu0.20.04.1).
libx11-6 is already the newest version (2:1.6.9-2ubuntu1.2).
libx11-xcb1 is already the newest version (2:1.6.9-2ubuntu1.2).
libxslt1.1 is already the newest version (1.1.34-4ubuntu0.20.04.1).
ffmpeg is already the newest version (7:4.2.7-0ubuntu0.1).
gstreamer1.0-plugins-bad is already the newest version (1.16.3-0ubuntu1).
The following additional packages will be installed:
dbus xserver-common
Recommended packages:
xfonts-base
The following NEW packages will be installed:
libevent-2.1-7
The following packages will be upgraded:
dbus libdbus-1-3 libjpeg-turbo8 libxml2 xserver-common xvfb
6 upgraded, 1 newly installed, 0 to remove and 45 not upgraded.
Need to get 2033 kB of archives.
After this operation, 408 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dbus amd64 1.12.16-2ubuntu2.3 [151 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdbus-1-3 amd64 1.12.16-2ubuntu2.3 [179 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxml2 amd64 2.9.10+dfsg-5ubuntu0.20.04.5 [640 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libevent-2.1-7 amd64 2.1.11-stable-1 [138 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libjpeg-turbo8 amd64 2.0.3-0ubuntu1.20.04.3 [118 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 xserver-common all 2:1.20.13-1ubuntu1~20.04.4 [26.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 xvfb amd64 2:1.20.13-1ubuntu1~20.04.4 [780 kB]
Fetched 2033 kB in 2s (1271 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 33370 files and directories currently installed.)
Preparing to unpack .../0-dbus_1.12.16-2ubuntu2.3_amd64.deb ...
Unpacking dbus (1.12.16-2ubuntu2.3) over (1.12.16-2ubuntu2.2) ...
Preparing to unpack .../1-libdbus-1-3_1.12.16-2ubuntu2.3_amd64.deb ...
Unpacking libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) over (1.12.16-2ubuntu2.2) ...
Preparing to unpack .../2-libxml2_2.9.10+dfsg-5ubuntu0.20.04.5_amd64.deb ...
Unpacking libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.5) over (2.9.10+dfsg-5ubuntu0.20.04.4) ...
Selecting previously unselected package libevent-2.1-7:amd64.
Preparing to unpack .../3-libevent-2.1-7_2.1.11-stable-1_amd64.deb ...
Unpacking libevent-2.1-7:amd64 (2.1.11-stable-1) ...
Preparing to unpack .../4-libjpeg-turbo8_2.0.3-0ubuntu1.20.04.3_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (2.0.3-0ubuntu1.20.04.3) over (2.0.3-0ubuntu1.20.04.1) ...
Preparing to unpack .../5-xserver-common_2%3a1.20.13-1ubuntu1~20.04.4_all.deb ...
Unpacking xserver-common (2:1.20.13-1ubuntu1~20.04.4) over (2:1.20.13-1ubuntu1~20.04.3) ...
Preparing to unpack .../6-xvfb_2%3a1.20.13-1ubuntu1~20.04.4_amd64.deb ...
Unpacking xvfb (2:1.20.13-1ubuntu1~20.04.4) over (2:1.20.13-1ubuntu1~20.04.3) ...
Setting up libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) ...
Setting up dbus (1.12.16-2ubuntu2.3) ...
Setting up libevent-2.1-7:amd64 (2.1.11-stable-1) ...
Setting up libjpeg-turbo8:amd64 (2.0.3-0ubuntu1.20.04.3) ...
Setting up xserver-common (2:1.20.13-1ubuntu1~20.04.4) ...
Setting up libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.5) ...
Setting up xvfb (2:1.20.13-1ubuntu1~20.04.4) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Downloading Chromium 108.0.5359.29 (playwright build v1033) from https://playwright.azureedge.net/builds/chromium/1033/chromium-linux.zip
138.8 Mb [====================] 100% 0.0s
Chromium 108.0.5359.29 (playwright build v1033) downloaded to /workspace/pw-browsers/chromium-1033
Downloading FFMPEG playwright build v1008 from https://playwright.azureedge.net/builds/ffmpeg/1008/ffmpeg-linux.zip
2.6 Mb [====================] 100% 0.0s
FFMPEG playwright build v1008 downloaded to /workspace/pw-browsers/ffmpeg-1008
Downloading Firefox 106.0 (playwright build v1364) from https://playwright.azureedge.net/builds/firefox/1364/firefox-ubuntu-20.04.zip
77.6 Mb [====================] 100% 0.0s
Firefox 106.0 (playwright build v1364) downloaded to /workspace/pw-browsers/firefox-1364
Downloading Webkit 16.4 (playwright build v1735) from https://playwright.azureedge.net/builds/webkit/1735/webkit-ubuntu-20.04.zip
88.4 Mb [====================] 100% 0.0s
Webkit 16.4 (playwright build v1735) downloaded to /workspace/pw-browsers/webkit-1735
Done in 21.06s.
+ yarn playwright test
yarn run v1.22.19
$ /workspace/fresh-app/node_modules/.bin/playwright test
Running 3 tests using 1 worker
3 passed (10s)
To open last HTML report run:
npx playwright show-report
Done in 10.28s.
Finished running generator.
pwuser@factory:/workspace$ cd /workspace/fresh-app/playwright-report
pwuser@factory:/workspace/fresh-app/playwright-report$ /opt/factory/bin/screenshot 'http-server' 8080 || true; echo 'Finished taking screenshot.'
+ start-test http-server :8080 'cd /workspace && (playwright screenshot --viewport-size=1280,720 http://localhost:8080 /workspace/screenshot.png; playwright screenshot --viewport-size=1280,720 --wait-for-timeout=4096 http://localhost:8080 /workspace/screenshot.png)'
1: starting server using command "http-server"
and when url "[ 'http://localhost:8080' ]" is responding with HTTP status code 200
running tests using command "cd /workspace && (playwright screenshot --viewport-size=1280,720 http://localhost:8080 /workspace/screenshot.png; playwright screenshot --viewport-size=1280,720 --wait-for-timeout=4096 http://localhost:8080 /workspace/screenshot.png)"
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://127.0.0.1:8080
http://172.17.0.3:8080
Hit CTRL-C to stop the server
[2022-12-09T00:31:51.647Z] "HEAD /" "axios/0.21.4"
(node:1467) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
Navigating to http://localhost:8080
[2022-12-09T00:31:52.201Z] "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/106.0.5249.30 Safari/537.36"
Capturing screenshot into /workspace/screenshot.png
Navigating to http://localhost:8080
[2022-12-09T00:31:53.025Z] "GET /" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/106.0.5249.30 Safari/537.36"
Waiting for timeout 4096...
Capturing screenshot into /workspace/screenshot.png
http-server stopped.
Finished taking screenshot.
pwuser@factory:/workspace/fresh-app/playwright-report$ exit
exit