mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +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="password" name="_password" />
|
||||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||||
<br/>
|
<br/>
|
||||||
<button type="submit">{{ 'Login'|trans }}</button>
|
<button type="submit" name="login">{{ 'Login'|trans }}</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
<div class="grid-8 centered">
|
<div class="grid-8 centered">
|
||||||
<h2>{{ 'Search a person'|trans }}</h2>
|
<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 }}" />
|
<input name="q" type="search" placeholder="{{ 'Person name'|trans }}" />
|
||||||
<center>
|
<center>
|
||||||
<button type="submit" class="sc-button orange"><i class="fa fa-search"></i> {{ 'Search a person'|trans }}</button>
|
<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()
|
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
|
//load login page and submit form
|
||||||
$crawler = $client->request('GET', '/login');
|
$crawler = $client->request('GET', '/login');
|
||||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||||
|
|
||||||
$buttonCrawlerNode = $crawler->selectButton('Login');
|
$buttonCrawlerNode = $crawler->selectButton('login');
|
||||||
$form = $buttonCrawlerNode->form();
|
$form = $buttonCrawlerNode->form();
|
||||||
|
|
||||||
$client->submit($form, array(
|
$client->submit($form, array(
|
||||||
@ -40,7 +48,7 @@ class LoginControllerTest extends WebTestCase
|
|||||||
$logoutLinkFilter = $crawler->filter('a:contains("Logout")');
|
$logoutLinkFilter = $crawler->filter('a:contains("Logout")');
|
||||||
|
|
||||||
//check there is > 0 logout link
|
//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
|
//click on logout link
|
||||||
$client->followRedirects(false);
|
$client->followRedirects(false);
|
||||||
|
@ -7,8 +7,8 @@ framework:
|
|||||||
form: true
|
form: true
|
||||||
csrf_protection: true
|
csrf_protection: true
|
||||||
session: ~
|
session: ~
|
||||||
default_locale: fr
|
default_locale: en
|
||||||
translator: { fallback: fr }
|
translator: { fallback: en }
|
||||||
profiler: { only_exceptions: false }
|
profiler: { only_exceptions: false }
|
||||||
templating:
|
templating:
|
||||||
engines: ['twig']
|
engines: ['twig']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user