Connect: add e2e tests for app configuration#64758
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 000261f643
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| await page.waitForLoadState('domcontentloaded'); | ||
|
|
||
| const usageData = page.getByText('Anonymous usage data'); | ||
| await usageData.isVisible(); | ||
| const declineUsageData = page.getByRole('button', { | ||
| name: 'Decline', | ||
| exact: true, | ||
| }); | ||
| await declineUsageData.click(); | ||
|
|
||
| return { app, page, [Symbol.asyncDispose]: async () => app.close() }; |
There was a problem hiding this comment.
Restore usage-consent handling in launchApp
launchApp now returns immediately after domcontentloaded and no longer dismisses the first-run "Anonymous usage data" modal. This changes the behavior for existing callers outside the fixture path (for example e2e/scripts/open-connect.ts, which still calls launchApp(dataDir.path) directly), so on a fresh CONNECT_DATA_DIR the modal can block login() from clicking "Connect" and make the helper script fail/hang. Please keep launchApp robust for fresh profiles (or make all callers seed usageReporting.enabled=false before launching).
Useful? React with 👍 / 👎.
| }) | ||
| ); | ||
| const defaultAppConfig: Record<string, unknown> = { | ||
| 'usageReporting.enabled': false, |
There was a problem hiding this comment.
I added the same setting in my other upcoming PR with tests. But since we're turning it off, I also have a separate test which explicitly removes this from the config and tests that the telemetry dialog is shown on the first launch. I'll try to rebase my stuff over your changes.
000261f to
b9a8a66
Compare
Adds tests for the Configuration section of the test plan:
teleport/.github/ISSUE_TEMPLATE/webtestplan.md
Lines 1154 to 1169 in e9bcb1a
I renamed
apptoelectronAppto avoid names likeapp.app(now it'sapp.electronApp).I also enabled customizing the config file in tests.
Manual Test Plan
My laptop.
Test Cases