diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-06-16 18:03:35 -0700 |
---|---|---|
committer | Pytal <24800714+Pytal@users.noreply.github.com> | 2023-06-21 11:12:40 -0700 |
commit | 84ff000767aaf52a0a176cb28bde373cc7f24ca1 (patch) | |
tree | 2208411a5285269aaf6fc40e7fedf3bf17c4532a /tests | |
parent | 3a557a88ce01a9c3694d1a72ca42bd89975aa66f (diff) | |
download | nextcloud-server-84ff000767aaf52a0a176cb28bde373cc7f24ca1.tar.gz nextcloud-server-84ff000767aaf52a0a176cb28bde373cc7f24ca1.zip |
enh(a11y): New user modal
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/features/bootstrap/AppSettingsContext.php | 2 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/UsersSettingsContext.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php index c8033a46f2d..785664fa01c 100644 --- a/tests/acceptance/features/bootstrap/AppSettingsContext.php +++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php @@ -66,7 +66,7 @@ class AppSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function checkboxLabelInTheSettings($id) { - return Locator::forThe()->xpath("//label[@for = '$id']")-> + return Locator::forThe()->css("[data-test=\"$id\"]")-> descendantOf(self::appSettingsContent())-> describedAs("The label for the $id checkbox in the settings"); } diff --git a/tests/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php index 33c47850202..3e43b49b189 100644 --- a/tests/acceptance/features/bootstrap/UsersSettingsContext.php +++ b/tests/acceptance/features/bootstrap/UsersSettingsContext.php @@ -34,7 +34,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function newUserForm() { - return Locator::forThe()->id("new-user")-> + return Locator::forThe()->css('[data-test="form"]')-> describedAs("New user form in Users Settings"); } @@ -42,7 +42,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function userNameFieldForNewUser() { - return Locator::forThe()->field("newusername")-> + return Locator::forThe()->css('[data-test="username"]')-> describedAs("User name field for new user in Users Settings"); } @@ -50,7 +50,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function displayNameFieldForNewUser() { - return Locator::forThe()->field("newdisplayname")-> + return Locator::forThe()->css('[data-test="displayName"]')-> describedAs("Display name field for new user in Users Settings"); } @@ -58,7 +58,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function passwordFieldForNewUser() { - return Locator::forThe()->field("newuserpassword")-> + return Locator::forThe()->css('[data-test="password"]')-> describedAs("Password field for new user in Users Settings"); } @@ -74,7 +74,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function createNewUserButton() { - return Locator::forThe()->xpath("//form[@id = 'new-user']//button[@type = 'submit']")-> + return Locator::forThe()->css('[data-test="submit"]')-> describedAs("Create user button in Users Settings"); } |