mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-18599] Forbid unknown property and element in tests (#13556)
Fail tests when relying on unknownProperties or unknownElements. Existing instances are whitelist and have tickets created and assigned to the relevant teams.
This commit is contained in:
@@ -70,6 +70,8 @@ describe("RecoverTwoFactorComponent", () => {
|
||||
},
|
||||
],
|
||||
imports: [I18nPipe],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(RecoverTwoFactorComponent);
|
||||
|
||||
@@ -66,6 +66,9 @@ describe("BreachReportComponent", () => {
|
||||
useValue: mock<I18nService>(),
|
||||
},
|
||||
],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
errorOnUnknownProperties: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -84,6 +84,9 @@ describe("ExposedPasswordsReportComponent", () => {
|
||||
},
|
||||
],
|
||||
schemas: [],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
errorOnUnknownProperties: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@ describe("InactiveTwoFactorReportComponent", () => {
|
||||
},
|
||||
],
|
||||
schemas: [],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -77,6 +77,8 @@ describe("ReusedPasswordsReportComponent", () => {
|
||||
},
|
||||
],
|
||||
schemas: [],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ describe("UnsecuredWebsitesReportComponent", () => {
|
||||
},
|
||||
],
|
||||
schemas: [],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -85,6 +85,8 @@ describe("WeakPasswordsReportComponent", () => {
|
||||
},
|
||||
],
|
||||
schemas: [],
|
||||
// FIXME(PM-18598): Replace unknownElements and unknownProperties with actual imports
|
||||
errorOnUnknownElements: false,
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "jest-preset-angular/setup-jest";
|
||||
import "@bitwarden/ui-common/setup-jest";
|
||||
|
||||
Object.defineProperty(window, "CSS", { value: null });
|
||||
Object.defineProperty(window, "getComputedStyle", {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["../../libs/tools/card/src"],
|
||||
"@bitwarden/ui-common": ["../../libs/ui/common/src"],
|
||||
"@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user