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
5dc8886e
Commit
5dc8886e
authored
4 years ago
by
Lily Yan
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4656 Add test function to make sure anchor button in active toolbar
parent
5443083c
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
,
!120
ISTWCMS-4656 Add test function to make sure anchor button in active toolbar
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/UwWcmsBasicTest.php
+25
-0
25 additions, 0 deletions
tests/src/Functional/UwWcmsBasicTest.php
with
25 additions
and
0 deletions
tests/src/Functional/UwWcmsBasicTest.php
+
25
−
0
View file @
5dc8886e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
Drupal\Tests\uw_base_profile\Functional
;
namespace
Drupal\Tests\uw_base_profile\Functional
;
use
Drupal\Component\Serialization\Json
;
use
Drupal\Core\StringTranslation\StringTranslationTrait
;
use
Drupal\Core\StringTranslation\StringTranslationTrait
;
use
Drupal\Core\Url
;
use
Drupal\Core\Url
;
use
Drupal\Tests\BrowserTestBase
;
use
Drupal\Tests\BrowserTestBase
;
...
@@ -93,6 +94,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
...
@@ -93,6 +94,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
mediaTypesTest
();
$this
->
mediaTypesTest
();
$this
->
redirectsTest
();
$this
->
redirectsTest
();
$this
->
uwLdapTest
();
$this
->
uwLdapTest
();
$this
->
ckeditorButtonsTest
();
}
}
/**
/**
...
@@ -1895,4 +1897,27 @@ class UwWcmsBasicTest extends BrowserTestBase {
...
@@ -1895,4 +1897,27 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertEquals
(
$test_in
,
$test_out
,
'formatResults() gives correct results.'
);
$this
->
assertEquals
(
$test_in
,
$test_out
,
'formatResults() gives correct results.'
);
}
}
/**
* Tests for CKEditor buttons.
*/
public
function
ckeditorButtonsTest
()
{
$this
->
drupalLogin
(
$this
->
drupalUsers
[
'administrator'
]);
// Create function to encode HTML as we expect it in drupalSettings.
$json_encode
=
function
(
$html
)
{
return
trim
(
Json
::
encode
(
$html
),
'"'
);
};
$textformats
=
[
'uw_tf_standard'
,
'uw_tf_full_html'
,
'uw_tf_basic'
,
];
foreach
(
$textformats
as
$textformat
)
{
$this
->
drupalGet
(
'admin/config/content/formats/manage/'
.
$textformat
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
$this
->
assertRaw
(
$json_encode
(
'<li data-drupal-ckeditor-button-name="Anchor" class="ckeditor-button"><a href="#" role="button" title="Anchor" aria-label="Anchor">'
));
}
}
}
}
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