mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 08:08:02 +00:00
fix(grid): simplify save action label
This commit is contained in:
@@ -2,15 +2,15 @@ import { strict as assert } from "node:assert";
|
||||
import test from "node:test";
|
||||
import { dataGridSaveActionMode } from "../../apps/desktop/src/lib/dataGridSaveUi.ts";
|
||||
|
||||
test("uses pending-change count as the primary grid save action label", () => {
|
||||
test("uses concise save and commit labels for the primary grid save action", () => {
|
||||
assert.deepEqual(dataGridSaveActionMode({ pendingChangeCount: 3, useTransaction: true }), {
|
||||
labelKey: "grid.pendingChanges",
|
||||
labelKey: "grid.commit",
|
||||
tooltipKey: "grid.transactionSaveHint",
|
||||
secondaryActionKey: "grid.rollback",
|
||||
});
|
||||
|
||||
assert.deepEqual(dataGridSaveActionMode({ pendingChangeCount: 3, useTransaction: false }), {
|
||||
labelKey: "grid.pendingChanges",
|
||||
labelKey: "grid.save",
|
||||
tooltipKey: "grid.nonTransactionalSaveHint",
|
||||
secondaryActionKey: "grid.discard",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user