11@mobilesync @conflict
2- Feature : Conflict Resolution - Mobile and Desktop concurrent edits
2+ Feature : Conflict Resolution - Mobile and mock server concurrent edits
33
4- # Pre-condition: At least one wiki workspace exists with E2ETestTiddler.tid in its git history.
5- # Run @import and @sync scenarios first to ensure the shared ancestor commit exists.
6- #
74 # The conflict flow:
8- # 1. Desktop modifies E2ETestTiddler.tid body + commits (via file-system watcher auto-commit).
9- # 2. Mobile modifies the SAME file differently (via adb) — diverged commit from the same ancestor.
10- # 3. Mobile taps sync: gitCommit → gitPushToIncoming → triggerDesktopMerge → gitFetchAndReset.
11- # 4. Desktop detects merge conflict → resolveTidConflictMarkers resolves it:
5+ # 1. Scenario imports a fresh mock wiki and creates E2ETestTiddler.tid.
6+ # 2. Mock server modifies E2ETestTiddler.tid body + commits explicitly.
7+ # 3. Mobile modifies the SAME file differently (via adb) — diverged commit from the same ancestor.
8+ # 4. Mobile taps sync: gitCommit → gitPushToIncoming → plugin merge → gitFetchAndReset.
9+ # 5. Plugin detects merge conflict → resolveTidConflictMarkers resolves it:
1210 # header: mobile wins (newer modified timestamp)
13- # body: desktop + unique mobile lines merged
14- # 5 . Verify: desktop file contains BOTH body lines; mobile sync completes successfully.
11+ # body: mock server + unique mobile lines merged
12+ # 6 . Verify: mock server file contains BOTH body lines; mobile sync completes successfully.
1513
1614 Background :
1715 Given the app is on the main menu screen
18- And at least one wiki workspace exists
1916
2017 @conflict
2118 Scenario : Body edits on both sides are merged; mobile header wins on conflict
22- # Desktop adds a unique body line to E2ETestTiddler.tid and waits for file-watcher auto-commit.
19+ Given a fresh mock server wiki is imported
20+ And the imported mock server wiki has a synced tiddler "E2ETestTiddler" in shared history
21+ # Mock server adds a unique body line to E2ETestTiddler.tid and commits explicitly.
2322 # Mobile independently overwrites the same tiddler with a different body line.
2423 # After sync, both body lines must be present and mobile's modified timestamp must win.
25- Given the desktop appends "Desktop conflict line." to "E2ETestTiddler.tid" and commits
24+ Given the mock server appends "Mock server conflict line." to "E2ETestTiddler.tid" and commits
2625 When the mobile overwrites "E2ETestTiddler.tid" adding body line "Mobile conflict line."
2726 And I tap the sync button for the first wiki workspace
2827 Then the sync should complete successfully
28+ And the mock server desktop git runner should be used
2929 And the unsynced count should be zero after sync
30- And the desktop tiddler "E2ETestTiddler.tid" body contains "Desktop conflict line."
31- And the desktop tiddler "E2ETestTiddler.tid" body contains "Mobile conflict line."
32- And the desktop tiddler "E2ETestTiddler.tid" header contains the mobile modified timestamp
30+ And the mock server tiddler "E2ETestTiddler.tid" body contains "Mock server conflict line."
31+ And the mock server tiddler "E2ETestTiddler.tid" body contains "Mobile conflict line."
32+ And the mock server tiddler "E2ETestTiddler.tid" header contains the mobile modified timestamp
0 commit comments