Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
colorbox-3183921
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Issue forks
colorbox-3183921
Commits
5467ba20
Commit
5467ba20
authored
Apr 08, 2020
by
Neslee Canil Pinto
Committed by
Neslee
Apr 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3023262
by idebr, oknate: ColorboxJavascriptTest is failing
parent
658361d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
config/schema/colorbox.schema.yml
config/schema/colorbox.schema.yml
+1
-1
tests/src/FunctionalJavascript/ColorboxJavascriptTest.php
tests/src/FunctionalJavascript/ColorboxJavascriptTest.php
+5
-7
No files found.
config/schema/colorbox.schema.yml
View file @
5467ba20
...
...
@@ -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
...
...
tests/src/FunctionalJavascript/ColorboxJavascriptTest.php
View file @
5467ba20
...
...
@@ -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\
Javascript
TestBase
;
use
Drupal\
simpletest
\ContentTypeCreationTrait
;
use
Drupal\
simpletest
\NodeCreationTrait
;
use
Drupal\FunctionalJavascriptTests\
WebDriver
TestBase
;
use
Drupal\
Tests\node\Traits
\ContentTypeCreationTrait
;
use
Drupal\
Tests\node\Traits
\NodeCreationTrait
;
/**
* Test the colorbox JavaScript.
*
* @group colorbox
*/
class
ColorboxJavascriptTest
extends
Javascript
TestBase
{
class
ColorboxJavascriptTest
extends
WebDriver
TestBase
{
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_de
tect
_width'
,
'1200px'
);
$this
->
changeSetting
(
'advanced.mobile_de
vice
_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'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment