Merge branch 'main' into feat/add-user-at-end-game

pull/98/head
RuiAlonso 4 years ago
commit b4a156377e

@ -1,23 +0,0 @@
<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->
## Description
<!--- Describe your changes in detail -->
## Type of Change
<!--- Put an `x` in all the boxes that apply: -->
- [ ] ✨ 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

@ -1,10 +0,0 @@
name: sandbox
on: [pull_request, push]
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.0

@ -196,15 +196,6 @@ void main() {
final gameBloc = MockGameBloc();
final tester = flameBlocTester(gameBloc: () => gameBloc);
BonusLetter _getBonusLetter(PinballGame game) {
return game.children
.whereType<BonusWord>()
.first
.children
.whereType<BonusLetter>()
.first;
}
setUp(() {
whenListen(
gameBloc,
@ -217,11 +208,11 @@ void main() {
'adds BonusLetterActivated to GameBloc when not activated',
(game, tester) async {
await game.ready();
_getBonusLetter(game).activate();
final bonusLetter = game.descendants().whereType<BonusLetter>().first;
bonusLetter.activate();
await game.ready();
await tester.pump();
verify(() => gameBloc.add(const BonusLetterActivated(0))).called(1);
},
);
@ -241,10 +232,11 @@ void main() {
Stream.value(state),
initialState: state,
);
await game.ready();
_getBonusLetter(game).activate();
await game.ready(); // Making sure that all additions are done
await game.ready();
final bonusLetter = game.descendants().whereType<BonusLetter>().first;
bonusLetter.activate();
await game.ready();
verifyNever(() => gameBloc.add(const BonusLetterActivated(0)));
},
@ -253,8 +245,6 @@ void main() {
tester.widgetTest(
'adds a ColorEffect',
(game, tester) async {
await game.ready();
const state = GameState(
score: 0,
balls: 2,
@ -263,7 +253,9 @@ void main() {
bonusHistory: [],
);
final bonusLetter = _getBonusLetter(game);
await game.ready();
final bonusLetter = game.descendants().whereType<BonusLetter>().first;
bonusLetter.activate();
bonusLetter.onNewState(state);
await tester.pump();
@ -278,8 +270,6 @@ void main() {
tester.widgetTest(
'only listens when there is a change on the letter status',
(game, tester) async {
await game.ready();
const state = GameState(
score: 0,
balls: 2,
@ -288,7 +278,9 @@ void main() {
bonusHistory: [],
);
final bonusLetter = _getBonusLetter(game);
await game.ready();
final bonusLetter = game.descendants().whereType<BonusLetter>().first;
bonusLetter.activate();
expect(
bonusLetter.listenWhen(const GameState.initial(), state),

Loading…
Cancel
Save