Commit 3730fd50 authored by Johan Vervloet's avatar Johan Vervloet

Add translation for alone5 on watcher page, #149.

Closes #149.
parent 9085429b
Pipeline #179713487 passed with stages
in 5 minutes and 30 seconds
......@@ -10,6 +10,7 @@
- Upgrade to Symfony 5, #141.
- Use version 0.6 of rva-vzw/krakboem, #146.
- Updated yarn and javascript dependencies, #148.
- Fixed translation on watcher page, #149.
## [1.0.1] - 2020-03-23
......
......@@ -5,26 +5,28 @@
"en": {
"note": "note",
"prop_and_cop": "prop & cop",
"alone": "alone",
"alone": "alone (6)",
"abundance": "abundance",
"misere": "misère",
"misere_ot_table": "misère on the table",
"solo": "abundance declared (solo)",
"soloslim": "royal abundance declared",
"compensation_passed_around": "compensation passed around",
"correction": "correction"
"correction": "correction",
"alone5": "alone (5)"
},
"nl": {
"note": "noot",
"prop_and_cop": "vraag & mee",
"alone": "alleen",
"alone": "alleen (6)",
"abundance": "abondance",
"misere": "miserie",
"misere_ot_table": "miserie op tafel",
"solo": "solo",
"soloslim": "soloslim",
"compensation_passed_around": "uitbetaling ronde pas",
"correction": "correctie"
"correction": "correctie",
"alone5": "alleen (5)"
}
}
</i18n>
......
......@@ -30,6 +30,7 @@ final class TestIds
const TEST_TABLE_17 = 'A489A432-A898-498A-B1B5-6A3CFE4280A0';
const TEST_TABLE_18 = '0CA72D91-4CC6-4188-B90B-9F34B1AD5916';
const TEST_TABLE_19 = '6B1F8723-BEBF-4BC1-B79C-24058B0ABF6B';
const TEST_TABLE_20 = '6d2fb96a-3833-4fe9-834f-f460c5c9feb9';
const PLAYER_SECRETARIS = '87bdf1ee-5102-4c19-9975-2cb0a6b1d6f8';
const PLAYER_PENNINGMEESTER = '5d46004d-eb1b-41a6-af37-9a92c0acde2a';
......
......@@ -4,6 +4,8 @@ namespace App\TestData\TestDataBuilders;
use App\Domain\WriteModel\Table\TableIdentifier;
// FIXME: This is a lousy class.
final class TestTable
{
public static function table3(): TableIdentifier
......@@ -124,4 +126,11 @@ final class TestTable
TestIds::TEST_TABLE_19
);
}
public static function table20(): TableIdentifier
{
return TableIdentifier::fromString(
TestIds::TEST_TABLE_20
);
}
}
......@@ -7,6 +7,7 @@ use App\Domain\ValueObject\Announcement\SinglePlayerAnnouncement;
use App\Domain\ValueObject\Announcement\TroelAwareMultiPlayerAnnouncement;
use App\Domain\ValueObject\Announcement\TwoPlayerAnnouncement;
use App\Domain\ValueObject\Game\AbundanceSpecification;
use App\Domain\ValueObject\Game\Alone5Specification;
use App\Domain\ValueObject\Game\AloneSpecification;
use App\Domain\ValueObject\Game\MisereOnTheTableSpecification;
use App\Domain\ValueObject\Game\MisereSpecification;
......@@ -18,8 +19,10 @@ use App\Domain\ValueObject\Outcome\Winners;
use App\Domain\ValueObject\Player\PlayerIdentifier;
use App\Domain\ValueObject\Player\PlayerIdentifiers;
use App\Domain\ValueObject\Seat;
use App\Domain\ValueObject\TableConfiguration;
use App\Domain\WriteModel\Table\Command\AnnounceDealer;
use App\Domain\WriteModel\Table\Command\AnnounceFinalRound;
use App\Domain\WriteModel\Table\Command\ConfigureTable;
use App\Domain\WriteModel\Table\Command\IdentifyPlayer;
use App\Domain\WriteModel\Table\Command\JoinPlayer;
use App\Domain\WriteModel\Table\Command\KickPlayer;
......@@ -313,6 +316,21 @@ final class TestDataCommand extends Command
)
);
$this->testTableBuilder->buildTableWithFourPlayersReadyToPlay(TestTable::table20());
$this->commandBus->dispatch(
new ConfigureTable(
TestTable::table20(),
TableConfiguration::default()->withAlone5Enabled()
),
new LogGame(
TestTable::table20(),
GameNumber::first(),
new Alone5Specification(),
new SinglePlayerAnnouncement(TestPlayer::secretaris()),
new NumberOfTricks(5)
)
);
$io->success('Test data loaded.');
return 0;
......
......@@ -4,7 +4,9 @@ declare(strict_types=1);
namespace App\Tests\acceptance;
use App\Domain\WriteModel\ScoreSheet\ScoreSheetIdentifier;
use App\TestData\TestDataBuilders\TestIds;
use App\TestData\TestDataBuilders\TestTable;
use App\Tests\AcceptanceTester;
use PHPUnit\Framework\Assert;
......@@ -19,4 +21,14 @@ final class WatcherLinkCest
$thingy = $i->grabValueFrom('share-link');
Assert::assertNotFalse(strpos($thingy, '/nl/scores/'));
}
public function itTranslatesAlone5(AcceptanceTester $i): void
{
// See #149.
// http://localhost:8080/en/scores/e0033ff5-a4e9-545a-b4e1-92ecff338506
$i->amOnPage('/en/scores/'.ScoreSheetIdentifier::forTable(TestTable::table20())->toString());
$i->waitForElement('#note_1');
$i->see('alone (5)', '#note_1');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment