[6944] Pinia Task 15 - teardown#6987
[6944] Pinia Task 15 - teardown#6987n-lark wants to merge 8 commits into6943-pinia-task-14-account-settingsfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 6943-pinia-task-14-account-settings #6987 +/- ##
====================================================================
Coverage 76.29% 76.29%
====================================================================
Files 403 403
Lines 20296 20296
Branches 4881 4881
====================================================================
Hits 15485 15485
Misses 4811 4811
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ngs' into 6944-pinia-task-15-teardown
| expect(win.location.href).to.match(/^[a-zA-Z]+:\/\/localhost:\d+\/?$/) | ||
| }) | ||
| // Assert that the login form is visible | ||
| cy.get('[data-form="login"]').should('be.visible') |
There was a problem hiding this comment.
With Pinia, checkState() is fully async, it awaits getSettings() and getUser() before processing the 401 and pushing to the login route.
The old cy.wait('@getUser') + immediate win.location.href assertion resolved as soon as the XHR completed, but the URL hadn't changed yet because Pinia's async chain (store update → router.push) hadn't finished. cy.get('[data-form="login"]').should('be.visible') retries automatically, so it correctly waits for the DOM to settle after the redirect.
Description
See details & test plan.
Related Issue(s)
Resolves #6944
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel