mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 05:30:01 +00:00
Fixing the test cases
This commit is contained in:
@@ -50,7 +50,8 @@ describe("RiskInsightsReportService", () => {
|
||||
let testCase = testCaseResults[0];
|
||||
expect(testCase).toBeTruthy();
|
||||
expect(testCase.cipherMembers).toHaveLength(2);
|
||||
expect(testCase.trimmedUris).toHaveLength(3);
|
||||
// When by domain, the result should be 2
|
||||
expect(testCase.trimmedUris).toHaveLength(2);
|
||||
expect(testCase.weakPasswordDetail).toBeTruthy();
|
||||
expect(testCase.exposedPasswordDetail).toBeTruthy();
|
||||
expect(testCase.reusedPasswordCount).toEqual(2);
|
||||
@@ -69,7 +70,7 @@ describe("RiskInsightsReportService", () => {
|
||||
it("should generate the raw data + uri report correctly", async () => {
|
||||
const result = await firstValueFrom(service.generateRawDataUriReport$("orgId"));
|
||||
|
||||
expect(result).toHaveLength(9);
|
||||
expect(result).toHaveLength(8);
|
||||
|
||||
// Two ciphers that have google.com as their uri. There should be 2 results
|
||||
const googleResults = result.filter((x) => x.trimmedUri === "google.com");
|
||||
@@ -88,7 +89,7 @@ describe("RiskInsightsReportService", () => {
|
||||
it("should generate applications health report data correctly", async () => {
|
||||
const result = await firstValueFrom(service.generateApplicationsReport$("orgId"));
|
||||
|
||||
expect(result).toHaveLength(6);
|
||||
expect(result).toHaveLength(5);
|
||||
|
||||
// Two ciphers have google.com associated with them. The first cipher
|
||||
// has 2 members and the second has 4. However, the 2 members in the first
|
||||
@@ -132,7 +133,7 @@ describe("RiskInsightsReportService", () => {
|
||||
|
||||
expect(reportSummary.totalMemberCount).toEqual(7);
|
||||
expect(reportSummary.totalAtRiskMemberCount).toEqual(6);
|
||||
expect(reportSummary.totalApplicationCount).toEqual(6);
|
||||
expect(reportSummary.totalAtRiskApplicationCount).toEqual(5);
|
||||
expect(reportSummary.totalApplicationCount).toEqual(5);
|
||||
expect(reportSummary.totalAtRiskApplicationCount).toEqual(4);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user