Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_base_profile
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_base_profile
Commits
abac0e99
Commit
abac0e99
authored
3 years ago
by
Lily Yan
Committed by
Igor Biki
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4763 Test Default background colour field
parent
797a14de
No related branches found
No related tags found
3 merge requests
!433
ISTWCMS-6296 Create test for all event dates test cases
,
!136
Istwcms 4725 ebremner config sync
,
!128
ISTWCMS-4763 Test Default background colour field
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/UwWcmsBasicTest.php
+11
-0
11 additions, 0 deletions
tests/src/Functional/UwWcmsBasicTest.php
with
11 additions
and
0 deletions
tests/src/Functional/UwWcmsBasicTest.php
+
11
−
0
View file @
abac0e99
...
@@ -1326,6 +1326,17 @@ class UwWcmsBasicTest extends BrowserTestBase {
...
@@ -1326,6 +1326,17 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
clickLink
(
'Facts and figures'
);
$this
->
clickLink
(
'Facts and figures'
);
// The top-level remove button doesn't exist.
// The top-level remove button doesn't exist.
$this
->
assertNoFieldByName
(
'settings_block_form_field_uw_ff_fact_figure_0_remove'
);
$this
->
assertNoFieldByName
(
'settings_block_form_field_uw_ff_fact_figure_0_remove'
);
// Check 'Default background colour' field help text.
$this
->
assertSession
()
->
pageTextContains
(
'When gold is selected, the default colour will always be black.'
);
// Check 'Default background colour' field default value.
$this
->
assertFieldByXPath
(
'//option[@value="grey" and @selected="selected"]'
,
NULL
,
'Grey is selected.'
);
$this
->
assertFieldByName
(
'settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]'
);
// Select 'gold', then 'Default background colour' field is gone.
$this
->
getSession
()
->
getPage
()
->
selectFieldOption
(
'settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_dbg_color]'
,
'gold'
);
$this
->
assertTrue
(
$this
->
assertSession
()
->
optionExists
(
'Default background colour'
,
'gold'
)
->
isSelected
());
// Select 'black', then 'Default background colour' field shows.
$this
->
getSession
()
->
getPage
()
->
selectFieldOption
(
'settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_dbg_color]'
,
'black'
);
$this
->
assertTrue
(
$this
->
assertSession
()
->
optionExists
(
'Default background colour'
,
'black'
)
->
isSelected
());
// The default color is 'Default[uWaterloo]' and not have "none" option.
// The default color is 'Default[uWaterloo]' and not have "none" option.
$options
=
$this
->
getOptions
(
'settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]'
);
$options
=
$this
->
getOptions
(
'settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]'
);
foreach
(
$options
as
$option
)
{
foreach
(
$options
as
$option
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment