Commit 417bc899 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-4535 Change assertFieldById() to assertSession()->fieldExists()

Change record:
https://www.drupal.org/node/3129738
parent 30b3b6cd
......@@ -1093,7 +1093,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
foreach ($types as $type) {
$this->drupalGet('node/add/' . $type);
$this->assertSession()->statusCodeEquals(200);
$this->assertFieldById('edit-field-uw-meta-description-0-value');
$this->assertSession()->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->assertFieldById('edit-settings-label');
$this->assertSession()->fieldExists('edit-settings-label');
$this->assertSession()->pageTextContains('Timeline style');
$this->assertFieldById('edit-settings-block-form-field-uw-timeline-style');
$this->assertSession()->fieldExists('edit-settings-block-form-field-uw-timeline-style');
$this->assertSession()->pageTextContains('Timeline sort');
$this->assertFieldById('edit-settings-block-form-field-uw-timeline-sort');
$this->assertSession()->fieldExists('edit-settings-block-form-field-uw-timeline-sort');
$this->assertSession()->pageTextContains('Date');
$this->assertFieldById('edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-date-0-value-date');
$this->assertSession()->fieldExists('edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-date-0-value-date');
$this->assertSession()->pageTextContains('Headline');
$this->assertFieldById('edit-settings-block-form-field-uw-timeline-0-subform-field-uw-timeline-headline-0-value');
$this->assertSession()->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');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment