mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Replace search link on main page to point to chill_main_search and fix tests
This commit is contained in:
parent
51d6bed43d
commit
fc955e2995
@ -35,7 +35,7 @@
|
||||
<input type="password" name="_password" />
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
<br/>
|
||||
<button type="submit">{{ 'Login'|trans }}</button>
|
||||
<button type="submit" name="login">{{ 'Login'|trans }}</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
||||
<div class="grid-8 centered">
|
||||
<h2>{{ 'Search a person'|trans }}</h2>
|
||||
|
||||
<form action="{{ path('chill_person_search') }}" method="get">
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input name="q" type="search" placeholder="{{ 'Person name'|trans }}" />
|
||||
<center>
|
||||
<button type="submit" class="sc-button orange"><i class="fa fa-search"></i> {{ 'Search a person'|trans }}</button>
|
||||
|
@ -9,13 +9,21 @@ class LoginControllerTest extends WebTestCase
|
||||
{
|
||||
public function testLogin()
|
||||
{
|
||||
$client = static::createClient();
|
||||
$client = static::createClient(array(
|
||||
'framework' => array(
|
||||
'default_locale' => 'en',
|
||||
'translator' => array(
|
||||
'fallback' => 'en'
|
||||
)
|
||||
),
|
||||
|
||||
));
|
||||
|
||||
//load login page and submit form
|
||||
$crawler = $client->request('GET', '/login');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$buttonCrawlerNode = $crawler->selectButton('Login');
|
||||
$buttonCrawlerNode = $crawler->selectButton('login');
|
||||
$form = $buttonCrawlerNode->form();
|
||||
|
||||
$client->submit($form, array(
|
||||
@ -40,7 +48,7 @@ class LoginControllerTest extends WebTestCase
|
||||
$logoutLinkFilter = $crawler->filter('a:contains("Logout")');
|
||||
|
||||
//check there is > 0 logout link
|
||||
$this->assertGreaterThan(0, $logoutLinkFilter->count());
|
||||
$this->assertGreaterThan(0, $logoutLinkFilter->count(), 'check that a logout link is present');
|
||||
|
||||
//click on logout link
|
||||
$client->followRedirects(false);
|
||||
|
@ -7,8 +7,8 @@ framework:
|
||||
form: true
|
||||
csrf_protection: true
|
||||
session: ~
|
||||
default_locale: fr
|
||||
translator: { fallback: fr }
|
||||
default_locale: en
|
||||
translator: { fallback: en }
|
||||
profiler: { only_exceptions: false }
|
||||
templating:
|
||||
engines: ['twig']
|
||||
|
Loading…
x
Reference in New Issue
Block a user