Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add test helpers for system navigation #124

Merged

Conversation

Peetee06
Copy link
Contributor

Status

READY

Breaking Changes

NO

Description

This PR adds extension methods on WidgetTester that allow to simulate system navigation events in tests. This change makes the tests more robust because they simulate the underlying platform message instead of calling the test wrapper for _SystemNavigationObserver. It also makes the potential removal of _SystemNavigationObserver in the future easier.

Found this in the tests of the go_router package here

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Testing

@Peetee06 Peetee06 requested a review from felangel as a code owner November 22, 2024 14:57
@felangel felangel added the tests changes to tests label Nov 27, 2024
Copy link
Owner

@felangel felangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for the refactor 💙

@felangel felangel merged commit 1896543 into felangel:master Nov 27, 2024
3 checks passed
@Peetee06 Peetee06 deleted the test/add-helpers-for-system-navigation branch November 27, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests changes to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants