Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_base_profile
Commits
8107e366
Commit
8107e366
authored
Sep 22, 2021
by
Lily Yan
Browse files
ISTWCMS-4535 Change assertFieldChecked() to assertSession()->checkboxChecked()
Change record:
https://www.drupal.org/node/3129738
parent
ab8dc593
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/src/Functional/UwWcmsBasicTest.php
View file @
8107e366
...
...
@@ -990,11 +990,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
// Make sure content blog post some are checked, and some are not checked.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-article'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-organization'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-person'
);
...
...
@@ -1002,11 +1002,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-blog-0-schema-web-page'
);
// Make sure content catalog item some are checked, and some are not.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-web-page'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-web-page'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-organization'
);
...
...
@@ -1014,11 +1014,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-catalog-item-0-schema-service'
);
// Make sure content contact some are checked, and some are not.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-person'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-person'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-organization'
);
...
...
@@ -1026,11 +1026,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-contact-0-schema-web-page'
);
// Make sure content event some are checked, and some are not checked.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-event'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-organization'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-person'
);
...
...
@@ -1038,11 +1038,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-event-0-schema-web-page'
);
// Make sure content news item some are checked, and some are not checked.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-article'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-organization'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-person'
);
...
...
@@ -1050,11 +1050,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-news-item-0-schema-web-page'
);
// Make sure content profile some are checked, and some are not.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-person'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-person'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-organization'
);
...
...
@@ -1062,11 +1062,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-profile-0-schema-web-page'
);
// Make sure content web page some are checked, and some are not checked.
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-basic'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-advanced'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-open-graph'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-twitter-cards'
);
$this
->
assert
Field
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-schema-web-page'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-basic'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-advanced'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-open-graph'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-twitter-cards'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-schema-web-page'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-schema-article'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-schema-event'
);
$this
->
assertNoFieldChecked
(
'edit-entity-type-groups-node-uw-ct-web-page-0-schema-organization'
);
...
...
@@ -1308,7 +1308,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Add new content type.
$this
->
drupalGet
(
'admin/structure/types/add'
);
// Test that "Preview before submitting" is set to "Disabled".
$this
->
assert
Field
Checked
(
'edit-preview-mode-0'
);
$this
->
assert
Session
()
->
checkbox
Checked
(
'edit-preview-mode-0'
);
$this
->
assertNoFieldChecked
(
'edit-preview-mode-1'
);
$this
->
assertNoFieldChecked
(
'edit-preview-mode-2'
);
...
...
Write
Preview
Supports
Markdown
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