Andrei486 / uml-diagram-collab

0 stars 0 forks source link

Compress command list for save/load #104

Closed Andrei486 closed 6 months ago

Andrei486 commented 6 months ago

Resolves #103. Depends on #98.

Andrei486 commented 6 months ago

Manual testing notes:

Tests run on branch save-load-compressed. For each test, check that the saved command list is as expected (from console debugs), and check that loading the diagram produces the same diagram.

Test scenario 1: add element, move 3 times, save. Expected: only add + 1 move saved. Pass.

Test scenario 2: add element, resize 3 times from bottom right, save. Expected: only add + 1 resize saved. Pass.

Test scenario 3: add UML class element, edit same text 3 times, save. Expected: only add + 1 edit text saved. Pass.

Test scenario 4: add 2 UML class elements, move both and edit their text. Remove the first. Save. Expected: only one add + move + edit text saved. Nothing should be saved for the deleted element. Pass.

Test scenario 5: add UML class element, edit each text twice, save. Expected: add + 3 edit texts saved. Pass.

Test scenario 6: add connector element, move each endpoint twice, save. Expected: add + 2 connector moves saved, one for each endpoint. Pass.

Test scenario 7: add UML comment element, move twice, resize from top right corner, resize from bottom right corner. Expected: add + move (technically unnecessary?) + both resizes saved. The first resize is also a move. Pass.

Test scenario 8: add UML class element, move, resize from any corner, edit each text, resize from any corner, move, edit 2 texts, move, edit last text. Save. Expected: add + 1 move + 1 resize + 3 edit texts (1 for each text). Pass.