diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-05-02 14:33:34 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-05-02 15:09:38 +0200 |
commit | 1381f6c131d7e4cd6bdb88c567adf771f2a3c463 (patch) | |
tree | 41298cb7e82a88ad0ec5ff5d595bb869f9d7d90b /tests/acceptance | |
parent | 762a8e0b76e121f108269b916de9d68ff5ffaa9c (diff) | |
download | nextcloud-server-1381f6c131d7e4cd6bdb88c567adf771f2a3c463.tar.gz nextcloud-server-1381f6c131d7e4cd6bdb88c567adf771f2a3c463.zip |
Replace "named" Mink selectors with "named_exact" Mink selectors
The "named" Mink selector first tries to find an exact match for its
locator and then, if not found, tries to find a partial match. Besides
other harder to track problems (see comment in the commit in which the
"content" locator was removed), this could cause, for example, finding
an action link titled "Favorited" when looking for the action link
titled "Favorite" (that is, one that conveys the opposite state to the
one found).
Although currently all the acceptance tests are compatible with both the
"named" and the "named_exact" Mink selectors the predefined locators are
modified to use the "named_exact" Mink selector to make them more
future-proof; the "named" Mink selector can still be used if needed
through the "customSelector" method in the builder object.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r-- | tests/acceptance/features/core/Locator.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/acceptance/features/core/Locator.php b/tests/acceptance/features/core/Locator.php index 64b2aa00cd9..e670a5b8065 100644 --- a/tests/acceptance/features/core/Locator.php +++ b/tests/acceptance/features/core/Locator.php @@ -134,7 +134,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function id($value) { - return $this->customSelector("named", array("id", $value)); + return $this->customSelector("named_exact", array("id", $value)); } /** @@ -142,7 +142,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function idOrName($value) { - return $this->customSelector("named", array("id_or_name", $value)); + return $this->customSelector("named_exact", array("id_or_name", $value)); } /** @@ -150,7 +150,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function link($value) { - return $this->customSelector("named", array("link", $value)); + return $this->customSelector("named_exact", array("link", $value)); } /** @@ -158,7 +158,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function button($value) { - return $this->customSelector("named", array("button", $value)); + return $this->customSelector("named_exact", array("button", $value)); } /** @@ -166,7 +166,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function linkOrButton($value) { - return $this->customSelector("named", array("link_or_button", $value)); + return $this->customSelector("named_exact", array("link_or_button", $value)); } /** @@ -174,7 +174,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function field($value) { - return $this->customSelector("named", array("field", $value)); + return $this->customSelector("named_exact", array("field", $value)); } /** @@ -182,7 +182,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function selectField($value) { - return $this->customSelector("named", array("select", $value)); + return $this->customSelector("named_exact", array("select", $value)); } /** @@ -190,7 +190,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function checkbox($value) { - return $this->customSelector("named", array("checkbox", $value)); + return $this->customSelector("named_exact", array("checkbox", $value)); } /** @@ -198,7 +198,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function radioButton($value) { - return $this->customSelector("named", array("radio", $value)); + return $this->customSelector("named_exact", array("radio", $value)); } /** @@ -206,7 +206,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function fileInput($value) { - return $this->customSelector("named", array("file", $value)); + return $this->customSelector("named_exact", array("file", $value)); } /** @@ -214,7 +214,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function optionGroup($value) { - return $this->customSelector("named", array("optgroup", $value)); + return $this->customSelector("named_exact", array("optgroup", $value)); } /** @@ -222,7 +222,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function option($value) { - return $this->customSelector("named", array("option", $value)); + return $this->customSelector("named_exact", array("option", $value)); } /** @@ -230,7 +230,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function fieldSet($value) { - return $this->customSelector("named", array("fieldset", $value)); + return $this->customSelector("named_exact", array("fieldset", $value)); } /** @@ -238,7 +238,7 @@ class LocatorBuilder { * @return LocatorBuilderSecondStep */ public function table($value) { - return $this->customSelector("named", array("table", $value)); + return $this->customSelector("named_exact", array("table", $value)); } } |