Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Nov 26, 2024
1 parent 48bd8ad commit b8ec784
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 6 additions & 8 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,9 @@ def e2eTests(ctx):
"image": OC_CI_NODEJS,
"environment": environment,
"commands": [
"chromium_path=$(find .playwright -type f -path '.playwright/chromium-*/chrome-linux/chrome' | head -n 1)",
"cd tests/e2e",
command,
"BROWSERS_PATH=/var/www/owncloud/web/$chromium_path" + command,
],
}] + \
uploadTracingResult(ctx) + \
Expand Down Expand Up @@ -1836,6 +1837,7 @@ def e2eTestsOnKeycloak(ctx):

steps = restoreBuildArtifactCache(ctx, "pnpm", ".pnpm-store") + \
installPnpm() + \
restorePlaywrightChromiumCache() + \
keycloakService() + \
restoreBuildArtifactCache(ctx, "web-dist", "dist")
if ctx.build.event == "cron":
Expand Down Expand Up @@ -1871,13 +1873,12 @@ def e2eTestsOnKeycloak(ctx):
"REPORT_TRACING": "with-tracing" in ctx.build.title.lower(),
"KEYCLOAK": "true",
"KEYCLOAK_HOST": "keycloak:8443",
"PLAYWRIGHT_BROWSERS_PATH": "/.playwright",
},
"commands": [
"pwd",
"ls -al",
"chromium_path=$(find .playwright -type f -path '.playwright/chromium-*/chrome-linux/chrome' | head -n 1)",
"ls -al .playwright",
"cd tests/e2e",
"bash run-e2e.sh %s" % " ".join(["cucumber/features/" + tests for tests in e2e_Keycloak_tests]),
"BROWSERS_PATH=/var/www/owncloud/web/$chromium_path bash run-e2e.sh %s" % " ".join(["cucumber/features/" + tests for tests in e2e_Keycloak_tests]),
],
},
] + \
Expand Down Expand Up @@ -1936,7 +1937,6 @@ def checkPlaywrightChromiumCache():
"image": MINIO_MC,
"environment": minio_mc_environment,
"commands": [
"ls -al",
"mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
"mc ls --recursive s3/$CACHE_BUCKET/web",
"bash tests/drone/script.sh check_playwright_cache",
Expand All @@ -1949,10 +1949,8 @@ def restorePlaywrightChromiumCache():
"image": MINIO_MC,
"environment": minio_mc_environment,
"commands": [
"ls -al",
"playwright_version=$(grep '\"@playwright/test\":' \"package.json\" | cut -d':' -f2 | tr -d '\", ')",
"mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
"mc cp -r -a s3/$CACHE_BUCKET/web/$playwright_version/.playwright %s" % dir["web"],
"ls -al",
],
}]
3 changes: 2 additions & 1 deletion tests/e2e/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ export const config = {
reportVideo: process.env.REPORT_VIDEO === 'true',
reportHar: process.env.REPORT_HAR === 'true',
reportTracing: process.env.REPORT_TRACING === 'true',
failOnUncaughtConsoleError: process.env.FAIL_ON_UNCAUGHT_CONSOLE_ERR === 'true'
failOnUncaughtConsoleError: process.env.FAIL_ON_UNCAUGHT_CONSOLE_ERR === 'true',
browserPath: process.env.BROWSERS_PATH || undefined
}
3 changes: 2 additions & 1 deletion tests/e2e/cucumber/environment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ BeforeAll(async (): Promise<void> => {
'media.navigator.streams.fake': true,
'media.navigator.permission.disabled': true
},
headless: config.headless
headless: config.headless,
executablePath: config.browserPath
}

const browsers: Record<string, () => Promise<Browser>> = {
Expand Down

0 comments on commit b8ec784

Please sign in to comment.