]> source.dussan.org Git - nextcloud-server.git/commitdiff
Find directly the label instead of falling back to it 25993/head
authorDaniel Calviño Sánchez <danxuliu@gmail.com>
Fri, 5 Mar 2021 21:02:46 +0000 (22:02 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 8 Mar 2021 07:55:45 +0000 (07:55 +0000)
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>
tests/acceptance/features/bootstrap/AppSettingsContext.php

index eda9fe200d0e3d6359272dbcf01b04fd98591da3..c9ff57f376c45e5e5242d59efd44c7a0a3e90424 100644 (file)
@@ -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();
        }
 
        /**