Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Meet/RoomsTest.php
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | public function testRoomCreateAndEditAndDelete(): void | ||||
->click('button.room-new') | ->click('button.room-new') | ||||
->on(new RoomInfo()) | ->on(new RoomInfo()) | ||||
->assertVisible('@intro p') | ->assertVisible('@intro p') | ||||
->assertElementsCount('@nav li', 1) | ->assertElementsCount('@nav li', 1) | ||||
->assertSeeIn('@nav li a', 'General') | ->assertSeeIn('@nav li a', 'General') | ||||
->with('@general form', function ($browser) { | ->with('@general form', function ($browser) { | ||||
$browser->assertSeeIn('.row:nth-child(1) label', 'Description') | $browser->assertSeeIn('.row:nth-child(1) label', 'Description') | ||||
->assertFocused('.row:nth-child(1) input') | ->assertFocused('.row:nth-child(1) input') | ||||
->type('.row:nth-child(1) input', 'test123'); | ->type('.row:nth-child(1) input', 'test123') | ||||
->assertSeeIn('.row:nth-child(2) label', 'Subscriptions') | |||||
->with('@skus', function ($browser) { | |||||
$browser->assertElementsCount('tbody tr', 1) | |||||
->assertSeeIn('tbody tr:nth-child(1) td.name', 'Conference room') | |||||
->assertSeeIn('tbody tr:nth-child(1) td.price', '0,00 CHF/month') | |||||
->assertChecked('tbody tr:nth-child(1) td.selection input') | |||||
->assertDisabled('tbody tr:nth-child(1) td.selection input') | |||||
->assertTip( | |||||
'tbody tr:nth-child(1) td.buttons button', | |||||
'Audio & Video Conference room' | |||||
); | |||||
}); | |||||
}) | }) | ||||
->click('@general button[type=submit]') | ->click('@general button[type=submit]') | ||||
->assertToast(Toast::TYPE_SUCCESS, "Room created successfully.") | ->assertToast(Toast::TYPE_SUCCESS, "Room created successfully.") | ||||
->on(new RoomList()) | ->on(new RoomList()) | ||||
->whenAvailable('@table', function ($browser) { | ->whenAvailable('@table', function ($browser) { | ||||
$browser->assertElementsCount('tbody tr', 3); | $browser->assertElementsCount('tbody tr', 3); | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |