Commit 59bd5322 authored by Johan Vervloet's avatar Johan Vervloet

Updated tests, #130

parent 0c3d3a96
Pipeline #122066569 failed with stages
in 5 minutes and 50 seconds
# Changelog
## [0.5] - 2020-02-29
### Changed
- Threw in some bootstrap in an attempt to make the app prettier.
(I messed up the html doing so 😭)
## [0.4] - 2020-02-25
### Added
......
......@@ -20,7 +20,7 @@
v-if="tableId && player.status !== 3"
v-on:click="kickPlayer(player.playerIdentifier)"
>
<i class="fa fa-trash-o"></i>
<i class="delete-icon fa fa-trash-o"></i>
</button>
<button class="btn"
v-if="tableId && player.status === 3"
......
......@@ -350,8 +350,8 @@
<br>
<h2>{{$t('no_game')}}</h2>
<div v-if="tablePermissions.log_game" class="part">
<div v-if="tablePermissions.log_game" class="part" id="no-game-buttons">
<h2>{{$t('no_game')}}</h2>
<div>
<button class="btn btn-outline-primary" type="button" v-on:click="passAround">{{$t('passed_around')}}</button>
<button class="btn btn-outline-primary" type="button" v-on:click="proposeNobodyAlong">{{$t('proposed_nobody_along')}}</button>
......
......@@ -17,8 +17,8 @@ final class DealerCest
{
$i->amOnPage('/en/table/'.TestIds::TEST_TABLE_3);
$i->waitForText('penn', null, 'th.dealer');
$i->see('penn', 'th.dealer');
$i->waitForText('penn', null, 'th.table-primary');
$i->see('penn', 'th.table-primary');
}
/**
......@@ -38,7 +38,7 @@ final class DealerCest
$i->selectOption('new_dealer', TestIds::PLAYER_DTL);
$i->seeOptionIsSelected('new_dealer', 'dtl');
// A cell should be highlighted because there is a dealer.
$i->waitForElement('td.dealer');
$i->waitForElement('td.table-primary');
// Select another dealer
$i->selectOption('new_dealer', TestIds::PLAYER_TLM);
......@@ -47,8 +47,8 @@ final class DealerCest
$i->reloadPage();
$i->waitForText('penn');
$i->waitForText('tlm', null, 'th.dealer');
$i->see('tlm', 'th.dealer');
$i->waitForText('tlm', null, 'th.table-primary');
$i->see('tlm', 'th.table-primary');
}
public function checkDealerDropDownIsOnlyEnabledWhenIActuallyCanAnnounceADealer(AcceptanceTester $i)
......@@ -60,7 +60,7 @@ final class DealerCest
$i->waitForElement($enabledDealerDropDown);
$disableSecretarisSelector = "//th[@data-playerid='".TestPlayer::secretaris()->toString()."']/button[contains(text(), '🗑')]";
$disableSecretarisSelector = "//th[@data-playerid='".TestPlayer::secretaris()->toString()."']/button/i[contains(@class, 'delete-icon')]";
$i->click($disableSecretarisSelector);
$i->waitForElementNotVisible($enabledDealerDropDown);
......@@ -69,7 +69,7 @@ final class DealerCest
$i->waitForElement($enabledDealerDropDown);
$i->selectOption('new_dealer', TestIds::PLAYER_PENNINGMEESTER);
$i->waitForElement('td.dealer');
$i->waitForElement('td.table-primary');
// Can still change the dealer, because no game was logged.
$i->seeElement($enabledDealerDropDown);
}
......
......@@ -43,7 +43,7 @@ final class KickPlayerCest
private function getDeactivateButtonSelector(PlayerIdentifier $playerIdentifier): string
{
return "//th[@data-playerid='".$playerIdentifier->toString()."']/button[contains(text(), '🗑')]";
return "//th[@data-playerid='".$playerIdentifier->toString()."']/button/i[contains(@class, 'delete-icon')]";
}
private function getReactivateButtonSelector(PlayerIdentifier $playerIdentifier): string
......
......@@ -13,10 +13,10 @@ final class ProposeNobodyAlongCest
{
$i->amOnPage('/en/table/'.TestIds::TEST_TABLE_14);
$i->waitForText('dtl', null, 'th.dealer');
$i->waitForElement('//input[@value="Proposed, nobody along"]');
$i->waitForText('dtl', null, 'th.table-primary');
$i->waitForElement('#no-game-buttons');
$i->click('Proposed, nobody along');
$i->waitForText('tlm', null, 'th.dealer');
$i->waitForText('tlm', null, 'th.table-primary');
}
}
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