Loading tests/features/bootstrap/VarbaseContext.php +34 −0 Original line number Diff line number Diff line Loading @@ -2240,6 +2240,40 @@ JS; $this->getSession()->executeScript("window.scrollTo(0,document.body.scrollHeight)"); } /** * Check if a checkbox is unchecked * * Varbase Context #varbase * * Example #1: And I should see the "Accept" checkbox unchecked * Example #1: Then I should see the "Enable" checkbox unchecked * * @Then I should see the :label checkbox unchecked */ public function iShouldSeeTheCheckboxUnchecked($label) { $isChecked = (boolean) $this->getSession()->getDriver()->isChecked("//label[contains(text(), '${label}')]/preceding-sibling::input"); if ($isChecked) { throw new \Exception("The '" . $label . "' checkbox is checked"); } } /** * Check if a checkbox is checked * * Varbase Context #varbase * * Example #1: And I should see the "Site Admin" checkbox checked * Example #1: Then I should see the "Enable" checkbox checked * * @Then I should see the :label checkbox checked */ public function iShouldSeeTheCheckboxChecked($label) { $isChecked = (boolean) $this->getSession()->getDriver()->isChecked("//label[contains(text(), '${label}')]/preceding-sibling::input"); if (!$isChecked) { throw new \Exception("The '" . $label . "' checkbox is unchecked"); } } /** * Check if the Image media browser opened. * Loading tests/features/varbase/01-website-base-requirements/01-00-varbase-welcome-tour.feature +4 −3 Original line number Diff line number Diff line Loading @@ -7,8 +7,9 @@ The welcome message is made possible by having Varbase Tour module And I go to "/admin/config/varbase/settings" Then I should see "Varbase general settings" And I should see "Allow site to show welcome message" And I check the box "Allow site to show welcome message" And I press "Save configuration" When I check the box "Allow site to show welcome message" Then I should see the "Allow site to show welcome message" checkbox checked When I press "Save configuration" And I wait Then I should see "The configuration options have been saved." Loading Loading @@ -38,4 +39,4 @@ The welcome message is made possible by having Varbase Tour module And I go to "/admin/config/varbase/settings" Then I should see "Varbase general settings" And I should see "Allow site to show welcome message" And the "Allow site to show welcome message" checkbox is unchecked And I should see the "Allow site to show welcome message" checkbox unchecked Loading
tests/features/bootstrap/VarbaseContext.php +34 −0 Original line number Diff line number Diff line Loading @@ -2240,6 +2240,40 @@ JS; $this->getSession()->executeScript("window.scrollTo(0,document.body.scrollHeight)"); } /** * Check if a checkbox is unchecked * * Varbase Context #varbase * * Example #1: And I should see the "Accept" checkbox unchecked * Example #1: Then I should see the "Enable" checkbox unchecked * * @Then I should see the :label checkbox unchecked */ public function iShouldSeeTheCheckboxUnchecked($label) { $isChecked = (boolean) $this->getSession()->getDriver()->isChecked("//label[contains(text(), '${label}')]/preceding-sibling::input"); if ($isChecked) { throw new \Exception("The '" . $label . "' checkbox is checked"); } } /** * Check if a checkbox is checked * * Varbase Context #varbase * * Example #1: And I should see the "Site Admin" checkbox checked * Example #1: Then I should see the "Enable" checkbox checked * * @Then I should see the :label checkbox checked */ public function iShouldSeeTheCheckboxChecked($label) { $isChecked = (boolean) $this->getSession()->getDriver()->isChecked("//label[contains(text(), '${label}')]/preceding-sibling::input"); if (!$isChecked) { throw new \Exception("The '" . $label . "' checkbox is unchecked"); } } /** * Check if the Image media browser opened. * Loading
tests/features/varbase/01-website-base-requirements/01-00-varbase-welcome-tour.feature +4 −3 Original line number Diff line number Diff line Loading @@ -7,8 +7,9 @@ The welcome message is made possible by having Varbase Tour module And I go to "/admin/config/varbase/settings" Then I should see "Varbase general settings" And I should see "Allow site to show welcome message" And I check the box "Allow site to show welcome message" And I press "Save configuration" When I check the box "Allow site to show welcome message" Then I should see the "Allow site to show welcome message" checkbox checked When I press "Save configuration" And I wait Then I should see "The configuration options have been saved." Loading Loading @@ -38,4 +39,4 @@ The welcome message is made possible by having Varbase Tour module And I go to "/admin/config/varbase/settings" Then I should see "Varbase general settings" And I should see "Allow site to show welcome message" And the "Allow site to show welcome message" checkbox is unchecked And I should see the "Allow site to show welcome message" checkbox unchecked