Skip to content

Commit

Permalink
DEV-897 Add Qase reporter for end-to-end tests (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdoof authored Jul 11, 2024
1 parent ec2025b commit 29f1d26
Show file tree
Hide file tree
Showing 7 changed files with 310 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-app-router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ jobs:
TEST_USER_AUTH0_ID: ${{ secrets.TEST_USER_AUTH0_ID }}
TEST_USER_EMAIL: ${{ secrets.TEST_USER_EMAIL }}
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
QASE_MODE: ${{ vars.QASE_MODE }}
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TESTOPS_API_TOKEN }}

unit-tests:
name: Unit Tests
Expand Down
4 changes: 4 additions & 0 deletions web/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ TEST_USER_EMAIL=
TEST_USER_PASSWORD=

APP_ENV=dev

# Qase
QASE_MODE=off
QASE_TESTOPS_API_TOKEN=
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"@apollo/client": "3.9.0-rc.1",
"@apollo/experimental-nextjs-app-support": "^0.8.0",
"@auth0/nextjs-auth0": "^3.5.0",
"@aws-sdk/client-cloudfront": "^3.504.0",
"@aws-sdk/client-kms": "^3.496.0",
"@aws-sdk/client-s3": "^3.504.0",
"@aws-sdk/s3-presigned-post": "^3.504.0",
"@aws-sdk/s3-request-presigner": "^3.504.0",
"@aws-sdk/client-cloudfront": "^3.504.0",
"@ethersproject/abi": "^5.7.0",
"@floating-ui/react": "^0.26.9",
"@headlessui/react": "^1.7.18",
Expand Down Expand Up @@ -36,6 +36,7 @@
"next": "14.2.3",
"next-safe": "^3.5.0",
"next-useragent": "^2.8.0",
"playwright-qase-reporter": "^2.0.6",
"posthog-js": "^1.105.6",
"posthog-node": "^4.0.0",
"react": "^18",
Expand Down
24 changes: 20 additions & 4 deletions web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ dotenv.config({ path: path.join(__dirname, ".env.test") });

const config: PlaywrightTestConfig = {
timeout: 60000,
globalSetup: require.resolve("./tests/e2e/global-setup"),
globalTeardown: require.resolve("./tests/e2e/global-teardown"),
globalSetup: require.resolve("tests/e2e/global-setup"),
globalTeardown: require.resolve("tests/e2e/global-teardown"),
workers: 1,
use: {
baseURL: process.env.NEXT_PUBLIC_APP_URL,
browserName: "chromium",
screenshot: "off",
screenshot: "only-on-failure",
video: "retain-on-failure",
trace: "retain-on-failure",
},
Expand All @@ -27,7 +27,23 @@ const config: PlaywrightTestConfig = {
testMatch: ["tests/e2e/specs/**/*.spec.ts"],
},
],
reporter: [["list"], ["html", { open: "never" }]],
reporter: [
["list"],
["html", { open: "never" }],
[
"playwright-qase-reporter",
{
environment: "dev",
testops: {
project: "DP",
uploadAttachments: true,
run: {
complete: true,
},
},
},
],
],
webServer: {
command: "pnpm dev",
port: 3000,
Expand Down
Loading

0 comments on commit 29f1d26

Please sign in to comment.