Skip to content

Commit e9f2a50

Browse files
committed
ui: add test-id for add-empty-commit and wire in menu
Added TestId for the branch header context menu 'Add empty commit' action and wired the testId into the BranchHeaderContextMenu Svelte component. Changes: - packages/ui/src/lib/utils/testIds.ts: added BranchHeaderContextMenu_AddEmptyCommit constant. - apps/desktop/src/components/BranchHeaderContextMenu.svelte: set testId={TestId.BranchHeaderContextMenu_AddEmptyCommit} on the 'Add empty commit' ContextMenuItem. These changes are UI/test scaffolding only and enable e2e tests to interact with the add-empty-commit action.
1 parent b5268ff commit e9f2a50

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

apps/desktop/src/components/BranchHeaderContextMenu.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
<ContextMenuItem
238238
label="Add empty commit"
239239
icon="new-empty-commit"
240+
testId={TestId.BranchHeaderContextMenu_AddEmptyCommit}
240241
onclick={async () => {
241242
await insertBlankCommitInBranch({
242243
projectId,

packages/ui/src/lib/utils/testIds.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export enum TestId {
2424
BranchHeaderAddDependanttBranchModal = 'branch-header-add-dependent-branch-modal',
2525
BranchHeaderAddDependanttBranchModal_ActionButton = 'branch-header-add-dependent-branch-modal-action-button',
2626
BranchHeaderContextMenu_SquashAllCommits = 'branch-header-context-menu-squash-all-commits',
27+
BranchHeaderContextMenu_AddEmptyCommit = 'branch-header-context-menu-add-empty-commit',
2728
EditCommitMessageBox = 'edit-commit-message-box',
2829
CommitDrawer = 'commit-drawer',
2930
CommitDrawerActionUncommit = 'commit-drawer-action-uncommit',

0 commit comments

Comments
 (0)