mirror of
https://github.com/koel/koel
synced 2024-12-01 00:09:17 +00:00
Add E2E test for footer
This commit is contained in:
parent
0448214abd
commit
58829905d7
1 changed files with 48 additions and 0 deletions
48
tests/e2e/PlaybackControlsTest.php
Normal file
48
tests/e2e/PlaybackControlsTest.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace E2E;
|
||||
|
||||
/**
|
||||
* Class PlaybackControlsTest
|
||||
*
|
||||
* Tests the playback controls (the footer buttons).
|
||||
*
|
||||
* @package E2E
|
||||
*/
|
||||
class PlaybackControlsTest extends TestCase
|
||||
{
|
||||
public function testPlaybackControls()
|
||||
{
|
||||
$this->loginAndWait();
|
||||
|
||||
// Show and hide the extra panel
|
||||
$this->click('#mainFooter .control.info');
|
||||
$this->notSee('#extra');
|
||||
$this->click('#mainFooter .control.info');
|
||||
$this->see('#extra');
|
||||
|
||||
// Show and hide the Presets
|
||||
$this->click('#mainFooter .control.equalizer');
|
||||
$this->see('#equalizer');
|
||||
// clicking anywhere else should close the equalizer
|
||||
$this->click('#extra');
|
||||
$this->notSee('#equalizer');
|
||||
|
||||
// Circle around the repeat state
|
||||
$this->click('#mainFooter .control.repeat');
|
||||
$this->see('#mainFooter .control.repeat.REPEAT_ALL');
|
||||
$this->click('#mainFooter .control.repeat');
|
||||
$this->see('#mainFooter .control.repeat.REPEAT_ONE');
|
||||
$this->click('#mainFooter .control.repeat');
|
||||
$this->see('#mainFooter .control.repeat.NO_REPEAT');
|
||||
|
||||
// Mute/unmute
|
||||
$currentValue = $this->el('#volumeRange')->getAttribute('value');
|
||||
$this->click('#volume .fa-volume-up');
|
||||
$this->see('#mainFooter .fa-volume-off');
|
||||
static::assertEquals(0, $this->el('#volumeRange')->getAttribute('value'));
|
||||
$this->click('#volume .fa-volume-off');
|
||||
$this->see('#mainFooter .fa-volume-up');
|
||||
static::assertEquals($currentValue, $this->el('#volumeRange')->getAttribute('value'));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue