1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-21 11:53:34 +00:00

show upgrade badge for non-premium users (#18296)

This commit is contained in:
Nick Krantz
2026-01-15 08:23:52 -06:00
committed by GitHub
parent 2cec30e533
commit d1be3b65f7
2 changed files with 3 additions and 5 deletions

View File

@@ -52,9 +52,7 @@
>
<span class="tw-flex tw-items-center tw-gap-2">
{{ "archiveNoun" | i18n }}
@if (!userHasArchivedItems()) {
<app-premium-badge></app-premium-badge>
}
<app-premium-badge></app-premium-badge>
</span>
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</a>

View File

@@ -195,10 +195,10 @@ describe("VaultSettingsV2Component", () => {
expect(component["userHasArchivedItems"]()).toBe(false);
});
it("hides premium badge when user has archived items", () => {
it("shows premium badge when user has archived items but cannot archive", () => {
setArchiveState(false, [{ id: "cipher1" } as CipherView]);
expect(component["premiumBadgeComponent"]()).toBeUndefined();
expect(component["premiumBadgeComponent"]()).toBeTruthy();
expect(component["userHasArchivedItems"]()).toBe(true);
});
});