Skip to content

Commit

Permalink
add Created enum type
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-livefront committed Dec 20, 2024
1 parent 54ae50e commit b20827e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe("AddEditFolderDialogComponent", () => {

await component.submit();

expect(close).toHaveBeenCalled();
expect(close).toHaveBeenCalledWith(AddEditFolderDialogResult.Created);
});

it("logs error if saving fails", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
import { KeyService } from "@bitwarden/key-management";

export enum AddEditFolderDialogResult {
Created = "created",
Deleted = "deleted",
}

Expand Down Expand Up @@ -126,7 +127,7 @@ export class AddEditFolderDialogComponent implements AfterViewInit, OnInit {
message: this.i18nService.t("editedFolder"),
});

this.close();
this.close(AddEditFolderDialogResult.Created);
} catch (e) {
this.logService.error(e);
}
Expand Down Expand Up @@ -159,7 +160,7 @@ export class AddEditFolderDialogComponent implements AfterViewInit, OnInit {
};

/** Close the dialog */
private close(result?: AddEditFolderDialogResult) {
private close(result: AddEditFolderDialogResult) {
this.dialogRef.close(result);
}
}

0 comments on commit b20827e

Please sign in to comment.