Commit 04bb861
RHCLOUD-46356: test: integrate playwright-test-auth package for e2e authentication (#882)
* test: integrate playwright-test-auth package for e2e authentication
Migrates Playwright E2E tests to use the @redhat-cloud-services/playwright-test-auth
package, which provides centralized Red Hat SSO authentication handling. This change
improves test performance by authenticating once during global setup instead of
repeating the login flow in each test.
Changes:
- Added @redhat-cloud-services/playwright-test-auth as dev dependency
- Updated @playwright/test from 1.58.2 to 1.59.1 (aligning with package requirements)
- Updated playwright.config.ts to use package's global-setup
- Removed custom playwright/global-setup.ts (replaced by package implementation)
- Removed custom playwright/helpers/auth.ts (replaced by package utilities)
- Updated LandingPage.ts to use disableCookiePrompt from the package
- Updated Tekton pipeline to use mcr.microsoft.com/playwright:v1.59.1-noble
- Enhanced README.md with detailed Playwright testing documentation
Benefits:
- Faster test execution: Authentication happens once instead of per test
- Reduced code: ~100 lines of custom auth logic replaced by package import
- Better consistency: Shared authentication utilities across all Red Hat projects
- Simpler maintenance: Auth improvements benefit all consumers automatically
- Version alignment: NPM package and Docker image versions now match
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: add maxFailures=2 to playwright config
Stop test execution after 2 failures to fail fast and reduce CI time when
there are systemic issues.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: disable retries in playwright config
Set retries to 0 to keep test logging clean and avoid cluttered output.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: restrict playwright to single worker
Use single worker to avoid race conditions and ensure consistent test execution.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: skip flaky integrations-widget spec
Temporarily skip the integrations-widget tests due to flakiness in CI.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 3ee3d1e commit 04bb861
9 files changed
Lines changed: 56 additions & 155 deletions
File tree
- .tekton
- playwright
- e2e
- helpers
- pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| 69 | + | |
| 70 | + | |
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
| |||
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
52 | 47 | | |
53 | 48 | | |
54 | 49 | | |
55 | | - | |
| 50 | + | |
56 | 51 | | |
57 | 52 | | |
58 | 53 | | |
| |||
0 commit comments