Skip to content
Snippets Groups Projects
Verified Commit 3a7f877f authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #8931 badge nb document

parent 6add7156
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
<testsuites>
<testsuite name="Maarch Test Suite">
<file>test/unitTests/core/AuthenticationControllerTest.php</file>
<file>test/unitTests/core/PasswordControllerTest.php</file>
<file>test/unitTests/app/user/UserControllerTest.php</file>
<file>test/unitTests/app/document/DocumentControllerTest.php</file>
</testsuite>
......
......@@ -117,7 +117,7 @@ class AuthenticationModel
'lang' => empty($previousCookie['lang']) ? CoreConfigModel::getLanguage() : $previousCookie['lang'],
'cookieKey' => $cookieKey
]);
setcookie('maarchParapheurAuth', base64_encode($cookieData), $cookieTime, $cookiePath, '', false, false);
@setcookie('maarchParapheurAuth', base64_encode($cookieData), $cookieTime, $cookiePath, '', false, false);
return true;
}
......
......@@ -13,8 +13,8 @@
<header class="sidebar-header">
</header>
<section class="sidebar-btn">
<button class="btn btn-xs blue filter" [ngClass]="[mode == 'NOTE' ? 'active' : '']" (click)="filter('NOTE')">Annotation <span class="badgeNbDocument">{{signaturesService.documentsListCount["NOTE"]}}</span></button>
<button class="btn btn-xs blue filter" [ngClass]="[mode == 'SIGN' ? 'active' : '']" (click)="filter('SIGN')">Paraphe <span class="badgeNbDocument">{{signaturesService.documentsListCount["SIGN"]}}</span></button>
<button class="btn btn-xs blue filter" [ngClass]="[mode == 'NOTE' ? 'active' : '']" (click)="filter('NOTE')">Annotation <span *ngIf="signaturesService.documentsListCount['NOTE']" class="badgeNbDocument">{{signaturesService.documentsListCount["NOTE"]}}</span></button>
<button class="btn btn-xs blue filter" [ngClass]="[mode == 'SIGN' ? 'active' : '']" (click)="filter('SIGN')">Paraphe <span *ngIf="signaturesService.documentsListCount['SIGN']" class="badgeNbDocument">{{signaturesService.documentsListCount["SIGN"]}}</span></button>
</section>
</div>
<ul #listContent class="nav" detect-scroll (onScroll)="handleScroll($event)" [bottomOffset]="1" [topOffset]="1">
......
<?php
/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
use PHPUnit\Framework\TestCase;
class PasswordControllerTest extends TestCase
{
public function testGet()
{
$passwordController = new \SrcCore\controllers\PasswordController();
$environment = \Slim\Http\Environment::mock(['REQUEST_METHOD' => 'GET']);
$request = \Slim\Http\Request::createFromEnvironment($environment);
$response = $passwordController->get($request, new \Slim\Http\Response());
$responseBody = json_decode((string)$response->getBody());
$this->assertNotEmpty($responseBody->rules);
foreach ($responseBody->rules as $value) {
$this->assertNotEmpty($value->id);
$this->assertInternalType('int', $value->id);
$this->assertNotEmpty($value->label);
$this->assertInternalType('int', $value->value);
$this->assertInternalType('boolean', $value->enabled);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment