Skip to content

Commit

Permalink
Remove _wait_for_text_on_screen_or_not hotfix following proper fix in…
Browse files Browse the repository at this point in the history
… Speculos
  • Loading branch information
fbeutin-ledger committed Apr 11, 2024
1 parent 016ac9e commit d93f47e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Speculos backend: if not specified, availability of API and APDU ports are checked to avoid collision
- navigator: New pytest fixture to navigate by scenario to simplify classic navigation operations

### Fixed
- Speculos backend: Properly fixed internal snapshot state desync compare screen with text

## [1.16.3] - 2024-04-05

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions src/ragger/backend/speculos.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,11 @@ def _wait_for_text_on_screen_or_not(self,
# Only manual ticks sent by compare_screen_with_text in this function because
# we don't want a desync between screen and events
self.pause_ticker()
# Save current snapshot in case its content already matches and we never
# call wait_for_screen_change
self._last_screenshot = BytesIO(self._client.get_screenshot())
while True:
if self.compare_screen_with_text(text) == should_be_on_screen:
# TODO: investigate while this line is needed.. It should not be
self._last_screenshot = BytesIO(self._client.get_screenshot())
self.resume_ticker()
return
else:
Expand Down

0 comments on commit d93f47e

Please sign in to comment.