]> git.cworth.org Git - empires-server/commit
Expand test suite to include testing of auto-phase advancement
authorCarl Worth <cworth@cworth.org>
Fri, 26 Jun 2020 14:26:05 +0000 (07:26 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 26 Jun 2020 14:26:05 +0000 (07:26 -0700)
commitc79d4a69a16751758d627a57bea93db9ac712888
tree803ccacf250a1e090447fbfc99baacbf0e49ef18
parentd847a53da957e652a0b22a8b09b267e09bd0fe39
Expand test suite to include testing of auto-phase advancement

The previous commit makes it so that when all involved players are
ready to move on, (such as, everyone has submitted their answers), the
game automatically advances to the next phase.

This breaks some existing tests, which had been expecting the game to
wait for everyone to vote to advance (the old, clunky behavior).

In this commit, we fix the test suite to expect the auto advancing in
the first ame (while also adding a check to ensure it doesn't
auto-advance until the last player is ready).

We also add a second game where auto advancing doesn't happen, (one
player is never ready) but a majority of the remaining players vote to
advance without them.

These tests do exhibit a couple of bugs in the current implementation,
(so some failures are expected here). These failures will be fixed in
the immediately following commits.
test