display client notes in client list
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-07-17 17:33:48 +02:00
parent f90d5db40a
commit fc23f7a619
4 changed files with 71 additions and 5 deletions

View File

@ -41,6 +41,36 @@ final class ClientsLifecycleTest extends QdbTestCase
$this->assertSame($code, $res['data']['clientCode']);
}
public function testClientListIncludesFollowupNote(): void
{
$token = $this->api()->loginWebAndGetToken(
DatabaseSeeder::ADMIN_USERNAME,
DatabaseSeeder::PASSWORD
)['token'];
$code = $this->fixture()->clientCode;
$note = 'Clients list note check';
$save = $this->api()->withToken($token, 'PUT', 'analytics', [
'clientCode' => $code,
'note' => $note,
]);
$this->assertApiOk($save);
$list = $this->api()->withToken($token, 'GET', 'clients', null, [
'archiveFilter' => 'all',
]);
$this->assertApiOk($list);
$match = null;
foreach ($list['data']['clients'] ?? [] as $row) {
if (($row['clientCode'] ?? '') === $code) {
$match = $row;
break;
}
}
$this->assertNotNull($match);
$this->assertSame($note, $match['note'] ?? null);
}
public function testArchiveHidesClientFromListsAndFollowUp(): void
{
$this->submitFixtureQuestionnaire();