Loading .phpcs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <!--Exclude folders used by common frontend tools. These folders match the file_scan_ignore_directories setting in default.settings.php--> <exclude-pattern>*/node_modules/*</exclude-pattern> <exclude-pattern>*/bower_components/*</exclude-pattern> <exclude-pattern>*/tests/features/bootstrap/*</exclude-pattern> <!-- <exclude-pattern>*/tests/features/bootstrap/*</exclude-pattern> --> <!--Exclude minimized css.--> <exclude-pattern>*/*.min.css</exclude-pattern> Loading tests/features/bootstrap/VarbaseContext.php +2469 −2471 Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ use WebDriver\Exception; use Drupal\DrupalExtension\Context\RawDrupalContext; use Behat\Behat\Context\SnippetAcceptingContext; use Behat\Mink\Exception\ElementHtmlException; use Behat\Mink\Element\Element; use Behat\Gherkin\Node\TableNode; /** * Defines application features from the specific context. Loading Loading @@ -669,15 +667,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * ========================================================= * =========================================================. * * Section Configuration Functions * * ========================================================= * =========================================================. */ /** * Add a basic section at the end of layout * Add a basic section at the end of layout. * * Varbase Context #varbase * Loading Loading @@ -713,7 +711,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section container type * Select a section container type. * * Varbase Context #varbase * Loading @@ -735,7 +733,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section container width * Select a section container width. * * Varbase Context #varbase * Loading @@ -753,7 +751,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section breakpoint * Select a section breakpoint. * * Varbase Context #varbase * Loading @@ -775,7 +773,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select with gutters option for section * Select with gutters option for section. * * Varbase Context #varbase * Loading @@ -793,7 +791,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Remove gutters between columns * Remove gutters between columns. * * Varbase Context #varbase * Loading @@ -811,7 +809,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Move to the section styles tab * Move to the section styles tab. * * Varbase Context #varbase * Loading @@ -829,7 +827,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Open a specific setting menu under styles tab in section configuration * Open a specific setting menu under styles tab in section configuration. * * Varbase Context #varbase * Loading @@ -855,7 +853,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section background color * Select a section background color. * * Varbase Context #varbase * Loading @@ -874,7 +872,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Uncheck the Edge to Edge Background option * Uncheck the Edge to Edge Background option. * * Varbase Contaxt #varbase * Loading @@ -893,7 +891,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section text color * Select a section text color. * * Varbase Context #varbase * Loading @@ -912,7 +910,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set alignment of text * Set alignment of text. * * Varbase Context #varbase * Loading @@ -931,7 +929,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the section blocks alignemnt * Set the section blocks alignemnt. * * #Varbase Context #varbase * Loading @@ -950,7 +948,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the padding for a section * Set the padding for a section. * * Varbase Context #varbase * Loading @@ -963,7 +961,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section :side padding to :value * @When I set the section padding to :value */ public function iSetTheSectionPaddingTo($side = NULL, $value) { public function iSetTheSectionPaddingTo($side = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Spacing"); if (is_numeric($value)) { if ($value >= 1 && $value <= 5) { Loading Loading @@ -991,7 +989,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the margin for a section * Set the margin for a section. * * Varbase Context #varbase * Loading @@ -1004,7 +1002,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section :side margin to :value * @When I set the section margin to :value */ public function iSetTheSectionMarginTo($side = NULL, $value) { public function iSetTheSectionMarginTo($side = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Spacing"); if (is_numeric($value)) { if ($value >= 1 && $value <= 5) { Loading Loading @@ -1032,7 +1030,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a border style for a section * Select a border style for a section. * * Varbase Context #varbase * Loading Loading @@ -1069,7 +1067,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border width for a section * Set the border width for a section. * * Varbase Context #varbase * Loading Loading @@ -1107,7 +1105,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border color * Set the border color. * * Varbase Context #varbase * Loading Loading @@ -1143,7 +1141,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border radius * Set the border radius. * * Varbase Context #varbase * Loading @@ -1156,7 +1154,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section border radius to :value * @When I set the section :corner border radius to :value */ public function iSetTheSectionBorderRadiusTo($corner = NULL, $value) { public function iSetTheSectionBorderRadiusTo($corner = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Border"); if (is_numeric($value)) { if ($value >= 1 && $value <= 3) { Loading @@ -1183,7 +1181,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Switch to the background image settings found under background styles settings * Switch to the background image settings found under background styles settings. * * Varbase Context #varbase * Loading @@ -1201,7 +1199,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Switch to the background video settings found under background styles settings * Switch to the background video settings found under background styles settings. * * Varbase Context #varbase * Loading @@ -1219,7 +1217,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set an image attachment to be fixed * Set an image attachment to be fixed. * * Varbase Context #varbase * Loading @@ -1236,7 +1234,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the background image size * Set the background image size. * * Varbase Context #varbase * Loading @@ -1256,7 +1254,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select an animation for a section * Select an animation for a section. * * Varbase Context #varbase * Loading @@ -1275,7 +1273,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Add a block to a section * Add a block to a section. * * Varbase Context #varbase * Loading Loading @@ -1706,7 +1704,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } } /** * Check if we can click a value in the input element. * Loading Loading @@ -2071,7 +2068,7 @@ JS; // Find the label by its text, then use that to get the radio item's ID. $radioId = NULL; /** @var $label NodeElement */ /** @var NodeElement $label */ foreach ($this->getSession()->getPage()->findAll('css', 'label') as $label) { if ($labelText === $label->getText()) { if ($label->hasAttribute('for')) { Loading @@ -2088,7 +2085,7 @@ JS; } // Now use the ID to retrieve the button and click it. // @var NodeElement $radioButton. /** @var NodeElement $radioButton. */ $radioButton = $this->getSession()->getPage()->find('css', "#$radioId"); if (!$radioButton) { throw new \Exception("$labelText radio button not found."); Loading Loading @@ -2212,7 +2209,7 @@ JS; } /** * Scroll to top * Scroll to top. * * Varbase Context #varbase. * Loading @@ -2228,7 +2225,7 @@ JS; } /** * Scroll to bottom * Scroll to bottom. * * Varbase Context #varbase. * Loading Loading @@ -2380,8 +2377,9 @@ JS; /** * Retrieve a table row containing specified entity with operations. * * @param \Behat\Mink\Element\Element * @param string * @param \Behat\Mink\Element\Element $element * The element row name. * @param string $search * The text to search for in the table row. * * @return \Behat\Mink\Element\NodeElement Loading @@ -2395,7 +2393,7 @@ JS; } foreach ($rows as $row) { if (strpos($row->getText(), $search) !== false) { if (strpos($row->getText(), $search) !== FALSE) { return $row; } } Loading Loading
.phpcs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <!--Exclude folders used by common frontend tools. These folders match the file_scan_ignore_directories setting in default.settings.php--> <exclude-pattern>*/node_modules/*</exclude-pattern> <exclude-pattern>*/bower_components/*</exclude-pattern> <exclude-pattern>*/tests/features/bootstrap/*</exclude-pattern> <!-- <exclude-pattern>*/tests/features/bootstrap/*</exclude-pattern> --> <!--Exclude minimized css.--> <exclude-pattern>*/*.min.css</exclude-pattern> Loading
tests/features/bootstrap/VarbaseContext.php +2469 −2471 Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ use WebDriver\Exception; use Drupal\DrupalExtension\Context\RawDrupalContext; use Behat\Behat\Context\SnippetAcceptingContext; use Behat\Mink\Exception\ElementHtmlException; use Behat\Mink\Element\Element; use Behat\Gherkin\Node\TableNode; /** * Defines application features from the specific context. Loading Loading @@ -669,15 +667,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * ========================================================= * =========================================================. * * Section Configuration Functions * * ========================================================= * =========================================================. */ /** * Add a basic section at the end of layout * Add a basic section at the end of layout. * * Varbase Context #varbase * Loading Loading @@ -713,7 +711,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section container type * Select a section container type. * * Varbase Context #varbase * Loading @@ -735,7 +733,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section container width * Select a section container width. * * Varbase Context #varbase * Loading @@ -753,7 +751,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section breakpoint * Select a section breakpoint. * * Varbase Context #varbase * Loading @@ -775,7 +773,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select with gutters option for section * Select with gutters option for section. * * Varbase Context #varbase * Loading @@ -793,7 +791,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Remove gutters between columns * Remove gutters between columns. * * Varbase Context #varbase * Loading @@ -811,7 +809,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Move to the section styles tab * Move to the section styles tab. * * Varbase Context #varbase * Loading @@ -829,7 +827,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Open a specific setting menu under styles tab in section configuration * Open a specific setting menu under styles tab in section configuration. * * Varbase Context #varbase * Loading @@ -855,7 +853,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section background color * Select a section background color. * * Varbase Context #varbase * Loading @@ -874,7 +872,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Uncheck the Edge to Edge Background option * Uncheck the Edge to Edge Background option. * * Varbase Contaxt #varbase * Loading @@ -893,7 +891,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a section text color * Select a section text color. * * Varbase Context #varbase * Loading @@ -912,7 +910,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set alignment of text * Set alignment of text. * * Varbase Context #varbase * Loading @@ -931,7 +929,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the section blocks alignemnt * Set the section blocks alignemnt. * * #Varbase Context #varbase * Loading @@ -950,7 +948,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the padding for a section * Set the padding for a section. * * Varbase Context #varbase * Loading @@ -963,7 +961,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section :side padding to :value * @When I set the section padding to :value */ public function iSetTheSectionPaddingTo($side = NULL, $value) { public function iSetTheSectionPaddingTo($side = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Spacing"); if (is_numeric($value)) { if ($value >= 1 && $value <= 5) { Loading Loading @@ -991,7 +989,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the margin for a section * Set the margin for a section. * * Varbase Context #varbase * Loading @@ -1004,7 +1002,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section :side margin to :value * @When I set the section margin to :value */ public function iSetTheSectionMarginTo($side = NULL, $value) { public function iSetTheSectionMarginTo($side = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Spacing"); if (is_numeric($value)) { if ($value >= 1 && $value <= 5) { Loading Loading @@ -1032,7 +1030,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select a border style for a section * Select a border style for a section. * * Varbase Context #varbase * Loading Loading @@ -1069,7 +1067,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border width for a section * Set the border width for a section. * * Varbase Context #varbase * Loading Loading @@ -1107,7 +1105,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border color * Set the border color. * * Varbase Context #varbase * Loading Loading @@ -1143,7 +1141,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the border radius * Set the border radius. * * Varbase Context #varbase * Loading @@ -1156,7 +1154,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @When I set the section border radius to :value * @When I set the section :corner border radius to :value */ public function iSetTheSectionBorderRadiusTo($corner = NULL, $value) { public function iSetTheSectionBorderRadiusTo($corner = NULL, $value = 0) { $this->iOpenTheSectionSettingsMenu("Border"); if (is_numeric($value)) { if ($value >= 1 && $value <= 3) { Loading @@ -1183,7 +1181,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Switch to the background image settings found under background styles settings * Switch to the background image settings found under background styles settings. * * Varbase Context #varbase * Loading @@ -1201,7 +1199,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Switch to the background video settings found under background styles settings * Switch to the background video settings found under background styles settings. * * Varbase Context #varbase * Loading @@ -1219,7 +1217,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set an image attachment to be fixed * Set an image attachment to be fixed. * * Varbase Context #varbase * Loading @@ -1236,7 +1234,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Set the background image size * Set the background image size. * * Varbase Context #varbase * Loading @@ -1256,7 +1254,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Select an animation for a section * Select an animation for a section. * * Varbase Context #varbase * Loading @@ -1275,7 +1273,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } /** * Add a block to a section * Add a block to a section. * * Varbase Context #varbase * Loading Loading @@ -1706,7 +1704,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } } /** * Check if we can click a value in the input element. * Loading Loading @@ -2071,7 +2068,7 @@ JS; // Find the label by its text, then use that to get the radio item's ID. $radioId = NULL; /** @var $label NodeElement */ /** @var NodeElement $label */ foreach ($this->getSession()->getPage()->findAll('css', 'label') as $label) { if ($labelText === $label->getText()) { if ($label->hasAttribute('for')) { Loading @@ -2088,7 +2085,7 @@ JS; } // Now use the ID to retrieve the button and click it. // @var NodeElement $radioButton. /** @var NodeElement $radioButton. */ $radioButton = $this->getSession()->getPage()->find('css', "#$radioId"); if (!$radioButton) { throw new \Exception("$labelText radio button not found."); Loading Loading @@ -2212,7 +2209,7 @@ JS; } /** * Scroll to top * Scroll to top. * * Varbase Context #varbase. * Loading @@ -2228,7 +2225,7 @@ JS; } /** * Scroll to bottom * Scroll to bottom. * * Varbase Context #varbase. * Loading Loading @@ -2380,8 +2377,9 @@ JS; /** * Retrieve a table row containing specified entity with operations. * * @param \Behat\Mink\Element\Element * @param string * @param \Behat\Mink\Element\Element $element * The element row name. * @param string $search * The text to search for in the table row. * * @return \Behat\Mink\Element\NodeElement Loading @@ -2395,7 +2393,7 @@ JS; } foreach ($rows as $row) { if (strpos($row->getText(), $search) !== false) { if (strpos($row->getText(), $search) !== FALSE) { return $row; } } Loading