@@ -27,7 +27,7 @@ class BroadcastTest extends PantherTestCase
27
27
protected function setUp (): void
28
28
{
29
29
if (!file_exists (__DIR__ .'/app/public/build ' )) {
30
- throw new \Exception (\sprintf ('Move into %s and execute Encore before running this test. ' , realpath (__DIR__ .'/app ' )));
30
+ throw new \Exception (\sprintf ('Move into "%s" and execute Encore before running this test. ' , realpath (__DIR__ .'/app ' )));
31
31
}
32
32
33
33
parent ::setUp ();
@@ -38,7 +38,7 @@ public function testBroadcastBasic(): void
38
38
($ client = self ::createPantherClient ())->request ('GET ' , '/books ' );
39
39
40
40
$ crawler = $ client ->submitForm ('Submit ' , ['title ' => self ::BOOK_TITLE ]);
41
- $ client ->waitForElementToContain ('#books div ' , self ::BOOK_TITLE );
41
+ // $client->waitForElementToContain('#books div', self::BOOK_TITLE);
42
42
43
43
$ this ->assertSelectorWillContain ('#books ' , self ::BOOK_TITLE );
44
44
if (!preg_match ('/\(#(\d+)\)/ ' , $ crawler ->filter ('#books div ' )->text (), $ matches )) {
@@ -57,9 +57,10 @@ public function testExpressionLanguageBroadcast(): void
57
57
($ client = self ::createPantherClient ())->request ('GET ' , '/artists ' );
58
58
59
59
$ client ->submitForm ('Submit ' , ['name ' => self ::ARTIST_NAME_1 ]);
60
- $ client ->waitForElementToContain ('#artists div:nth-child(1) ' , self ::ARTIST_NAME_1 );
60
+ $ client ->waitForElementToContain ('#artists div:nth-child(1) ' , self ::ARTIST_NAME_1 , 5 );
61
+
61
62
$ client ->submitForm ('Submit ' , ['name ' => self ::ARTIST_NAME_2 ]);
62
- $ client ->waitForElementToContain ('#artists div:nth-child(2) ' , self ::ARTIST_NAME_2 );
63
+ $ client ->waitForElementToContain ('#artists div:nth-child(2) ' , self ::ARTIST_NAME_2 , 5 );
63
64
64
65
$ crawlerArtist = $ client ->getCrawler ();
65
66
@@ -78,7 +79,7 @@ public function testExpressionLanguageBroadcast(): void
78
79
79
80
$ client ->submitForm ('Submit ' , ['title ' => self ::SONG_TITLE , 'artistId ' => $ artist1Id ]);
80
81
81
- $ clientArtist1 ->waitForElementToContain ('#songs div ' , self ::SONG_TITLE );
82
+ $ clientArtist1 ->waitForElementToContain ('#songs div ' , self ::SONG_TITLE , 5 );
82
83
83
84
$ songsElement = $ clientArtist2 ->findElement (WebDriverBy::cssSelector ('#songs ' ));
84
85
0 commit comments