Added automated test for language files

This commit is contained in:
Hillel Coren 2016-08-02 10:41:04 +03:00
parent 4807d8b05e
commit 2924e03a17
6 changed files with 209 additions and 977 deletions

View File

@ -81,9 +81,11 @@
<div class="panel-heading" style="background-color:#0b4d78 !important"> <div class="panel-heading" style="background-color:#0b4d78 !important">
<h3 class="panel-title in-bold-white"> <h3 class="panel-title in-bold-white">
<i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.activity') }} <i class="glyphicon glyphicon-exclamation-sign"></i> {{ trans('texts.activity') }}
@if ($invoicesSent)
<div class="pull-right" style="font-size:14px;padding-top:4px"> <div class="pull-right" style="font-size:14px;padding-top:4px">
{{ trans_choice('texts.invoices_sent', $invoicesSent) }} {{ trans_choice('texts.invoices_sent', $invoicesSent) }}
</div> </div>
@endif
</h3> </h3>
</div> </div>
<ul class="panel-body list-group" style="height:276px;overflow-y:auto;"> <ul class="panel-body list-group" style="height:276px;overflow-y:auto;">

View File

@ -28,7 +28,7 @@ class AcceptanceTester extends \Codeception\Actor
{ {
//if ($I->loadSessionSnapshot('login')) return; //if ($I->loadSessionSnapshot('login')) return;
$I->amOnPage('/login'); $I->amOnPage('/login?lang=en');
$I->see('Login'); $I->see('Login');
$I->fillField(['name' => 'email'], Fixtures::get('username')); $I->fillField(['name' => 'email'], Fixtures::get('username'));
$I->fillField(['name' => 'password'], Fixtures::get('password')); $I->fillField(['name' => 'password'], Fixtures::get('password'));

View File

@ -1,4 +1,4 @@
<?php //[STAMP] 37380042138360812111baed01969345 <?php //[STAMP] 9e3612a6f7f898dfad5d3ce657f63dd5
namespace _generated; namespace _generated;
// This class was automatically generated by build task // This class was automatically generated by build task

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,14 @@ $I->checkIfLogin($I);
$I->wantTo('Test all pages load'); $I->wantTo('Test all pages load');
// Check all language files
$count = $I->grabNumRecords('languages');
for ($i=1; $i<=$count; $i++) {
$locale = $I->grabFromDatabase('languages', 'locale', ['id' => $i]);
$I->amOnPage("/dashboard?lang={$locale}");
$I->seeElement('.navbar-brand');
}
// Top level navigation // Top level navigation
$I->amOnPage('/dashboard'); $I->amOnPage('/dashboard');
$I->see('Total Revenue'); $I->see('Total Revenue');