Skip to content
Snippets Groups Projects
Commit 6a65cc2a authored by Lily Yan's avatar Lily Yan Committed by Liam Morland
Browse files

ISTWCMS-4764 Rewrite comments in order to make them clear

parent d816285c
No related branches found
No related tags found
3 merge requests!433ISTWCMS-6296 Create test for all event dates test cases,!136Istwcms 4725 ebremner config sync,!126Feature/istwcms 4764 l26yan remove ff top level remove button
...@@ -1200,21 +1200,20 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -1200,21 +1200,20 @@ class UwWcmsBasicTest extends BrowserTestBase {
$smallhighlight = $this->assertSession()->optionExists('default_value_input[field_uw_ff_info][0][style]', 'small'); $smallhighlight = $this->assertSession()->optionExists('default_value_input[field_uw_ff_info][0][style]', 'small');
$this->assertTrue($smallhighlight); $this->assertTrue($smallhighlight);
$this->assertEquals('Small highlight', $smallhighlight->getText()); $this->assertEquals('Small highlight', $smallhighlight->getText());
// Test case 2: // Check the configure block by adding facts and figures.
// Make sure adding facts and figures block, the config
// block includes 'Small highlight' with value 'small',
// the default color is 'Default[uWaterloo]' and not have "none" option.
$this->drupalGet('node/1/layout'); $this->drupalGet('node/1/layout');
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
$this->clickLink('Add block'); $this->clickLink('Add block');
$this->clickLink('Facts and figures'); $this->clickLink('Facts and figures');
// The top-level remove button doesn't exist. // The top-level remove button doesn't exist.
$this->assertNoFieldByName('settings_block_form_field_uw_ff_fact_figure_0_remove'); $this->assertNoFieldByName('settings_block_form_field_uw_ff_fact_figure_0_remove');
// The default color is 'Default[uWaterloo]' and not have "none" option.
$options = $this->getOptions('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]'); $options = $this->getOptions('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_ff_def_color]');
foreach ($options as $option) { foreach ($options as $option) {
$this->assertNotEqual('- None -', $option); $this->assertNotEqual('- None -', $option);
} }
$this->assertFieldByXPath('//option[@value="org-default" and @selected="selected"]', NULL, 'Default uWaterloo is selected.'); $this->assertFieldByXPath('//option[@value="org-default" and @selected="selected"]', NULL, 'Default uWaterloo is selected.');
// The type includes 'Small highlight' with value 'small'.
$smallhighlight = $this->assertSession()->optionExists('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_fact_figure][0][subform][field_uw_ff_info][0][style]', 'small'); $smallhighlight = $this->assertSession()->optionExists('settings[block_form][field_uw_ff_fact_figure][0][subform][field_uw_fact_figure][0][subform][field_uw_ff_info][0][style]', 'small');
$this->assertTrue($smallhighlight); $this->assertTrue($smallhighlight);
$this->assertEquals('Small highlight', $smallhighlight->getText()); $this->assertEquals('Small highlight', $smallhighlight->getText());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment