Leave hiding and deleting a link to its right-click menu
The inspector of a picked link carried the buttons Hide link and Delete link below its facts. Both actions are in the right-click menu of the line since #289, and Delete removes a picked link as well. The user asked for the buttons to go. - buildEdgeSection in editor/inspector/edgeSection.ts only describes now: the two ends, the type, and for a transition its name field. - The button under several picked links and Delete transition in a state machine go with them. They came from the same line of code, and the menu offers both. - The note under several links stays. It speaks of the Delete key. Tests: - Gate on melektaus-atx: 212 files, 3260 tests, exit 0. - e2e 4,6,26 on melektaus-atx: 275 checks, all pass. - No full run and no smokes. The sum of e2e checks stays at 1676, which is reckoned. - Module 06 now checks that the inspector of a picked link shows neither button. Its menu check finds Hide link and Delete link only in the menu, where it had to take the one drawn last before. - Module 26 checks that a picked transition shows no Delete transition. - No unit test names the buttons. No counter-probe was run. The old checks found both texts in the inspector, which is the state the new ones would fail on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f02adabcf9
commit
c7dc0e4733
3 files changed
+13
-22
No files matched your search
@@ -2009,7 +2009,9 @@ export async function graph(t) {
|
||||
s.selection.edgeId === 'lk-e1' &&
|
||||
same(await drawn(), ['lk-e1']) &&
|
||||
Boolean(await find('LINK')) &&
|
||||
Boolean(await find('Delete link')),
|
||||
// Hiding and deleting live in the line's menu alone; the inspector only describes.
|
||||
!(await find('Hide link')) &&
|
||||
!(await find('Delete link')),
|
||||
JSON.stringify({ selection: s.selection, drawn: await drawn() }),
|
||||
);
|
||||
await press('Delete');
|
||||
@@ -2042,8 +2044,7 @@ export async function graph(t) {
|
||||
await click(one.x, two.y + 60);
|
||||
await click(two.x, two.y, 'right');
|
||||
const offered = Boolean(await find('Hide link'));
|
||||
// The inspector shows a button of the same name; the menu's entry is the one drawn last.
|
||||
const entry = await locate('Delete link', true);
|
||||
const entry = await locate('Delete link');
|
||||
await click(entry.x, entry.y);
|
||||
const afterMenu = await edges();
|
||||
await undo();
|
||||
|
||||
@@ -374,12 +374,12 @@ export async function stateMachine(t) {
|
||||
const arrowSelection = (await state()).selection;
|
||||
await shot('05f-picked');
|
||||
check(
|
||||
'clicking a transition picks it: the inspector shows it with its name and the way to delete it',
|
||||
'clicking a transition picks it: the inspector shows it with its name and no button of its own',
|
||||
arrowSelection?.kind === 'edge' &&
|
||||
arrowSelection.edgeId === alarm?.id &&
|
||||
JSON.stringify(await json('__gm.stateMachine.pickedEdges()')) === JSON.stringify([alarm?.id]) &&
|
||||
(await has('TRANSITION')) &&
|
||||
(await has('Delete transition')),
|
||||
!(await has('Delete transition')),
|
||||
JSON.stringify({ arrowSelection, drawn: await json('__gm.stateMachine.pickedEdges()') }),
|
||||
);
|
||||
await press('Delete');
|
||||
|
||||
Reference in new issue
Block a user