diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-03-05 22:02:46 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-03-06 01:34:43 +0100 |
commit | ee1f8104a09b2c41dd82c8e75e0671cf947fd012 (patch) | |
tree | 7d943dc97f45323aa0a0fa981f82a640c851d942 /tests | |
parent | 7b6946d2d24baee72e5d6de278b6a33b43d7024f (diff) | |
download | nextcloud-server-ee1f8104a09b2c41dd82c8e75e0671cf947fd012.tar.gz nextcloud-server-ee1f8104a09b2c41dd82c8e75e0671cf947fd012.zip |
Find directly the label instead of falling back to it
The input element is always hidden, so the check always ended falling
back to the label. Moreover, the label is the element that the user
interacts with, so it must be the one used.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/features/bootstrap/AppSettingsContext.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php index eda9fe200d0..c9ff57f376c 100644 --- a/tests/acceptance/features/bootstrap/AppSettingsContext.php +++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php @@ -81,14 +81,7 @@ class AppSettingsContext implements Context, ActorAwareInterface { * @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), 10)->isVisible()) { - $locator = self::checkboxLabelInTheSettings($id); - } - - $this->actor->find($locator, 10)->click(); + $this->actor->find(self::checkboxLabelInTheSettings($id), 10)->click(); } /** |