Skip to content

Commit 170e5ca

Browse files
committed
wait
1 parent ca6ebd5 commit 170e5ca

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/Turbo/tests/BroadcastTest.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ protected function setUp(): void
3535

3636
public function testBroadcastBasic(): void
3737
{
38-
($client = self::createPantherClient(['browser' => static::FIREFOX]))->request('GET', '/books');
38+
($client = self::createPantherClient())->request('GET', '/books');
39+
$client->wait();
3940

4041
$crawler = $client->submitForm('Submit', ['title' => self::BOOK_TITLE]);
4142
// $client->waitForElementToContain('#books div', self::BOOK_TITLE);
@@ -54,7 +55,8 @@ public function testBroadcastBasic(): void
5455

5556
public function testExpressionLanguageBroadcast(): void
5657
{
57-
($client = self::createPantherClient(['browser' => static::FIREFOX]))->request('GET', '/artists');
58+
($client = self::createPantherClient())->request('GET', '/artists');
59+
$client->wait();
5860

5961
$client->submitForm('Submit', ['name' => self::ARTIST_NAME_1]);
6062
$client->waitForElementToContain('#artists div:nth-child(1)', self::ARTIST_NAME_1, 5);
@@ -72,8 +74,11 @@ public function testExpressionLanguageBroadcast(): void
7274
$artist1Id = $matches[1][0];
7375
$artist2Id = $matches[1][1];
7476

75-
($clientArtist1 = self::createAdditionalPantherClient(['browser' => static::FIREFOX]))->request('GET', '/artists/'.$artist1Id);
76-
($clientArtist2 = self::createAdditionalPantherClient(['browser' => static::FIREFOX]))->request('GET', '/artists/'.$artist2Id);
77+
($clientArtist1 = self::createAdditionalPantherClient())->request('GET', '/artists/'.$artist1Id);
78+
$clientArtist1->wait();
79+
80+
($clientArtist2 = self::createAdditionalPantherClient())->request('GET', '/artists/'.$artist2Id);
81+
$clientArtist2->wait();
7782

7883
$client->request('GET', '/songs');
7984

@@ -93,7 +98,8 @@ public function testExpressionLanguageBroadcast(): void
9398
public function testBroadcastWithProxy(): void
9499
{
95100
// testing that Artist is updated, even though it's saved as Proxy
96-
($client = self::createPantherClient(['browser' => static::FIREFOX]))->request('GET', '/artistFromSong');
101+
($client = self::createPantherClient())->request('GET', '/artistFromSong');
102+
$client->wait();
97103

98104
// submit first time to create the artist
99105
$client->submitForm('Submit');

src/Turbo/tests/TurboFrameTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TurboFrameTest extends PantherTestCase
2020
{
2121
public function testFrame(): void
2222
{
23-
($client = self::createPantherClient(['browser' => static::FIREFOX]))->request('GET', '/');
23+
($client = self::createPantherClient())->request('GET', '/');
2424

2525
$client->clickLink('This block is scoped, the rest of the page will not change if you click here!');
2626
$this->assertSelectorWillContain('body', 'This will replace the content of the Turbo Frame!');

src/Turbo/tests/TurboStreamTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class TurboStreamTest extends PantherTestCase
2020
{
2121
public function testStream(): void
2222
{
23-
($client = self::createPantherClient(['browser' => static::FIREFOX]))->request('GET', '/');
23+
($client = self::createPantherClient())->request('GET', '/');
2424

2525
$client->submitForm('Trigger Turbo Stream!');
2626
$this->assertSelectorWillContain('body', 'This div replaces the existing element with the DOM ID "form".');

0 commit comments

Comments
 (0)