Commit 584d7b11 authored by NickWilde's avatar NickWilde

Fix: Issue #2822418 by NickWilde: Tests are missing

Improve test
parent aae244cc
......@@ -56,8 +56,8 @@ class StyleSlideshowTest extends PluginTestBase {
$this->drupalGet('test-style-slideshow');
// Ensure no controls are displayed.
$this->assertFalse($this->cssSelect('.views-slideshow-controls-top'));
$this->assertFalse($this->cssSelect('.views-slideshow-controls-bottom'));
$this->assertFalse(count($this->cssSelect('.views-slideshow-controls-top')));
$this->assertFalse(count($this->cssSelect('.views-slideshow-controls-bottom')));
// Test top widget position.
$view = View::load('test_style_slideshow');
......@@ -75,10 +75,12 @@ class StyleSlideshowTest extends PluginTestBase {
$view->save();
$this->drupalGet('test-style-slideshow');
$this->assertTrue($this->cssSelect('.views-slideshow-controls-top'));
$this->assertFalse($this->cssSelect('.views-slideshow-controls-bottom'));
$this->assertTrue(count($this->cssSelect('.views-slideshow-controls-top')));
$this->assertFalse(count($this->cssSelect('.views-slideshow-controls-bottom')));
// Test bottom widget position.
$view = View::load('test_style_slideshow');
$display = &$view->getDisplay('default');
$display['display_options']['style']['options']['widgets'] = [
'bottom' => [
'views_slideshow_controls' => [
......@@ -93,8 +95,8 @@ class StyleSlideshowTest extends PluginTestBase {
$view->save();
$this->drupalGet('test-style-slideshow');
$this->assertFalse($this->cssSelect('.views-slideshow-controls-top'));
$this->assertTrue($this->cssSelect('.views-slideshow-controls-bottom'));
$this->assertFalse(count($this->cssSelect('.views-slideshow-controls-top')));
$this->assertTrue(count($this->cssSelect('.views-slideshow-controls-bottom')));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment