Merge branch 'develop' into feature/60-implement-drift-database

# Conflicts:
#	lib/views/active_game_view.dart
#	lib/views/create_game_view.dart
#	lib/views/graph_view.dart
#	lib/views/main_menu_view.dart
#	lib/views/round_view.dart
#	pubspec.yaml
This commit is contained in:
2025-08-21 19:19:32 +02:00
54 changed files with 11273 additions and 2485 deletions

View File

@@ -9,6 +9,7 @@ void main() {
setUp(() {
session = GameSession(
id: '1',
createdAt: testDate,
gameTitle: testTitle,
players: testPlayers,
@@ -61,11 +62,6 @@ void main() {
});
group('Helper Functions', () {
test('getLengthOfPlayerNames', () {
expect(session.getLengthOfPlayerNames(),
equals(15)); // Alice(5) + Bob(3) + Charlie(7)
});
test('increaseRound', () {
expect(session.roundNumber, 1);
session.increaseRound();
@@ -115,15 +111,15 @@ void main() {
expect(session.roundList[0].caboPlayerIndex, 0);
});
test('updatePoints - game not finished', () async {
test('updatePoints - game not finished', () {
session.addRoundScoresToList(1, [10, 20, 30], [10, 20, 30], 0);
await session.updatePoints();
session.updatePoints();
expect(session.isGameFinished, isFalse);
});
test('updatePoints - game finished', () async {
test('updatePoints - game finished', () {
session.addRoundScoresToList(1, [101, 20, 30], [101, 20, 30], 0);
await session.updatePoints();
session.updatePoints();
expect(session.isGameFinished, isTrue);
});
@@ -155,9 +151,9 @@ void main() {
expect(session.playerScores, equals([50, 0, 30]));
});
test('_setWinner via updatePoints', () async {
test('_setWinner via updatePoints', () {
session.addRoundScoresToList(1, [101, 20, 30], [101, 0, 30], 1);
await session.updatePoints();
session.updatePoints();
expect(session.winner, 'Bob'); // Bob has lowest score (20)
});
});