MM-52642 CLD-6352 MM-54007 Prepare setup for Playwright pipeline (#24647)
* pipeline(playwright): prepare setup for playwright * feedback address * clean up readme * Fix docker-compose command and definition for dashboard * fix the dashboard * ignore dashboard when formatting --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e9da1ee8ca
Коммит
6746857ee7
28
e2e-tests/.ci/server.run_playwright.sh
Исполняемый файл
28
e2e-tests/.ci/server.run_playwright.sh
Исполняемый файл
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e -u -o pipefail
|
||||
cd "$(dirname "$0")"
|
||||
. .e2erc
|
||||
. .e2erc_setup
|
||||
|
||||
# Initialize Playwright report directory
|
||||
mme2e_log "Prepare Playwright: clean and initialize report and logs directory"
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- playwright bash <<EOF
|
||||
cd e2e-tests/playwright
|
||||
rm -rf logs playwright-report test-results storage_state
|
||||
mkdir -p logs
|
||||
touch logs/mattermost.log
|
||||
EOF
|
||||
|
||||
# Install Playwright dependencies
|
||||
mme2e_log "Prepare Playwright: install dependencies"
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- playwright bash -c "cd e2e-tests/playwright && rm -rf node_modules && npm install --cache /tmp/empty-cache"
|
||||
|
||||
# Enable next line to debug Playwright
|
||||
# export DEBUG=pw:protocol,pw:browser,pw:api
|
||||
|
||||
# Run Playwright test
|
||||
# Note: Run on chrome but eventually will enable to all projects which include firefox and ipad.
|
||||
${MME2E_DC_SERVER} exec -i -u "$MME2E_UID" -- playwright bash -c "cd e2e-tests/playwright && npm run test -- --project=chrome" | tee ../playwright/logs/playwright.log
|
||||
|
||||
# Collect server logs
|
||||
${MME2E_DC_SERVER} logs --no-log-prefix -- server >../playwright/logs/mattermost.log 2>&1
|
||||
Ссылка в новой задаче
Block a user