diff options
Diffstat (limited to 'tests/acceptance/features/bootstrap/AppSettingsContext.php')
-rw-r--r-- | tests/acceptance/features/bootstrap/AppSettingsContext.php | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php index 6b77b3aac00..eb499be93dd 100644 --- a/tests/acceptance/features/bootstrap/AppSettingsContext.php +++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php @@ -25,77 +25,77 @@ use Behat\Behat\Context\Context; class AppSettingsContext implements Context, ActorAwareInterface { - use ActorAware; + use ActorAware; - /** - * @return Locator - */ - public static function appSettings() { - return Locator::forThe()->id("app-settings")-> - describedAs("App settings"); - } - /** - * @return Locator - */ - public static function appSettingsContent() { - return Locator::forThe()->id("app-settings-content")-> - descendantOf(self::appSettings())-> - describedAs("App settings"); - } + /** + * @return Locator + */ + public static function appSettings() { + return Locator::forThe()->id("app-settings")-> + describedAs("App settings"); + } + /** + * @return Locator + */ + public static function appSettingsContent() { + return Locator::forThe()->id("app-settings-content")-> + descendantOf(self::appSettings())-> + describedAs("App settings"); + } - /** - * @return Locator - */ - public static function appSettingsOpenButton() { - return Locator::forThe()->xpath("//div[@id = 'app-settings-header']/button")-> - descendantOf(self::appSettings())-> - describedAs("The button to open the app settings"); - } + /** + * @return Locator + */ + public static function appSettingsOpenButton() { + return Locator::forThe()->xpath("//div[@id = 'app-settings-header']/button")-> + descendantOf(self::appSettings())-> + describedAs("The button to open the app settings"); + } - /** - * @return Locator - */ - public static function checkboxInTheSettings($id) { - return Locator::forThe()->xpath("//input[@id = '$id']")-> - descendantOf(self::appSettingsContent())-> - describedAs("The $id checkbox in the settings"); - } + /** + * @return Locator + */ + public static function checkboxInTheSettings($id) { + return Locator::forThe()->xpath("//input[@id = '$id']")-> + descendantOf(self::appSettingsContent())-> + describedAs("The $id checkbox in the settings"); + } - /** - * @return Locator - */ - public static function checkboxLabelInTheSettings($id) { - return Locator::forThe()->xpath("//label[@for = '$id']")-> - descendantOf(self::appSettingsContent())-> - describedAs("The label for the $id checkbox in the settings"); - } + /** + * @return Locator + */ + public static function checkboxLabelInTheSettings($id) { + return Locator::forThe()->xpath("//label[@for = '$id']")-> + descendantOf(self::appSettingsContent())-> + describedAs("The label for the $id checkbox in the settings"); + } - /** - * @Given I open the settings - */ - public function iOpenTheSettings() { - $this->actor->find(self::appSettingsOpenButton())->click(); - } + /** + * @Given I open the settings + */ + public function iOpenTheSettings() { + $this->actor->find(self::appSettingsOpenButton())->click(); + } - /** - * @Given I toggle the :id checkbox in the settings - */ - public function iToggleTheCheckboxInTheSettingsTo($id) { - $locator = self::CheckboxInTheSettings($id); + /** + * @Given I toggle the :id checkbox in the settings + */ + public function iToggleTheCheckboxInTheSettingsTo($id) { + $locator = self::CheckboxInTheSettings($id); - // If locator is not visible, fallback to label - if (!$this->actor->find(self::CheckboxInTheSettings($id))->isVisible()) { - $locator = self::checkboxLabelInTheSettings($id); - } + // If locator is not visible, fallback to label + if (!$this->actor->find(self::CheckboxInTheSettings($id))->isVisible()) { + $locator = self::checkboxLabelInTheSettings($id); + } - $this->actor->find($locator)->click(); - } + $this->actor->find($locator)->click(); + } - /** - * @Then I see that the settings are opened - */ - public function iSeeThatTheSettingsAreOpened() { - WaitFor::elementToBeEventuallyShown($this->actor, self::appSettingsContent()); - } + /** + * @Then I see that the settings are opened + */ + public function iSeeThatTheSettingsAreOpened() { + WaitFor::elementToBeEventuallyShown($this->actor, self::appSettingsContent()); + } } |