Skip to content

test: fix undo-restore flow test stranded on ManageShelvesScreen - #57

Merged
spdotdev merged 1 commit into
mainfrom
fix/undo-restore-flow-test
Aug 28, 2026
Merged

spdotdev merged 1 commit into
mainfrom
fix/undo-restore-flow-test

Conversation

@spdotdev

@spdotdev spdotdev commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Fixes the nightly Instrumented tests workflow, red on every run since the Storage rework (v0.1.22 era).

Cause: DeleteShelfStrategyFlowTest.undo_restores_a_shelf_deleted_with_the_keep_products_strategy_along_with_its_products still assumed the pre-rework layout where delete/undo happened on the tabbed LocationDetailScreen. Editing moved to ManageShelvesScreen, so after Undo the test tapped "Top shelf" on the manage screen — where products are never rendered — and timed out waiting for "Milk". The app behavior itself is correct (verified in logcat: restore POST + both refetches succeed).

Fix: after the restore, navigate back to the location detail as a user would and assert the shelf tab + product there.

Verified: all 4 tests in the class pass on a real device (Pixel 7 Pro); ktlint + detekt clean.

The nightly instrumented run has failed on
undo_restores_a_shelf_deleted_with_the_keep_products_strategy since the
Storage rework moved shelf editing (and the undo snackbar) off the
tabbed LocationDetailScreen onto ManageShelvesScreen: after Undo the
test tapped 'Top shelf' on the manage screen, where products are never
rendered, and timed out waiting for 'Milk'. Navigate back to the
location detail after the restore, as a user would, and assert the
product there. Verified on-device: all 4 tests in the class pass.

Claude-Session: https://claude.ai/code/session_01DgpTaTHThASmowZxsvHPfn
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@spdotdev
spdotdev merged commit 95bf5ed into main Aug 28, 2026
5 checks passed
@spdotdev
spdotdev deleted the fix/undo-restore-flow-test branch August 28, 2026 16:20
@spdotdev spdotdev self-assigned this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant