99class FormLibrariesInModalTest extends DuskTestCase
1010{
1111 /** @test */
12- public function it_can_autosize_the_textarea ()
12+ public function it_can_autosize_the_textarea_in_a_modal ()
1313 {
1414 $ this ->browse (function (Browser $ browser ) {
1515 $ browser ->visit ('modal/base ' )
1616 ->waitForText ('ModalComponent ' )
17+ ->pause (250 )
1718 ->click ('@libraries ' )
1819 ->waitForText ('FormComponents ' )
20+ ->pause (250 )
1921 ->type ('textarea ' , Lorem::text (1000 ))
2022 ->assertAttributeContains ('textarea ' , 'style ' , 'height ' );
2123 });
@@ -46,9 +48,13 @@ public function it_can_use_the_choices_js_library_for_a_multiple_select_element_
4648 ->waitForText ('FormComponents ' )
4749 ->pause (500 )
4850 ->choicesSelect ('countries[] ' , 'NL ' )
51+ ->pause (100 )
4952 ->assertSee ('Selected countries: NL ' )
53+ ->pause (100 )
5054 ->choicesSelect ('countries[] ' , 'BE ' )
55+ ->pause (100 )
5156 ->assertSee ('Selected countries: NL, BE ' )
57+ ->pause (100 )
5258 ->choicesRemoveItem ('countries[] ' , 'NL ' )
5359 ->assertSee ('Selected countries: BE ' );
5460 });
@@ -64,7 +70,7 @@ public function it_can_close_the_choices_js_library_without_selecting_an_option(
6470 ->waitForText ('FormComponents ' )
6571 ->click ('@select-choices ' )
6672 ->whenAvailable ('div.choices.is-open ' , function (Browser $ browser ) {
67- $ coordinates = $ browser ->script ("return document.querySelector('[dusk= \"text \"]').getBoundingClientRect() " );
73+ $ coordinates = $ browser ->pause ( 250 )-> script ("return document.querySelector('[dusk= \"text \"]').getBoundingClientRect() " );
6874
6975 $ browser ->clickAtPoint ($ coordinates [0 ]['x ' ], $ coordinates [0 ]['y ' ])
7076 ->pause (500 )
0 commit comments