mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-7304] Add missing i18n keys for import errors (#8743)
* Add static error message when import fails * Adding missing string on CLI for unassigned items * Added missing string on setImportTarget * fixed tests
This commit is contained in:
@@ -196,7 +196,7 @@ describe("ImportService", () => {
|
||||
new Object() as FolderView,
|
||||
);
|
||||
|
||||
await expect(setImportTargetMethod).rejects.toThrow("Error assigning target collection");
|
||||
await expect(setImportTargetMethod).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("passing importTarget as null on setImportTarget throws error", async () => {
|
||||
@@ -206,7 +206,7 @@ describe("ImportService", () => {
|
||||
new Object() as CollectionView,
|
||||
);
|
||||
|
||||
await expect(setImportTargetMethod).rejects.toThrow("Error assigning target folder");
|
||||
await expect(setImportTargetMethod).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("passing importTarget, collectionRelationship has the expected values", async () => {
|
||||
|
||||
@@ -432,7 +432,7 @@ export class ImportService implements ImportServiceAbstraction {
|
||||
|
||||
if (organizationId) {
|
||||
if (!(importTarget instanceof CollectionView)) {
|
||||
throw new Error("Error assigning target collection");
|
||||
throw new Error(this.i18nService.t("errorAssigningTargetCollection"));
|
||||
}
|
||||
|
||||
const noCollectionRelationShips: [number, number][] = [];
|
||||
@@ -463,7 +463,7 @@ export class ImportService implements ImportServiceAbstraction {
|
||||
}
|
||||
|
||||
if (!(importTarget instanceof FolderView)) {
|
||||
throw new Error("Error assigning target folder");
|
||||
throw new Error(this.i18nService.t("errorAssigningTargetFolder"));
|
||||
}
|
||||
|
||||
const noFolderRelationShips: [number, number][] = [];
|
||||
|
||||
Reference in New Issue
Block a user