From ddc0d330d51d81afbfc60b8cab31c0a6aa56b3cf Mon Sep 17 00:00:00 2001 From: NFriedo <69233063+NFriedo@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:19:15 +0100 Subject: [PATCH] add tests --- .../ui/confirmation-dialog/ConfirmationDialog.unit.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/ui/confirmation-dialog/ConfirmationDialog.unit.ts b/src/modules/ui/confirmation-dialog/ConfirmationDialog.unit.ts index d1b0ca6536..3cf0b8783a 100644 --- a/src/modules/ui/confirmation-dialog/ConfirmationDialog.unit.ts +++ b/src/modules/ui/confirmation-dialog/ConfirmationDialog.unit.ts @@ -73,6 +73,17 @@ describe("ConfirmationDialog", () => { expect(dialogTitle.text()).toContain(message); }); + + it("should render empty dialog title if no message is provided", async () => { + const { wrapper } = setup({ message: undefined }); + + const dialogTitle = wrapper + .findComponent(VDialog) + .findComponent(VCard) + .find(".dialog-title"); + + expect(dialogTitle.text()).toBe(""); + }); }); describe("when a dialog button is clicked", () => {