Commit c0d05ce0 authored by Johan Vervloet's avatar Johan Vervloet

Fix html ID's on score sheet, closes #138.

parent e7652060
Pipeline #128974784 passed with stages
in 5 minutes and 32 seconds
# Changelog
## [1.0.1] - Unreleased
### Changed
- Bugfix HTML identifiers, #138.
## [1.0]
### Added
......
......@@ -43,11 +43,11 @@
v-for="player in orderedPlayers"
v-bind:class="{'table-primary':(line.dealer === player.playerIdentifier)}"
v-bind:key="player.playerIdentifier"
:id="'score_' + line.game + '_' + player.playerIdentifier"
:id="'score_' + line.line + '_' + player.playerIdentifier"
>
{{ line.scores[player.playerIdentifier] }}
</td>
<td class="note" :id="'note_' + line.game"> {{ $t(line.note) }} </td>
<td class="note" :id="'note_' + line.line"> {{ $t(line.note) }} </td>
</tr>
<!--
<tr class='loading' v-if="loading">
......
......@@ -29,6 +29,7 @@ final class TestIds
const TEST_TABLE_16 = 'B1ABFD91-2143-491A-8B80-41C857B88895';
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 PLAYER_SECRETARIS = '87bdf1ee-5102-4c19-9975-2cb0a6b1d6f8';
const PLAYER_PENNINGMEESTER = '5d46004d-eb1b-41a6-af37-9a92c0acde2a';
......
......@@ -117,4 +117,11 @@ final class TestTable
TestIds::TEST_TABLE_18
);
}
public static function table19(): TableIdentifier
{
return TableIdentifier::fromString(
TestIds::TEST_TABLE_19
);
}
}
......@@ -297,6 +297,21 @@ final class TestDataCommand extends Command
);
$this->testTableBuilder->buildTableWithFourPlayersReadyToPlay(TestTable::table18());
$this->testTableBuilder->buildTableWithFivePlayersReadyToPlay(TestTable::table19());
$this->commandBus->dispatch(
new PassAround(
TestTable::table19(),
GameNumber::first()
),
new LogGame(
TestTable::table19(),
GameNumber::first(),
new AloneSpecification(),
new SinglePlayerAnnouncement(TestPlayer::secretaris()),
new NumberOfTricks(5)
)
);
$io->success('Test data loaded.');
}
......
<?php
declare(strict_types=1);
namespace App\Tests\acceptance;
use App\TestData\TestDataBuilders\TestIds;
use App\Tests\AcceptanceTester;
final class PassAroundCest
{
/**
* See https://gitlab.com/rva-vzw/dikdikdik/-/issues/138.
*/
public function checkScoreLineNumbersInHtml(AcceptanceTester $i): void
{
$i->amOnPage('/en/table/'.TestIds::TEST_TABLE_19);
$i->waitForElementVisible('#note_1');
$i->see('compensation passed around', '#note_1');
$i->see('alone', '#note_2');
$i->see('-1', '#score_1_'.TestIds::PLAYER_SECRETARIS);
$i->see('-19', '#score_2_'.TestIds::PLAYER_SECRETARIS);
}
}
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