Commit 5467ba20 authored by Neslee Canil Pinto's avatar Neslee Canil Pinto Committed by Neslee

Issue #3023262 by idebr, oknate: ColorboxJavascriptTest is failing

parent 658361d7
......@@ -113,7 +113,7 @@ colorbox.settings:
type: integer
label: 'Mobile detection'
mobile_device_width:
type: 'string'
type: string
label: 'Device width'
caption_trim:
type: integer
......
......@@ -5,16 +5,16 @@ namespace Drupal\Tests\colorbox\FunctionalJavascript;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\file\Entity\File;
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
use Drupal\simpletest\ContentTypeCreationTrait;
use Drupal\simpletest\NodeCreationTrait;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
/**
* Test the colorbox JavaScript.
*
* @group colorbox
*/
class ColorboxJavascriptTest extends JavascriptTestBase {
class ColorboxJavascriptTest extends WebDriverTestBase {
use NodeCreationTrait;
use ContentTypeCreationTrait;
......@@ -75,7 +75,6 @@ class ColorboxJavascriptTest extends JavascriptTestBase {
->setComponent('field_test_image', [
'type' => 'colorbox',
'settings' => ['colorbox_caption' => 'alt'],
'status' => TRUE,
])
->save();
drupal_flush_all_caches();
......@@ -92,7 +91,7 @@ class ColorboxJavascriptTest extends JavascriptTestBase {
*/
public function testMobileDetection() {
$this->changeSetting('advanced.mobile_detect', TRUE);
$this->changeSetting('advanced.mobile_detect_width', '1200px');
$this->changeSetting('advanced.mobile_device_width', '1200px');
$this->getSession()->resizeWindow(200, 200);
$this->drupalGet('node/' . $this->node->id());
$this->assertSession()->elementAttributeContains('css', '#colorbox', 'style', 'display: none;');
......@@ -157,7 +156,6 @@ class ColorboxJavascriptTest extends JavascriptTestBase {
->setComponent('field_test_image', [
'type' => 'colorbox',
'settings' => [],
'status' => TRUE,
])
->save();
file_unmanaged_copy(DRUPAL_ROOT . '/core/modules/simpletest/files/image-1.png', 'public://test.png');
......
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