-
Notifications
You must be signed in to change notification settings - Fork 2
/
SmokeTest.php
55 lines (43 loc) · 1.53 KB
/
SmokeTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
declare(strict_types=1);
namespace App\Tests;
use PHPUnit\Framework\Attributes\CoversNothing;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\UX\LiveComponent\Test\InteractsWithLiveComponents;
#[CoversNothing]
final class SmokeTest extends WebTestCase
{
use InteractsWithLiveComponents;
public function testIndex(): void
{
$client = static::createClient();
$client->request('GET', '/');
self::assertResponseIsSuccessful();
self::assertSelectorTextContains('h1', 'Welcome');
self::assertSelectorCount(3, '.card');
}
public function testRag(): void
{
$client = static::createClient();
$client->request('GET', '/rag');
self::assertResponseIsSuccessful();
self::assertSelectorTextContains('h4', 'Retrieval Augmented Generation with the Symfony blog');
self::assertSelectorCount(1, '#chat-submit');
}
public function testYouTube(): void
{
$client = static::createClient();
$client->request('GET', '/youtube');
self::assertResponseIsSuccessful();
self::assertSelectorTextContains('h4', 'Chat about a YouTube Video');
self::assertSelectorCount(1, '#chat-submit');
}
public function testWikipedia(): void
{
$client = static::createClient();
$client->request('GET', '/wikipedia');
self::assertResponseIsSuccessful();
self::assertSelectorTextContains('h4', 'Wikipedia Research');
self::assertSelectorCount(1, '#chat-submit');
}
}