koel/tests/e2e/PlaylistScreenTest.php

35 lines
960 B
PHP
Raw Normal View History

2016-11-18 07:56:18 +00:00
<?php
namespace E2E;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
class PlaylistScreenTest extends TestCase
{
use SongListActions;
public function testPlaylistScreen()
{
$this->loginAndWait()
->goto('songs')
->selectRange()
->createPlaylist('Bar');
$this->waitUntil(WebDriverExpectedCondition::textToBePresentInElement(
WebDriverBy::cssSelector('#playlists > ul'), 'Bar'
));
$this->click('#sidebar .playlist:nth-last-child(1)');
$this->waitUntil(WebDriverExpectedCondition::visibilityOfElementLocated(
WebDriverBy::id('playlistWrapper')
));
$this->click('#playlistWrapper .btn-delete-playlist');
// expect a confirmation
$this->waitUntil(WebDriverExpectedCondition::visibilityOfElementLocated(
WebDriverBy::cssSelector('.sweet-alert')
));
}
}