Skip to content

[6944] Pinia Task 15 - teardown#6987

Open
n-lark wants to merge 8 commits into6943-pinia-task-14-account-settingsfrom
6944-pinia-task-15-teardown
Open

[6944] Pinia Task 15 - teardown#6987
n-lark wants to merge 8 commits into6943-pinia-task-14-account-settingsfrom
6944-pinia-task-15-teardown

Conversation

@n-lark
Copy link
Copy Markdown
Contributor

@n-lark n-lark commented Mar 27, 2026

Description

See details & test plan.

Related Issue(s)

Resolves #6944

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark self-assigned this Mar 27, 2026
@n-lark n-lark changed the base branch from main to 6943-pinia-task-14-account-settings March 27, 2026 19:03
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.29%. Comparing base (d00db58) to head (e5f57bc).

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           
Flag Coverage Δ
backend 76.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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')
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@n-lark n-lark marked this pull request as ready for review March 30, 2026 18:51
@n-lark n-lark requested a review from cstns March 30, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinia Task 15 - teardown

1 participant