diff --git a/apps/desktop/src/components/layout/AppTabBar.vue b/apps/desktop/src/components/layout/AppTabBar.vue index 1d06dfc1a..2227501be 100644 --- a/apps/desktop/src/components/layout/AppTabBar.vue +++ b/apps/desktop/src/components/layout/AppTabBar.vue @@ -915,15 +915,16 @@ function onOverflowItemKeydown(event: KeyboardEvent, tabId: string, kind: "regul } " > - + {{ t("editor.unsavedChangesTitle") }} -
-

{{ closeConfirmMessage }}

+ +
+

{{ closeConfirmMessage }}

- + diff --git a/apps/desktop/src/components/layout/__tests__/AppTabBar.spec.ts b/apps/desktop/src/components/layout/__tests__/AppTabBar.spec.ts new file mode 100644 index 000000000..2d30ba14d --- /dev/null +++ b/apps/desktop/src/components/layout/__tests__/AppTabBar.spec.ts @@ -0,0 +1,20 @@ +import { readFileSync } from "node:fs"; +import { describe, expect, it } from "vitest"; + +const tabBarSource = readFileSync(new URL("../AppTabBar.vue", import.meta.url), "utf8"); + +describe("AppTabBar close confirmation layout", () => { + it("allows long unbroken tab titles to shrink and wrap inside the dialog", () => { + expect(tabBarSource).toMatch(/\s*

{ + expect(tabBarSource).toMatch(//); + expect(tabBarSource).toContain('v-if="showCloseConfirmBulkActions" variant="secondary" @click="handleDiscardAllAndClose"'); + expect(tabBarSource).toContain('v-if="showCloseConfirmBulkActions" @click="handleSaveAllAndClose"'); + expect(tabBarSource).toContain('@click="handleDiscardAndClose"'); + expect(tabBarSource).toContain('@click="handleSaveAndClose"'); + expect(tabBarSource).toContain('@click="handleCancelClose"'); + }); +});