Kanban drag and drop
A kanban board with two columns, `todo` and `done`; `todo` holds the cards
`task-1` and `task-2`. Counters show the number of cards in each column.
Rules:
- a card can be dragged into either column;
- after a move the card is in exactly one column, and the counters match the
column contents;
- the column under the pointer gets the `drop-target` class;
- releasing the card removes the highlight;
- a drop outside the columns cancels the move: the card stays where it was;
- `Escape` during a drag cancels the move;
- dropping into an empty column works.
Write Playwright tests:
- the initial counters and card positions;
- a move into the empty `done`;
- moving both cards and bringing one back into the empty `todo`;
- cancelling a drop outside the columns (for example, on the `board-title`
heading);
- cancelling with `Escape`;
- moving a card back and forth.
Cards: `card-task-1`, `card-task-2`. Columns: `column-todo`, `column-done`.
Counters: `count-todo`, `count-done`. Heading: `board-title`. Use
`drag_to(...)` for a normal move and `mouse` + `keyboard` for cancellation; no
`sleep` is needed.
The AI mentor is available after you log in: it sees your attempt history and does not spend resources on anonymous requests.
Log in and askHint 1
What should change after a move besides the card position? Counters and the
highlight are observable state just like the card itself.