From 1e058bb0d96ad97ae1e9d90da63207da0bbc562b Mon Sep 17 00:00:00 2001 From: jng Date: Fri, 15 Aug 2025 11:58:42 -0400 Subject: [PATCH] minor wording changes --- .../at-risk-callout/at-risk-password-callout.component.ts | 2 +- .../vault/services/at-risk-password-callout.service.spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts b/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts index a70d8bef003..a52d0ff1079 100644 --- a/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts +++ b/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts @@ -89,7 +89,7 @@ export class AtRiskPasswordCalloutComponent { ); } - // Will show callout, will remove any previous dismissed banner state + // If user has pending tasks set state hadPendingTasks to true if (this.currentPendingTasks()?.length > 0) { const updateObject: AtRiskPasswordCalloutData = { hadPendingTasks: true, diff --git a/apps/web/src/app/vault/services/at-risk-password-callout.service.spec.ts b/apps/web/src/app/vault/services/at-risk-password-callout.service.spec.ts index f5065c51a17..2dab254bd08 100644 --- a/apps/web/src/app/vault/services/at-risk-password-callout.service.spec.ts +++ b/apps/web/src/app/vault/services/at-risk-password-callout.service.spec.ts @@ -32,7 +32,7 @@ describe("AtRiskPasswordCalloutService", () => { const mockTaskService = { pendingTasks$: jest.fn() }; const mockCipherService = { cipherViews$: jest.fn() }; const mockStateProvider = { getUser: jest.fn().mockReturnValue(fakeUserState()) }; - const userId: UserId = "user-123" as UserId; + const userId: UserId = "user1" as UserId; beforeEach(() => { TestBed.configureTestingModule({ providers: [ @@ -60,7 +60,7 @@ describe("AtRiskPasswordCalloutService", () => { }); describe("pendingTasks$", () => { - it("filters tasks to only UpdateAtRiskCredential with a non-deleted cipher", async () => { + it("filters tasks to only items with UpdateAtRiskCredential types and not deleted cipher", async () => { const tasks: SecurityTask[] = [ { id: "t1", cipherId: "c1", type: SecurityTaskType.UpdateAtRiskCredential } as any, { id: "t2", cipherId: "c2", type: null } as any, @@ -83,7 +83,7 @@ describe("AtRiskPasswordCalloutService", () => { }); describe("atRiskPasswordState", () => { - it("calls stateProvider.getUser and returns its value", () => { + it("calls stateProvider.getUser with proper values", () => { service.atRiskPasswordState(userId); expect(mockStateProvider.getUser).toHaveBeenCalledWith(userId, AT_RISK_PASSWORD_CALLOUT_KEY); });