Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Meet/RoomControlsTest.php
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | /* | ||||
->click('@session button.link-fullscreen.open') | ->click('@session button.link-fullscreen.open') | ||||
->assertVisible('nav') | ->assertVisible('nav') | ||||
->assertVisible('@toolbar'); | ->assertVisible('@toolbar'); | ||||
}); | }); | ||||
*/ | */ | ||||
} | } | ||||
/** | /** | ||||
* Test nickname and muting audio/video | * Test nickname and audio/video muting/volume controls | ||||
* | * | ||||
* @group openvidu | * @group openvidu | ||||
*/ | */ | ||||
public function testNicknameAndMuting(): void | public function testNicknameAndMuting(): void | ||||
{ | { | ||||
$this->browse(function (Browser $owner, Browser $guest) { | $this->browse(function (Browser $owner, Browser $guest) { | ||||
// Join the room as an owner (authenticate) | // Join the room as an owner (authenticate) | ||||
$owner->visit(new RoomPage('john')) | $owner->visit(new RoomPage('john')) | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | public function testNicknameAndMuting(): void | ||||
$guest->with('div.meet-video:not(.self)', function (Browser $browser) { | $guest->with('div.meet-video:not(.self)', function (Browser $browser) { | ||||
$browser->click('.controls button.link-audio') | $browser->click('.controls button.link-audio') | ||||
->assertAudioMuted('video', true) | ->assertAudioMuted('video', true) | ||||
->assertVisible('.controls button.link-audio.text-danger') | ->assertVisible('.controls button.link-audio.text-danger') | ||||
->click('.controls button.link-audio') | ->click('.controls button.link-audio') | ||||
->assertAudioMuted('video', false) | ->assertAudioMuted('video', false) | ||||
->assertVisible('.controls button.link-audio:not(.text-danger)'); | ->assertVisible('.controls button.link-audio:not(.text-danger)'); | ||||
}); | }); | ||||
// Test volume control | |||||
$guest->mouseover('@menu') | |||||
->with('div.meet-video:not(.self)', function (Browser $browser) { | |||||
$browser->waitUntilMissing('.volume') | |||||
->mouseover('.controls button.link-audio') | |||||
->waitFor('.volume') | |||||
->assertValue('.volume input', '1') | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->keys('.volume input', ['{arrow_down}']) | |||||
->assertValue('.volume input', '0') | |||||
->assertAudioMuted('video', true) | |||||
->assertVisible('.controls button.link-audio.text-danger') | |||||
->click('.controls button.link-audio') | |||||
->assertAudioMuted('video', false) | |||||
->assertValue('.volume input', '1') | |||||
->click('.controls button.link-audio') | |||||
->assertAudioMuted('video', true) | |||||
->assertValue('.volume input', '0') | |||||
->keys('.volume input', ['{arrow_up}']) | |||||
->assertValue('.volume input', '0.1') | |||||
->assertAudioMuted('video', false) | |||||
->assertVisible('.controls button.link-audio:not(.text-danger)') | |||||
->mouseover('.meet-nickname') | |||||
->waitUntilMissing('.volume'); | |||||
}); | |||||
}); | }); | ||||
} | } | ||||
/** | /** | ||||
* Test text chat | * Test text chat | ||||
* | * | ||||
* @group openvidu | * @group openvidu | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |