summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-05 22:02:46 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-08 07:55:45 +0000
commit8185c46bd8290e0180ad8a1b532c361bccec70f4 (patch)
tree9cd328b57704599a162bdd49eaaf7dc1f0b87965 /tests/acceptance
parent3a470c2ebe70bafbd76ca75e7603a8c59e175224 (diff)
downloadnextcloud-server-8185c46bd8290e0180ad8a1b532c361bccec70f4.tar.gz
nextcloud-server-8185c46bd8290e0180ad8a1b532c361bccec70f4.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/acceptance')
-rw-r--r--tests/acceptance/features/bootstrap/AppSettingsContext.php9
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();
}
/**