Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Meet/RoomsTest.php
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | public function testRooms(): void | ||||
->click('@links a.link-chat') | ->click('@links a.link-chat') | ||||
->on(new RoomList()) | ->on(new RoomList()) | ||||
->whenAvailable('@table', function ($browser) { | ->whenAvailable('@table', function ($browser) { | ||||
$browser->assertElementsCount('tbody tr', 2) | $browser->assertElementsCount('tbody tr', 2) | ||||
->assertElementsCount('thead th', 3) | ->assertElementsCount('thead th', 3) | ||||
->with('tbody tr:nth-child(1)', function ($browser) { | ->with('tbody tr:nth-child(1)', function ($browser) { | ||||
$browser->assertSeeIn('td:nth-child(1) a', 'john') | $browser->assertSeeIn('td:nth-child(1) a', 'john') | ||||
->assertSeeIn('td:nth-child(2) a', "Standard room") | ->assertSeeIn('td:nth-child(2) a', "Standard room") | ||||
->assertVisible('td.buttons button') | ->assertElementsCount('td.buttons button', 2) | ||||
->assertAttribute('td.buttons button', 'title', 'Enter the room'); | ->assertAttribute('td.buttons button:nth-child(1)', 'title', 'Copy room location') | ||||
->assertAttribute('td.buttons button:nth-child(2)', 'title', 'Enter the room'); | |||||
}) | }) | ||||
->with('tbody tr:nth-child(2)', function ($browser) { | ->with('tbody tr:nth-child(2)', function ($browser) { | ||||
$browser->assertSeeIn('td:nth-child(1) a', 'shared') | $browser->assertSeeIn('td:nth-child(1) a', 'shared') | ||||
->assertSeeIn('td:nth-child(2) a', "Shared room") | ->assertSeeIn('td:nth-child(2) a', "Shared room") | ||||
->assertVisible('td.buttons button') | ->assertElementsCount('td.buttons button', 2) | ||||
->assertAttribute('td.buttons button', 'title', 'Enter the room'); | ->assertAttribute('td.buttons button:nth-child(1)', 'title', 'Copy room location') | ||||
->assertAttribute('td.buttons button:nth-child(2)', 'title', 'Enter the room'); | |||||
}) | }) | ||||
->click('tbody tr:nth-child(1) button'); | ->click('tbody tr:nth-child(1) button:nth-child(2)'); | ||||
}); | }); | ||||
$newWindow = collect($browser->driver->getWindowHandles())->last(); | $newWindow = collect($browser->driver->getWindowHandles())->last(); | ||||
$browser->driver->switchTo()->window($newWindow); | $browser->driver->switchTo()->window($newWindow); | ||||
$browser->on(new RoomPage('john')) | $browser->on(new RoomPage('john')) | ||||
// check that entering the room skips the logon form | // check that entering the room skips the logon form | ||||
->assertMissing('@toolbar') | ->assertMissing('@toolbar') | ||||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |