Skip to content
Snippets Groups Projects
Commit 3b2d7635 authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3259665 by Alaa Jwiehan, Rajab Natshah: Add more step definitions for...

Issue #3259665 by Alaa Jwiehan, Rajab Natshah: Add more step definitions for Varbase Layout Builder automated testing for section styling with padding , margin, border style, border width, border color, border radius, background image settings, background video settings
parent e3b467f5
No related branches found
No related tags found
3 merge requests!24Issue #3301451: Composer is fixed to docroot folder Primary tabs View(active tab),!10Issue #3269421: Add exception messages for VLB automated testing step definitions,!9Issue #3266504: Update Automated Functional Testing Readme File
...@@ -855,7 +855,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -855,7 +855,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
$horizontal_alignment->click(); $horizontal_alignment->click();
} }
/** /**
* Set vertical alignment for blocks * Set vertical alignment for blocks
* *
...@@ -879,10 +878,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -879,10 +878,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the padding to "5" * Example #1: When I set the padding to "5"
* Example #2: And I set the padding to "2" * Example #2: And I set the padding to "2"
* *
* @Then I set the padding to :arg1 * @When I set the padding to :arg1
*/ */
public function iSetThePaddingTo($padding) public function iSetThePaddingTo($padding) {
{
$this->getSession()->executeScript('jQuery(".bs-field-padding.form-range").val("' . $padding . '")'); $this->getSession()->executeScript('jQuery(".bs-field-padding.form-range").val("' . $padding . '")');
} }
...@@ -894,10 +892,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -894,10 +892,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the left padding to "5" * Example #1: When I set the left padding to "5"
* Example #2: And I set the left padding to "2" * Example #2: And I set the left padding to "2"
* *
* @Then I set the left padding to :arg1 * @When I set the left padding to :arg1
*/ */
public function iSetTheLeftPaddingTo($left_padding) public function iSetTheLeftPaddingTo($left_padding) {
{
$padding_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding left')]"); $padding_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding left')]");
$padding_left->click(); $padding_left->click();
$this->getSession()->executeScript('jQuery(".bs-field-padding-left.form-range").val("' . $left_padding . '")'); $this->getSession()->executeScript('jQuery(".bs-field-padding-left.form-range").val("' . $left_padding . '")');
...@@ -911,10 +908,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -911,10 +908,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the right padding to "5" * Example #1: When I set the right padding to "5"
* Example #2: And I set the right padding to "1" * Example #2: And I set the right padding to "1"
* *
* @Then I set the right padding to :arg1 * @When I set the right padding to :arg1
*/ */
public function iSetTheRightPaddingTo($right_padding) public function iSetTheRightPaddingTo($right_padding) {
{
$padding_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding right')]"); $padding_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding right')]");
$padding_right->click(); $padding_right->click();
$this->getSession()->executeScript('jQuery(".bs-field-padding-right.form-range").val("' . $right_padding . '")'); $this->getSession()->executeScript('jQuery(".bs-field-padding-right.form-range").val("' . $right_padding . '")');
...@@ -928,10 +924,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -928,10 +924,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the top padding to "5" * Example #1: When I set the top padding to "5"
* Example #2: And I set the top padding to "2" * Example #2: And I set the top padding to "2"
* *
* @Then I set the top padding to :arg1 * @When I set the top padding to :arg1
*/ */
public function iSetTheTopPaddingTo($top_padding) public function iSetTheTopPaddingTo($top_padding) {
{
$padding_top = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding top')]"); $padding_top = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding top')]");
$padding_top->click(); $padding_top->click();
$this->getSession()->executeScript('jQuery(".bs-field-padding-top.form-range").val("' . $top_padding . '")'); $this->getSession()->executeScript('jQuery(".bs-field-padding-top.form-range").val("' . $top_padding . '")');
...@@ -945,10 +940,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -945,10 +940,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the bottom padding to "5" * Example #1: When I set the bottom padding to "5"
* Example #2: And I set the bottom padding to "4" * Example #2: And I set the bottom padding to "4"
* *
* @Then I set the bottom padding to :arg1 * @When I set the bottom padding to :arg1
*/ */
public function iSetTheBottomPaddingTo($bottom_padding) public function iSetTheBottomPaddingTo($bottom_padding) {
{
$padding_bottom = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding bottom')]"); $padding_bottom = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Padding bottom')]");
$padding_bottom->click(); $padding_bottom->click();
$this->getSession()->executeScript('jQuery(".bs-field-padding-bottom.form-range").val("' . $bottom_padding . '")'); $this->getSession()->executeScript('jQuery(".bs-field-padding-bottom.form-range").val("' . $bottom_padding . '")');
...@@ -959,13 +953,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -959,13 +953,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: Then I set the margin to "5" * Example #1: When I set the margin to "5"
* Example #2: And I set the margin to "2" * Example #2: And I set the margin to "2"
* *
* @Then I set the margin to :arg1 * @When I set the margin to :arg1
*/ */
public function iSetTheMarginTo($margin) public function iSetTheMarginTo($margin) {
{
$this->getSession()->executeScript('jQuery(".bs-field-margin.form-range").val("' . $margin . '")'); $this->getSession()->executeScript('jQuery(".bs-field-margin.form-range").val("' . $margin . '")');
} }
...@@ -975,15 +968,14 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -975,15 +968,14 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the left margin to "2" * Example #1: And I set the left margin to "2"
* Example #2: Then I set the left margin to "4" * Example #2: When I set the left margin to "4"
* *
* @Then I set the left margin to :arg1 * @When I set the left margin to :arg1
*/ */
public function iSetTheLeftMarginTo($left_margin) public function iSetTheLeftMarginTo($left_margin) {
{ $margin_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin left')]");
$margin_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin left')]"); $margin_left->click();
$margin_left->click(); $this->getSession()->executeScript('jQuery(".bs-field-margin-left.form-range").val("' . $left_margin . '")');
$this->getSession()->executeScript('jQuery(".bs-field-margin-left.form-range").val("' . $left_margin . '")');
} }
/** /**
...@@ -992,15 +984,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -992,15 +984,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the top margin to "2" * Example #1: And I set the top margin to "2"
* Example #2: Then I set the top margin to "4" * Example #2: When I set the top margin to "4"
* *
* @Then I set the top margin to :arg1 * @When I set the top margin to :arg1
*/ */
public function iSetTheTopMarginTo($top_margin) public function iSetTheTopMarginTo($top_margin)
{ {
$margin_top = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin top')]"); $margin_top = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin top')]");
$margin_top->click(); $margin_top->click();
$this->getSession()->executeScript('jQuery(".bs-field-margin-top.form-range").val("' . $top_margin . '")'); $this->getSession()->executeScript('jQuery(".bs-field-margin-top.form-range").val("' . $top_margin . '")');
} }
/** /**
...@@ -1009,15 +1001,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1009,15 +1001,15 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the right margin to "2" * Example #1: And I set the right margin to "2"
* Example #2: Then I set the right margin to "4" * Example #2: When I set the right margin to "4"
* *
* @Then I set the right margin to :arg1 * @When I set the right margin to :arg1
*/ */
public function iSetTheRightMarginTo($right_margin) public function iSetTheRightMarginTo($right_margin)
{ {
$margin_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin right')]"); $margin_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin right')]");
$margin_right->click(); $margin_right->click();
$this->getSession()->executeScript('jQuery(".bs-field-margin-right.form-range").val("' . $right_margin . '")'); $this->getSession()->executeScript('jQuery(".bs-field-margin-right.form-range").val("' . $right_margin . '")');
} }
/** /**
...@@ -1026,15 +1018,14 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1026,15 +1018,14 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the bottom margin to "2" * Example #1: And I set the bottom margin to "2"
* Example #2: Then I set the bottom margin to "4" * Example #2: When I set the bottom margin to "4"
* *
* @Then I set the bottom margin to :arg1 * @When I set the bottom margin to :arg1
*/ */
public function iSetTheBottomMarginTo($bottom_margin) public function iSetTheBottomMarginTo($bottom_margin) {
{ $margin_bottom = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin bottom')]");
$margin_bottom = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Margin bottom')]"); $margin_bottom->click();
$margin_bottom->click(); $this->getSession()->executeScript('jQuery(".bs-field-margin-bottom.form-range").val("' . $bottom_margin . '")');
$this->getSession()->executeScript('jQuery(".bs-field-margin-bottom.form-range").val("' . $bottom_margin . '")');
} }
/** /**
...@@ -1043,12 +1034,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1043,12 +1034,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I select the "Solid" border style * Example #1: And I select the "Solid" border style
* Example #2: Then I select the "Dotted" border style * Example #2: When I select the "Dotted" border style
* *
* @When I select the :arg1 border style * @When I select the :arg1 border style
*/ */
public function iSelectTheBorderStyle($b_style) public function iSelectTheBorderStyle($b_style) {
{
$border_style = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_style') and contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-style-bs-border-style')]"); $border_style = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_style') and contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-style-bs-border-style')]");
$border_style->click(); $border_style->click();
} }
...@@ -1058,13 +1048,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1058,13 +1048,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: Then I set the border width to "3" * Example #1: When I set the border width to "3"
* Example #2: And I set the border width to "2" * Example #2: And I set the border width to "2"
* *
* @When I set the border width to :arg1 * @When I set the border width to :arg1
*/ */
public function iSetTheBorderWidthTo($b_width) public function iSetTheBorderWidthTo($b_width) {
{
$border_width = $this->getSession()->getPage()->find('xpath', "//label[contains(., 'Border width')]"); $border_width = $this->getSession()->getPage()->find('xpath', "//label[contains(., 'Border width')]");
$this->getSession()->executeScript('jQuery(".bs-field-border-width.form-range").val("' . $b_width . '")'); $this->getSession()->executeScript('jQuery(".bs-field-border-width.form-range").val("' . $b_width . '")');
} }
...@@ -1075,12 +1064,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1075,12 +1064,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I select the "Dark" border color * Example #1: And I select the "Dark" border color
* Example #2: Then I select the "Primary" border color * Example #2: When I select the "Primary" border color
* *
* @When I select the :arg1 border color * @When I select the :arg1 border color
*/ */
public function iSelectTheBorderColor($b_color) public function iSelectTheBorderColor($b_color) {
{
$border_color = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_color') and contains (@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-color-border')]"); $border_color = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_color') and contains (@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-color-border')]");
$border_color->click(); $border_color->click();
} }
...@@ -1090,13 +1078,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1090,13 +1078,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: Then I set the border radius to "2" * Example #1: When I set the border radius to "2"
* Example #2: And I set the border radius to "3" * Example #2: And I set the border radius to "3"
* *
* @Then I set the border radius to :arg1 * @When I set the border radius to :arg1
*/ */
public function iSetTheBorderRadiusTo($b_radius) public function iSetTheBorderRadiusTo($b_radius) {
{
$border_radius = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Corners')]"); $border_radius = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Corners')]");
$this->getSession()->executeScript('jQuery(".bs-field-rounded-corners.form-range").val("' . $b_radius . '")'); $this->getSession()->executeScript('jQuery(".bs-field-rounded-corners.form-range").val("' . $b_radius . '")');
} }
...@@ -1106,13 +1093,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1106,13 +1093,12 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: Then I set the top left border radius to "1" * Example #1: When I set the top left border radius to "1"
* Example #2: And I set the top left border radius to "2" * Example #2: And I set the top left border radius to "2"
* *
* @Then I set the top left border radius to :arg1 * @When I set the top left border radius to :arg1
*/ */
public function iSetTheTopLeftBorderRadiusTo($b_radius_top_left) public function iSetTheTopLeftBorderRadiusTo($b_radius_top_left) {
{
$border_radius_top_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Top Left')]"); $border_radius_top_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Top Left')]");
$this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-top_left.form-range").val("' . $b_radius_top_left . '")'); $this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-top_left.form-range").val("' . $b_radius_top_left . '")');
} }
...@@ -1123,12 +1109,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1123,12 +1109,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the top right border radius to "3" * Example #1: And I set the top right border radius to "3"
* Example #2: Then I set the top right border radius to "1" * Example #2: When I set the top right border radius to "1"
* *
* @Then I set the top right border radius to :arg1 * @When I set the top right border radius to :arg1
*/ */
public function iSetTheTopRightBorderRadiusTo($b_radius_top_right) public function iSetTheTopRightBorderRadiusTo($b_radius_top_right) {
{
$border_radius_top_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Top Right')]"); $border_radius_top_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Top Right')]");
$this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-top_right.form-range").val("' . $b_radius_top_right . '")'); $this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-top_right.form-range").val("' . $b_radius_top_right . '")');
} }
...@@ -1139,12 +1124,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1139,12 +1124,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the bottom left border radius to "3" * Example #1: And I set the bottom left border radius to "3"
* Example #2: Then I set the bottom left border radius to "1" * Example #2: When I set the bottom left border radius to "1"
* *
* @Then I set the bottom left border radius to :arg1 * @When I set the bottom left border radius to :arg1
*/ */
public function iSetTheBottomLeftBorderRadiusTo($b_radius_bottom_left) public function iSetTheBottomLeftBorderRadiusTo($b_radius_bottom_left) {
{
$border_radius_bottom_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Bottom Left')]"); $border_radius_bottom_left = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Bottom Left')]");
$this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-bottom_left.form-range").val("' . $b_radius_bottom_left . '")'); $this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-bottom_left.form-range").val("' . $b_radius_bottom_left . '")');
} }
...@@ -1155,12 +1139,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1155,12 +1139,11 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Varbase Context #varbase * Varbase Context #varbase
* *
* Example #1: And I set the bottom right border radius to "3" * Example #1: And I set the bottom right border radius to "3"
* Example #2: Then I set the bottom right border radius to "1" * Example #2: When I set the bottom right border radius to "1"
* *
* @Then I set the bottom right border radius to :arg1 * @When I set the bottom right border radius to :arg1
*/ */
public function iSetTheBottomRightBorderRadiusTo($b_radius_bottom_right) public function iSetTheBottomRightBorderRadiusTo($b_radius_bottom_right) {
{
$border_radius_bottom_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Bottom Right')]"); $border_radius_bottom_right = $this->getSession()->getPage()->find('xpath', "//*[contains(., 'Bottom Right')]");
$this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-bottom_right.form-range").val("' . $b_radius_bottom_right . '")'); $this->getSession()->executeScript('jQuery(".bs-field-rounded-corner-bottom_right.form-range").val("' . $b_radius_bottom_right . '")');
} }
...@@ -1173,10 +1156,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1173,10 +1156,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I select the "Dotted" left border style * Example #1: When I select the "Dotted" left border style
* Example #2: And I select the "Dashed" left border style * Example #2: And I select the "Dashed" left border style
* *
* @Then I select the :arg1 left border style * @When I select the :arg1 left border style
*/ */
public function iSelectTheLeftBorderStyle($b_left_style) public function iSelectTheLeftBorderStyle($b_left_style) {
{
$left_border_side = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-type-border-left')]"); $left_border_side = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-type-border-left')]");
$left_border_side->click(); $left_border_side->click();
$left_border_style = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_left_style') and contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-left-style-bs-border-style')]"); $left_border_style = $this->getSession()->getPage()->find('xpath', "//label[contains(., '$b_left_style') and contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-left-style-bs-border-style')]");
...@@ -1191,10 +1173,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1191,10 +1173,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* Example #1: When I set the left border width to "1" * Example #1: When I set the left border width to "1"
* Example #2: And I set the left border width to "2" * Example #2: And I set the left border width to "2"
* *
* @Then I set the left border width to :arg1 * @When I set the left border width to :arg1
*/ */
public function iSetTheLeftBorderWidthTo($b_left_width) public function iSetTheLeftBorderWidthTo($b_left_width) {
{
$left_border_side = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-type-border-left')]"); $left_border_side = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-border-border-type-border-left')]");
$left_border_side->click(); $left_border_side->click();
$border_width = $this->getSession()->getPage()->find('xpath', "//label[contains(., 'Border left width')]"); $border_width = $this->getSession()->getPage()->find('xpath', "//label[contains(., 'Border left width')]");
...@@ -1208,10 +1189,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1208,10 +1189,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Example #1: And I switch to background image settings * Example #1: And I switch to background image settings
* *
* @Then I switch to background image settings * @When I switch to background image settings
*/ */
public function iSwitchToBackgroundImageSettings() public function iSwitchToBackgroundImageSettings() {
{
// $menu = $this->getSession()->getPage()->find('xpath', "//span[contains(., 'Background') and contains(@class, 'bs-group-title')]"); // $menu = $this->getSession()->getPage()->find('xpath', "//span[contains(., 'Background') and contains(@class, 'bs-group-title')]");
// $menu->click(); // $menu->click();
$bg_image = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-background-background-type-image')]"); $bg_image = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-background-background-type-image')]");
...@@ -1225,16 +1205,13 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1225,16 +1205,13 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
* *
* Exmaple #1: And I switch to background video settings * Exmaple #1: And I switch to background video settings
* *
* @Then I switch to background video settings * @When I switch to background video settings
*/ */
public function iSwitchToBackgroundVideoSettings() public function iSwitchToBackgroundVideoSettings() {
{
$bg_video = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-background-background-type-video')]"); $bg_video = $this->getSession()->getPage()->find('xpath', "//label[contains(@for, 'edit-layout-settings-ui-tab-content-appearance-background-background-type-video')]");
$bg_video->click(); $bg_video->click();
} }
/** /**
* Select an animation for a section * Select an animation for a section
* *
...@@ -1250,7 +1227,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext ...@@ -1250,7 +1227,6 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
$animation->click(); $animation->click();
} }
/** /**
* Images Functions. * Images Functions.
* *
......
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