Repository navigation
test: cover the cloud auth surface - #14987
Conversation
Adds the missing coverage for the cloud sign-in and sign-up surface: the route guards and their switchAccount escape hatch, the post-auth redirect and its open-redirect guard, the sign-in password schema, the terms notice, the sign-in form's validation and autofill affordances, and the turnstile gate on sign-up. Also adds e2e for deep-link intent, the already-signed-in pass-through, and the switchAccount hatch, mocked at the network boundary.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded unit, component, route, and Playwright coverage for authentication validation, cloud onboarding, redirects, route guards, accessibility, security-state rendering, and account switching. ChangesAuthentication tests
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The e2e counterpart to the inline sign-in error. Kept here rather than in the fix branch because the spec file and its Firebase mocks only exist on this branch.
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1818 passed, 0 failed · 8 flaky📊 Browser Reports
📦 Bundle: 8.85 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.71 kB (baseline 3.71 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.37 MB (baseline 1.37 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 17 unchanged Panels & Settings — 566 kB (baseline 566 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 26 unchanged User & Accounts — 27.7 kB (baseline 27.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks Status: 14 unchanged Data & Services — 3.52 MB (baseline 3.52 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 550 kB (baseline 550 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 38 unchanged Vendor & Third-Party — 16.8 MB (baseline 16.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 14.2 MB (baseline 14.2 MB) • ⚪ 0 BBundles that do not match a named category Status: 285 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-18T16:47:17.819Z",
"gitSha": "b97747367bdd0a603254e15d924cd86818a213f7",
"branch": "test/cloud-auth-coverage-standalone",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2062.0030000000042,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.109,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 503.049,
"heapDeltaBytes": 19270552,
"heapUsedBytes": 80419340,
"domNodes": -281,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 9.002,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2023.1069999999818,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.129000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 481.52399999999994,
"heapDeltaBytes": 14163472,
"heapUsedBytes": 74772952,
"domNodes": -281,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 6.312999999999999,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1806.6499999999905,
"styleRecalcs": 73,
"styleRecalcDurationMs": 32.515,
"layouts": 12,
"layoutDurationMs": 3.33,
"taskDurationMs": 817.4019999999999,
"heapDeltaBytes": 11499256,
"heapUsedBytes": 73088944,
"domNodes": -280,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 106.42199999999998,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1819.4809999999961,
"styleRecalcs": 73,
"styleRecalcDurationMs": 33.915,
"layouts": 12,
"layoutDurationMs": 3.201,
"taskDurationMs": 830.096,
"heapDeltaBytes": 1128456,
"heapUsedBytes": 61388228,
"domNodes": -284,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 105.501,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1718.05599999999,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.017,
"layouts": 6,
"layoutDurationMs": 0.508,
"taskDurationMs": 331.80499999999995,
"heapDeltaBytes": 2666536,
"heapUsedBytes": 63646188,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8.078,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1737.1709999999894,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.322,
"layouts": 6,
"layoutDurationMs": 0.585,
"taskDurationMs": 341.59399999999994,
"heapDeltaBytes": 2464632,
"heapUsedBytes": 63106664,
"domNodes": 77,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 8.273,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 538.6169999999879,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.062999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 349.959,
"heapDeltaBytes": 10382336,
"heapUsedBytes": 70756944,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 54.51499999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 551.719999999932,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.496999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 339.159,
"heapDeltaBytes": 10388140,
"heapUsedBytes": 70877124,
"domNodes": 16,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 52.845,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2022.6789999999824,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.318000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 589.952,
"heapDeltaBytes": -11720304,
"heapUsedBytes": 62537764,
"domNodes": -280,
"jsHeapTotalBytes": -528384,
"scriptDurationMs": 14.684999999999997,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2007.9179999999042,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.728999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 588.731,
"heapDeltaBytes": -10071868,
"heapUsedBytes": 62975928,
"domNodes": -279,
"jsHeapTotalBytes": -1839104,
"scriptDurationMs": 12.749,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2142.480999999975,
"styleRecalcs": 70,
"styleRecalcDurationMs": 14.021999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1163.24,
"heapDeltaBytes": 1470816,
"heapUsedBytes": 76568952,
"domNodes": -265,
"jsHeapTotalBytes": -827392,
"scriptDurationMs": 326.101,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2136.066000000028,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.869000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1180.9450000000002,
"heapDeltaBytes": 906648,
"heapUsedBytes": 75606032,
"domNodes": -236,
"jsHeapTotalBytes": -303104,
"scriptDurationMs": 334.506,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3116.585999999984,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.393999999999998,
"layouts": 60,
"layoutDurationMs": 6.9479999999999995,
"taskDurationMs": 1271.733,
"heapDeltaBytes": 17768800,
"heapUsedBytes": 93387560,
"domNodes": 16,
"jsHeapTotalBytes": 5279744,
"scriptDurationMs": 378.88500000000005,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3082.431999999926,
"styleRecalcs": 62,
"styleRecalcDurationMs": 10.468999999999996,
"layouts": 60,
"layoutDurationMs": 6.720000000000001,
"taskDurationMs": 1257.782,
"heapDeltaBytes": 14810940,
"heapUsedBytes": 77918884,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 364.235,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2214.3970000000195,
"styleRecalcs": 45,
"styleRecalcDurationMs": 7.875,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1369.6280000000002,
"heapDeltaBytes": 2088632,
"heapUsedBytes": 62948440,
"domNodes": -275,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 444.427,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2232.610999999906,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1418.331,
"heapDeltaBytes": -17758616,
"heapUsedBytes": 64721616,
"domNodes": -243,
"jsHeapTotalBytes": 7073792,
"scriptDurationMs": 448.523,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2068.061,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.882,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 605.6869999999999,
"heapDeltaBytes": -6884460,
"heapUsedBytes": 73700204,
"domNodes": -270,
"jsHeapTotalBytes": 3211264,
"scriptDurationMs": 14.102,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2061.9140000000016,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.5,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 589.996,
"heapDeltaBytes": -5740552,
"heapUsedBytes": 74959696,
"domNodes": -269,
"jsHeapTotalBytes": 5046272,
"scriptDurationMs": 12.567000000000002,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 559.1779999999744,
"styleRecalcs": 47,
"styleRecalcDurationMs": 13.838000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.748,
"heapDeltaBytes": 11427952,
"heapUsedBytes": 71831808,
"domNodes": 20,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 114.582,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 545.8289999999124,
"styleRecalcs": 44,
"styleRecalcDurationMs": 7.720999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 360.016,
"heapDeltaBytes": 11009112,
"heapUsedBytes": 71853408,
"domNodes": 14,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 111.867,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2014.64100000004,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.749999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.51000000000005,
"heapDeltaBytes": 701596,
"heapUsedBytes": 61263124,
"domNodes": -282,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 5.914999999999998,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2039.3229999999676,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.603999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.113,
"heapDeltaBytes": -298428,
"heapUsedBytes": 61312416,
"domNodes": -282,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 5.909000000000001,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1711.2349999999878,
"styleRecalcs": 75,
"styleRecalcDurationMs": 34.318,
"layouts": 16,
"layoutDurationMs": 3.797,
"taskDurationMs": 791.4460000000001,
"heapDeltaBytes": 162548,
"heapUsedBytes": 60780460,
"domNodes": -278,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 82.85000000000001,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1719.9530000000323,
"styleRecalcs": 76,
"styleRecalcDurationMs": 33.69,
"layouts": 16,
"layoutDurationMs": 4.3309999999999995,
"taskDurationMs": 751.761,
"heapDeltaBytes": 115728,
"heapUsedBytes": 60791040,
"domNodes": -281,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 80.061,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1401.9520000000512,
"styleRecalcs": 20,
"styleRecalcDurationMs": 31.426999999999996,
"layouts": 15,
"layoutDurationMs": 14.435,
"taskDurationMs": 896.8800000000001,
"heapDeltaBytes": 20331728,
"heapUsedBytes": 102275628,
"domNodes": 13673,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 17.541999999999994,
"eventListeners": 2375,
"totalBlockingTimeMs": 144,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8156.2300000000505,
"styleRecalcs": 250,
"styleRecalcDurationMs": 34.708000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3879.8070000000002,
"heapDeltaBytes": 7306592,
"heapUsedBytes": 81479032,
"domNodes": -260,
"jsHeapTotalBytes": -2138112,
"scriptDurationMs": 981.2169999999999,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8222.965000000044,
"styleRecalcs": 251,
"styleRecalcDurationMs": 35.532,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3913.1800000000003,
"heapDeltaBytes": 8882264,
"heapUsedBytes": 82847956,
"domNodes": -262,
"jsHeapTotalBytes": -1351680,
"scriptDurationMs": 986.077,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 16765.030000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16088.661000000002,
"heapDeltaBytes": -39757704,
"heapUsedBytes": 178209684,
"domNodes": -8312,
"jsHeapTotalBytes": -12521472,
"scriptDurationMs": 102.943,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16259.756999999921,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15305.891,
"heapDeltaBytes": -29452784,
"heapUsedBytes": 175541216,
"domNodes": -8312,
"jsHeapTotalBytes": -13787136,
"scriptDurationMs": 94.47699999999999,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20165.046000000017,
"styleRecalcs": 172,
"styleRecalcDurationMs": 16.27400000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19589.974,
"heapDeltaBytes": -14811168,
"heapUsedBytes": 193004188,
"domNodes": -8312,
"jsHeapTotalBytes": -15212544,
"scriptDurationMs": 403.05600000000004,
"eventListeners": -16385,
"totalBlockingTimeMs": 38,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 19395.725999999966,
"styleRecalcs": 167,
"styleRecalcDurationMs": 15.050000000000036,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18948.958,
"heapDeltaBytes": -28089628,
"heapUsedBytes": 178448708,
"domNodes": -8312,
"jsHeapTotalBytes": -13594624,
"scriptDurationMs": 381.903,
"eventListeners": -16381,
"totalBlockingTimeMs": 14,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 94.11899999997786,
"styleRecalcs": 6,
"styleRecalcDurationMs": 13.943999999999997,
"layouts": 3,
"layoutDurationMs": 1.205,
"taskDurationMs": 69.945,
"heapDeltaBytes": 3046644,
"heapUsedBytes": 63958044,
"domNodes": 123,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 6.658,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 98.1649999999945,
"styleRecalcs": 7,
"styleRecalcDurationMs": 12.445,
"layouts": 2,
"layoutDurationMs": 0.8649999999999999,
"taskDurationMs": 69.43900000000001,
"heapDeltaBytes": 2983832,
"heapUsedBytes": 63864516,
"domNodes": 125,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.876,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
}
]
} |
🎭 Playwright: ⏳ Running... |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/tests/cloudAuthSignIn.spec.ts`:
- Around line 38-68: Move FirebasePasswordSignInResponse,
FirebaseLookupResponse, and FirebaseErrorResponse into a shared test contract
module, then remove their local declarations from cloudAuthSignIn.spec.ts and
authAccountSwitch.spec.ts. Import and reuse the shared types in both test files
so their Firebase REST response assertions validate against one common contract.
In `@src/components/dialog/content/signin/SignUpForm.test.ts`:
- Around line 321-329: Update the test “points the disabled submit button at the
hint” to fill all required fields with valid values while Turnstile is enabled,
then assert the submit button is disabled before verifying its aria-describedby
target. Keep the assertion focused on the user-visible disabled behavior rather
than only the hint attribute.
In `@src/platform/cloud/onboarding/components/CloudTermsNotice.test.ts`:
- Around line 51-63: Extend the link-security assertion in the test to include
the support link message symbol alongside the terms and privacy links. Keep
verifying target="_blank" and rel="noopener noreferrer" for all three links.
- Around line 74-93: Update the test in the “renders every fragment from the
locale, not hard-coded copy” case to assert that the privacy link is rendered as
an anchor using LONG_LOCALE.auth.login.privacyLink. Keep the existing
English-link absence check only if needed, but ensure the translated privacy
link assertion verifies both its localized name and link role.
In `@src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts`:
- Around line 154-169: Update runGuard to accept the parameterized route under
test and construct `to` from that route’s name and path instead of hardcoding
cloud-login values. Preserve strict TypeScript typing for the route and guard
arguments so cloud-signup cases exercise their actual route inputs.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: aa602996-25a4-46eb-9fc5-01b7ad9f482a
📒 Files selected for processing (8)
browser_tests/tests/cloudAuthSignIn.spec.tssrc/components/dialog/content/signin/SignUpForm.test.tssrc/platform/cloud/onboarding/components/CloudSignInForm.test.tssrc/platform/cloud/onboarding/components/CloudTermsNotice.test.tssrc/platform/cloud/onboarding/composables/usePostAuthRedirect.test.tssrc/platform/cloud/onboarding/onboardingCloudRoutes.test.tssrc/platform/cloud/onboarding/utils/previousFullPath.test.tssrc/schemas/signInSchema.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14987 +/- ##
==========================================
- Coverage 79.26% 78.81% -0.45%
==========================================
Files 2209 1879 -330
Lines 117929 117492 -437
Branches 36522 34804 -1718
==========================================
- Hits 93479 92604 -875
- Misses 23918 24321 +403
- Partials 532 567 +35
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The assertion matched any visible error text, so a toast satisfied it just as well as the inline banner it was written to defend. With that banner gone the test passes for a different reason than it claims, which is worse than not having it. Removes the firebaseError helper and FirebaseErrorResponse type with it, since nothing else built an error response.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/tests/cloudAuthSignIn.spec.ts`:
- Around line 78-81: Update mockFirebasePasswordSignIn to validate the expected
email and login fields before returning the successful credential, and throw
when a sign-in request fails validation. For non-sign-in identitytoolkit
operations, validate the expected lookup parameters before returning
lookupResponse; throw an explicit error for any unexpected operation or payload
instead of accepting it.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d66314db-a28e-4819-8371-014b6e5c080b
📒 Files selected for processing (1)
browser_tests/tests/cloudAuthSignIn.spec.ts
Move the comments that explained why an assertion matters into vitest's expect message argument, so the rationale shows up on failure instead of drifting beside the code. Delete the rest. Also from review: - SignUpForm fills a valid signup before asserting the Turnstile-gated button is disabled, so the test fails if the gate is removed - CloudTermsNotice covers the support link's target/rel and asserts the translated privacy link renders as an anchor - onboardingCloudRoutes builds `to` from the parameterized route, so the cloud-signup cases exercise signup inputs rather than login ones
CI serves the built frontend from ComfyUI's static handler, which has no SPA fallback: GET /cloud/login returns 404 with application/octet-stream, and Playwright reports that as 'Download is starting'. Both remaining tests now load the app root and let the guard route them. Drops the ?switchAccount e2e case. It can only be reached by URL, so there is no in-app path to it, and the guard behaviour is already pinned on both routes in onboardingCloudRoutes.test.ts.
A self-hosted HTTP origin can have credentials intercepted, and nothing asserted the warning renders there. happy-dom leaves globalThis.isSecureContext undefined, so the secure case is the one that needed stubbing.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/cloud/onboarding/CloudLoginView.test.ts`:
- Around line 114-118: Replace the as never cast in the renderLoginView test
setup with a type-safe message fixture. Update renderLoginView’s message
parameter to accept the nested partial shape used by
auth.login.insecureContextWarning, or provide a complete typed FREE_RUN_MESSAGES
fixture, then remove the assertion while preserving the test’s translation
value.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c03d31be-7fb8-46d7-bc2c-e9800dca1dfd
📒 Files selected for processing (1)
src/platform/cloud/onboarding/CloudLoginView.test.ts
Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Both cases it drove are already pinned closer to the logic: the deep-link round trip in usePostAuthRedirect.test.ts, and the signed-in redirect on both routes in onboardingCloudRoutes.test.ts. The spec added a slower path to the same assertions.
|
@christian-byrne This is awaiting your review, incase missed. |
christian-byrne
left a comment
There was a problem hiding this comment.
This looks good, can you fix merge conflicts and re-run CI?
| useRoute: () => ({ query: query.value }) | ||
| })) | ||
|
|
||
| vi.mock('vue-i18n', () => ({ useI18n: () => ({ t: (key: string) => key }) })) |
There was a problem hiding this comment.
issue: (non-blocking) vi.mock('vue-i18n', ...) violates the project convention documented in vitest-patterns.md: "Don't mock vue-i18n -- use a real createI18n plugin. This applies to all tests that touch a composable calling useI18n()." The composable calls useI18n() to build the OAuth error toast summary. The correct pattern for a composable test is a host component with app.use(createI18n({...})). The identity stub t: (key) => key coincides with what an empty createI18n returns, so this is low-risk, but it sets a precedent ESLint can't enforce on composable files.
There was a problem hiding this comment.
Fixed in 99a80af. Swapped the vue-i18n mock for a real createI18n on a host component, following the useMediaAssetActions.test.ts pattern the doc points at. The error-toast test now asserts the real key (oauth.consent.sessionErrorToastSummary) rather than an identity stub.
| screen.getByRole('button', { name: LOGIN_COPY.loginButton }) | ||
|
|
||
| beforeEach(() => { | ||
| setActivePinia(createPinia()) |
There was a problem hiding this comment.
issue: (non-blocking) setActivePinia(createPinia()) violates the convention (createTestingPinia from @pinia/testing) and is also dead code here -- useAuthStore is fully mocked at line 13, so real Pinia never runs. The whole setup block can just be removed.
There was a problem hiding this comment.
Fixed in 99a80af. Removed setActivePinia(createPinia()) and the now-unused pinia import — you're right that it was dead, useAuthStore is mocked outright.
| }) | ||
|
|
||
| describe('usePostAuthRedirect', () => { | ||
| it('sends a plain sign-in to the default destination', async () => { |
There was a problem hiding this comment.
suggestion: The happy-path tests (sends a plain sign-in, returns a deep-linked user, etc.) don't assert that toasts.add was called with severity: 'success'. onAuthSuccess() fires that unconditionally as its first action -- deleting the line in source leaves all tests green.
There was a problem hiding this comment.
Fixed in 99a80af. Added confirms the sign-in with a success toast. Mutation-checked: deleting the toastStore.add success call in the composable fails that test and only that test.
| expect(await runGuard(route, {})).toEqual({ name: 'cloud-user-check' }) | ||
| }) | ||
|
|
||
| it('sends a signed-in visitor straight to consent mid-OAuth', async () => { |
There was a problem hiding this comment.
suggestion: (non-blocking) The test verifies the routing target but not the session-cookie side effect: createSessionOrThrow must be called in that path or the consent view fails with an unauthenticated request. The oauthConsentRedirect unit tests (lines 95-108) cover this in isolation, but the guard integration path has no assertion for it -- a regression there would pass guard tests while breaking prod silently.
There was a problem hiding this comment.
Fixed in 99a80af. The guard-integration test sends a signed-in visitor straight to consent mid-OAuth now asserts createSessionOrThrow was called once. Mutation-checked: stubbing out the mint makes it fail on both routes, where before it stayed green.
|
|
||
| beforeEach(() => { | ||
| query.value = {} | ||
| replace.mockReset() |
There was a problem hiding this comment.
nitpick: (non-blocking) Individual mock.mockReset() calls in beforeEach instead of a single vi.resetAllMocks(). Convention per vitest-patterns.md: "vi.resetAllMocks() // Not individual mock.mockReset() calls". Risk: a new mock added later won't be reset automatically.
There was a problem hiding this comment.
Fixed in 99a80af. Dropped the manual resets entirely rather than swapping in vi.resetAllMocks() — vitest-patterns.md notes cleanup is already automatic via the mockReset config, so the only line left in beforeEach is the default resumeOAuthIfNeeded implementation that has to survive that reset.
| useSessionCookie: () => ({ createSessionOrThrow }) | ||
| })) | ||
|
|
||
| const loggedIn = vi.hoisted(() => ({ value: false })) |
There was a problem hiding this comment.
nitpick: (non-blocking) loggedIn is a plain POJO { value: false } not a ref. This works today because the guard calls useCurrentUser() fresh on each navigation (dynamic import inside beforeEnter), so loggedIn.value is read at call time. But a reader may assume it's broken -- or "fix" it to ref(loggedIn.value) which would snapshot the initial value and silently break the tests. A short comment explaining why the plain object is intentional would prevent that churn.
There was a problem hiding this comment.
Resolved by the merge with main. #15058 landed its own version of this mock with the rationale comment already on it, so the merged file carries the explanation.
|
|
||
| const guardedRoutes = ['cloud-login', 'cloud-signup'].map((name) => { | ||
| const route = cloudLayout?.children?.find((c) => c.name === name) | ||
| if (typeof route?.beforeEnter !== 'function') { |
There was a problem hiding this comment.
nitpick: (non-blocking) typeof route?.beforeEnter !== 'function' doesn't exclude array guards (typeof [] === 'object'). RouteRecordRaw types beforeEnter as NavigationGuard | NavigationGuard[] | undefined, so if this route ever switches to an array form, runGuard silently throws at runtime instead of failing at setup time. Adding || Array.isArray(route?.beforeEnter) to the throw condition makes the check airtight.
There was a problem hiding this comment.
Fixed in 99a80af. Added || Array.isArray(route.beforeEnter) and reworded the throw to "has no single beforeEnter guard".
…age-standalone # Conflicts: # src/platform/cloud/onboarding/CloudLoginView.test.ts # src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts
Use a real createI18n host component instead of mocking vue-i18n, drop the dead Pinia setup and the redundant manual mock resets, assert the success toast and the consent-path session cookie, and reject array beforeEnter guards at setup time.
typeof [] is 'object', so the array clause sat behind a typeof check that already rejected it and could never run. Check the array shape first, with its own message.
Summary
Adds the missing test coverage for the cloud sign-in and sign-up surface. Four files had no tests at all.
Changes
What: Tests only, no product code.
Previously uncovered: the
beforeEnterroute guards and theirswitchAccountescape hatch,usePostAuthRedirect, the sign-in password schema, and the terms notice. The rest extends existing files rather than duplicating their setup.Covered here: route guards on both
/cloud/loginand/cloud/signup, post-auth redirect precedence and its open-redirect guard, password boundaries and character classes, the terms notice and its outbound-link safety, the sign-in form's validation states and autofill attributes, the turnstile gate on sign-up, and the insecure-context warning for self-hosted HTTP origins.Breaking: None.
Review Focus
The route-guard tests drive both
/cloud/loginand/cloud/signupthrough the samedescribe.for. Those guards are byte-identical duplicates, so testing one would leave the other free to regress.One assumption from the plan turned out to be wrong, and the test pins the real behaviour instead: a pristine sign-in button is enabled, not disabled. PrimeVue leaves
$form.validundefined until a field is touched, so submitting a pristine form is what surfaces the errors.globalThis.isSecureContextisundefinedunder happy-dom rather thantrue, so the insecure-context test stubs the secure case. The value is a setup-time snapshot, so the stub has to precede mount.Testing
90 tests. Every one was mutation-checked: the behaviour it pins was broken in the source, the test confirmed failing, then reverted. No survivors.
path→ mismatch fails/path → failsrouter.replace→push→ fails; drop the OAuth-resume early return → deep-link precedence failsisLoggedIn→ both routes fail;if (!to.query.switchAccount)→if (true)→ escape hatch failsrel="noopener noreferrer"→ fails; hard-code any locale fragment → fails:disabled="!$form.valid"→ fails;current-password→new-password→ failsuseThrottleFn→ double-submit fails; makeresetTurnstilea no-op → failsv-if="false"→ fails; force the webview notice → failsThree guards are unkillable in isolation and die only once the outer gate is also removed, which is the signature of defence-in-depth rather than dead code:
CloudSignInForm.onSubmit'sevent.valid,SignUpForm.onSubmit'swaitingForTurnstile, and both forms' loading gate behindButton'sdisabled || loading.No e2e spec. The two flows worth driving end to end — the deep-link round trip and the already-signed-in redirect — are pinned closer to the logic in
usePostAuthRedirect.test.tsandonboardingCloudRoutes.test.ts, the latter on both routes. A browser spec added a slower path to the same assertions.