Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-06 03:29:54 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-08 10:59:33 +0300
commitd548d212a25b6c77eebcd3a2bac0631b7a788281 (patch)
tree8993446434020d20ef0093cedbea19044312806a /tests
parentdd1a554c79c372acc09ca4ac241c6237bfcac038 (diff)
Fix delete user acceptance test
Adding some missing asserts showed that the "delete user" acceptance test was silently failing, as the deletion was not being confirmed in the dialog and thus the user was not being deleted. The dialog button contains a single quote ("user0's"), so the XPath expression had to be adjusted (it seems that it is not possible to escape a single quote in a string enclosed in single quotes in XPath 1.0). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/bootstrap/DialogContext.php2
-rw-r--r--tests/acceptance/features/users.feature1
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/acceptance/features/bootstrap/DialogContext.php b/tests/acceptance/features/bootstrap/DialogContext.php
index e2dccf7b113..cbd02b35553 100644
--- a/tests/acceptance/features/bootstrap/DialogContext.php
+++ b/tests/acceptance/features/bootstrap/DialogContext.php
@@ -38,7 +38,7 @@ class DialogContext implements Context, ActorAwareInterface {
* @return Locator
*/
public static function theDialogButton($text) {
- return Locator::forThe()->xpath("//button[normalize-space() = '$text']")->
+ return Locator::forThe()->xpath("//button[normalize-space() = \"$text\"]")->
descendantOf(self::theDialog())->
describedAs($text . " button of the dialog");
}
diff --git a/tests/acceptance/features/users.feature b/tests/acceptance/features/users.feature
index 2b6597b7283..adb48d658fd 100644
--- a/tests/acceptance/features/users.feature
+++ b/tests/acceptance/features/users.feature
@@ -30,6 +30,7 @@ Feature: users
And I open the actions menu for the user user0
And I see that the "Delete user" action in the user0 actions menu is shown
When I click the "Delete user" action in the user0 actions menu
+ And I click the "Delete user0's account" button of the confirmation dialog
Then I see that the list of users does not contains the user user0
Scenario: disable a user