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

fix: Only use initialized game for tests and remove setMount from onGameResize #2246

Merged
merged 12 commits into from
Jan 8, 2023

Conversation

spydon
Copy link
Member

@spydon spydon commented Dec 31, 2022

Description

Since we used setMounted in onGameResize the mounted feature didn't work properly when invoked from for example onLoad. This PR makes sure that all tests passes without using setMounted in onLoad.

Some GameWidget tests I want a second opinion on, or ideas of how to make those tests better, because when setting mounted explicitly it kind of cheats on part of those tests.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #1351

@spydon spydon requested review from st-pasha and a team December 31, 2022 00:32
Copy link
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

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

LGTM with one comment

Copy link
Contributor

@st-pasha st-pasha left a comment

Choose a reason for hiding this comment

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

Looks all good!

@spydon spydon merged commit 2a0f1d4 into main Jan 8, 2023
@spydon spydon deleted the spydon/remove-mounted-from-resize branch January 8, 2023 22:09
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.

Tests should use only properly initialized game instances
4 participants