Skip to content

[PM-44990] Build Policy test fixtures from PolicyData in vault - #24206

Merged
eliykat merged 1 commit into
mainfrom
ac/pm-44990/sdk-policy-consumers-vault
Oct 29, 2026
Merged

eliykat merged 1 commit into
mainfrom
ac/pm-44990/sdk-policy-consumers-vault

Conversation

@eliykat

@eliykat eliykat commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-44990

📔 Objective

Build Policy test fixtures by passing a full PolicyData to the constructor, instead of calling new Policy() and setting properties afterwards. Covers the browser vault stories and the web organization options spec.

This prepares for #24086, which makes the Policy constructor argument required.

📸 Screenshots

N/A

@eliykat
eliykat added this pull request to stack #24210 October 28, 2026 03:31
@eliykat eliykat added the t:tech-debt Change Type - Tech debt label Oct 28, 2026
@eliykat eliykat changed the title ac/pm 44990/sdk policy consumers vault [PM-44990] Build Policy test fixtures from PolicyData in vault Oct 28, 2026
@eliykat eliykat added the ai-review Request a Claude code review label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR changes two test-only files, the browser vault Storybook stories and the web organization options spec. Both now build Policy fixtures by passing a PolicyData-shaped object to the constructor instead of setting properties after construction. The fixtures behave the same: revisionDate goes in as an ISO string and the constructor turns it back into a Date, and the spec's Partial<PolicyData> overrides cover every field the existing tests override (enabled, organizationId, data). No production code is touched.

@eliykat
eliykat marked this pull request as ready for review October 28, 2026 03:39
@eliykat
eliykat requested a review from a team as a code owner October 28, 2026 03:39
@eliykat
eliykat enabled stacked auto-merge (squash) October 28, 2026 03:40
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.50%. Comparing base (258039a) to head (d6d3977).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24206   +/-   ##
=======================================
  Coverage   60.49%   60.50%           
=======================================
  Files        4817     4817           
  Lines      153760   153760           
  Branches    24538    24538           
=======================================
+ Hits        93023    93025    +2     
+ Misses      54355    54352    -3     
- Partials     6382     6383    +1     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eliykat
eliykat force-pushed the ac/pm-44990/sdk-policy-consumers-vault branch from 3ad7d4a to d6d3977 Compare October 28, 2026 23:15
stacked auto-merge was automatically disabled October 28, 2026 23:53

Auto-merge was disabled for another pull request in the stack

@eliykat
eliykat enabled stacked auto-merge (squash) October 28, 2026 23:54
@eliykat
eliykat merged commit 055c16c into main Oct 29, 2026
101 of 102 checks passed
@eliykat
eliykat deleted the ac/pm-44990/sdk-policy-consumers-vault branch October 29, 2026 20:53
@djsmith85 djsmith85 added browser Browser Extension web labels Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review browser Browser Extension t:tech-debt Change Type - Tech debt web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants