Commit 5d008e53 authored by Lily Yan's avatar Lily Yan
Browse files

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

Change record:
https://www.drupal.org/node/3129738
parent 2e8376a1
......@@ -1753,7 +1753,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->assertSession()->pageTextContains('When gold is selected, the default colour will always be black.');
// Check 'Default background colour' field default value.
$this->assertFieldByXPath('//option[@value="grey" and @selected="selected"]', NULL, 'Grey is selected.');
$this->assertFieldByName('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]');
$this->assertSession()->fieldExists('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]');
// Select 'gold', then 'Default background colour' field is gone.
$this->getSession()->getPage()->selectFieldOption('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_dbg_color]', 'gold');
$this->assertTrue($this->assertSession()->optionExists('Default background colour', 'gold')->isSelected());
......
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