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
417bc899
Commit
417bc899
authored
Sep 22, 2021
by
Lily Yan
Browse files
ISTWCMS-4535 Change assertFieldById() to assertSession()->fieldExists()
Change record:
https://www.drupal.org/node/3129738
parent
30b3b6cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/src/Functional/UwWcmsBasicTest.php
View file @
417bc899
...
...
@@ -1093,7 +1093,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
foreach
(
$types
as
$type
)
{
$this
->
drupalGet
(
'node/add/'
.
$type
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
$this
->
assert
FieldById
(
'edit-field-uw-meta-description-0-value'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-field-uw-meta-description-0-value'
);
$this
->
assertSession
()
->
buttonExists
(
'edit-field-uw-meta-image-open-button'
);
}
}
...
...
@@ -1292,15 +1292,15 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Test timeline Step 7: Check all fields and buttons of timeline block.
$this
->
assertSession
()
->
pageTextContains
(
'Title'
);
$this
->
assert
FieldById
(
'edit-settings-label'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-settings-label'
);
$this
->
assertSession
()
->
pageTextContains
(
'Timeline style'
);
$this
->
assert
FieldById
(
'edit-settings-block-form-field-uw-timeline-style'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-settings-block-form-field-uw-timeline-style'
);
$this
->
assertSession
()
->
pageTextContains
(
'Timeline sort'
);
$this
->
assert
FieldById
(
'edit-settings-block-form-field-uw-timeline-sort'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-settings-block-form-field-uw-timeline-sort'
);
$this
->
assertSession
()
->
pageTextContains
(
'Date'
);
$this
->
assert
FieldById
(
'edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-date-0-value-date'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-date-0-value-date'
);
$this
->
assertSession
()
->
pageTextContains
(
'Headline'
);
$this
->
assert
FieldById
(
'edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-headline-0-value'
);
$this
->
assert
Session
()
->
fieldExists
(
'edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-headline-0-value'
);
$this
->
assertSession
()
->
pageTextContains
(
'One or both of the "Headline" and "Content" fields must be populated.'
);
$this
->
assertSession
()
->
pageTextContains
(
'PHOTO'
);
$this
->
assertSession
()
->
buttonExists
(
'Add media'
);
...
...
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