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
469eb4e9
Commit
469eb4e9
authored
4 years ago
by
Lily Yan
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4722 Test to make sure cta block has no icon option
parent
8796dca4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!433
ISTWCMS-6296 Create test for all event dates test cases
,
!136
Istwcms 4725 ebremner config sync
,
!107
ISTWCMS-4722 Test to make sure cta block has no icon option
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/UwWcmsBasicTest.php
+28
-0
28 additions, 0 deletions
tests/src/Functional/UwWcmsBasicTest.php
with
28 additions
and
0 deletions
tests/src/Functional/UwWcmsBasicTest.php
+
28
−
0
View file @
469eb4e9
...
...
@@ -1009,6 +1009,21 @@ class UwWcmsBasicTest extends BrowserTestBase {
private
function
ctaBlockTest
()
{
$this
->
drupalLogin
(
$this
->
drupalUsers
[
'administrator'
]);
// Make sure the type of CTA text details doesn't include 'icon'
// under Text details settings.
$this
->
drupalGet
(
'admin/structure/paragraphs_type/uw_para_call_to_action/fields/paragraph.uw_para_call_to_action.field_uw_cta_text_details'
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
$small
=
$this
->
assertSession
()
->
optionExists
(
'default_value_input[field_uw_cta_text_details][0][style]'
,
'small'
);
$this
->
assertTrue
(
$small
);
$this
->
assertEquals
(
'Small'
,
$small
->
getText
());
$medium
=
$this
->
assertSession
()
->
optionExists
(
'default_value_input[field_uw_cta_text_details][0][style]'
,
'medium'
);
$this
->
assertTrue
(
$medium
);
$this
->
assertEquals
(
'Medium'
,
$medium
->
getText
());
$big
=
$this
->
assertSession
()
->
optionExists
(
'default_value_input[field_uw_cta_text_details][0][style]'
,
'big'
);
$this
->
assertTrue
(
$big
);
$this
->
assertEquals
(
'Big'
,
$big
->
getText
());
$this
->
assertSession
()
->
optionNotExists
(
'default_value_input[field_uw_cta_text_details][0][style]'
,
'icon/image'
);
// Make sure CTA link field and theme required.
$this
->
drupalGet
(
'admin/structure/paragraphs_type/uw_para_call_to_action/fields/paragraph.uw_para_call_to_action.field_uw_cta_link'
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
...
...
@@ -1041,6 +1056,19 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertEquals
(
'js-form-required form-required'
,
$ctatheme
->
getAttribute
(
'class'
));
$this
->
assertSession
()
->
pageTextNotContains
(
'Link text'
);
// Make sure the type of CTA text details doesn't include 'icon'
// when add 'call to action' block.
$small
=
$this
->
assertSession
()
->
optionExists
(
'settings[block_form][field_uw_cta_details][0][subform][field_uw_cta_text_details][0][style]'
,
'small'
);
$this
->
assertTrue
(
$small
);
$this
->
assertEquals
(
'Small'
,
$small
->
getText
());
$medium
=
$this
->
assertSession
()
->
optionExists
(
'settings[block_form][field_uw_cta_details][0][subform][field_uw_cta_text_details][0][style]'
,
'medium'
);
$this
->
assertTrue
(
$medium
);
$this
->
assertEquals
(
'Medium'
,
$medium
->
getText
());
$big
=
$this
->
assertSession
()
->
optionExists
(
'settings[block_form][field_uw_cta_details][0][subform][field_uw_cta_text_details][0][style]'
,
'big'
);
$this
->
assertTrue
(
$big
);
$this
->
assertEquals
(
'Big'
,
$big
->
getText
());
$this
->
assertSession
()
->
optionNotExists
(
'settings[block_form][field_uw_cta_details][0][subform][field_uw_cta_text_details][0][style]'
,
'icon/image'
);
// Use random string as cta label, saving for later compare.
$cta_label
=
$this
->
randomString
();
...
...
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