From ede9ac2a752f5268163688e9761331a168a5a90e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 24 Aug 2022 15:54:54 +0200 Subject: Adjust acceptance test selectors Signed-off-by: Vincent Petry --- tests/acceptance/features/app-files-sharing-link.feature | 1 + tests/acceptance/features/bootstrap/AppNavigationContext.php | 2 +- tests/acceptance/features/bootstrap/FilesAppContext.php | 4 ++-- tests/acceptance/features/bootstrap/FilesAppSharingContext.php | 6 +++--- tests/acceptance/features/bootstrap/UsersSettingsContext.php | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/acceptance/features/app-files-sharing-link.feature b/tests/acceptance/features/app-files-sharing-link.feature index d89c7b4289d..62f0c73a6c2 100644 --- a/tests/acceptance/features/app-files-sharing-link.feature +++ b/tests/acceptance/features/app-files-sharing-link.feature @@ -119,6 +119,7 @@ Feature: app-files-sharing-link And I create a new folder named "Subfolder" And I see that the file list contains a file named "Subfolder" When I act as John + And I close the details view And I enter in the folder named "Editable shared folder" Then I see that the file list contains a file named "Subfolder" diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php index ef8cb8cae8b..cba56856bfa 100644 --- a/tests/acceptance/features/bootstrap/AppNavigationContext.php +++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php @@ -40,7 +40,7 @@ class AppNavigationContext implements Context, ActorAwareInterface { * @return Locator */ public static function appNavigationSectionItemFor($sectionText) { - return Locator::forThe()->xpath("//li/a[normalize-space() = '$sectionText']/..")-> + return Locator::forThe()->xpath("//li/*[contains(normalize-space(), '$sectionText')]/..")-> descendantOf(self::appNavigation())-> describedAs($sectionText . " section item in App Navigation"); } diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php index 31fe864bc36..91ca4725a96 100644 --- a/tests/acceptance/features/bootstrap/FilesAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppContext.php @@ -116,7 +116,7 @@ class FilesAppContext implements Context, ActorAwareInterface { * @return Locator */ public static function notFavoritedStateIconInFileDetailsInDetailsView() { - return Locator::forThe()->css(".star--star")-> + return Locator::forThe()->css(".star-outline-icon")-> descendantOf(self::favoriteActionInFileDetailsInDetailsView())-> describedAs("Not favorited state icon in file details in details view in Files app"); } @@ -125,7 +125,7 @@ class FilesAppContext implements Context, ActorAwareInterface { * @return Locator */ public static function favoritedStateIconInFileDetailsInDetailsView() { - return Locator::forThe()->css(".star--starred")-> + return Locator::forThe()->css(".star-icon")-> descendantOf(self::favoriteActionInFileDetailsInDetailsView())-> describedAs("Favorited state icon in file details in details view in Files app"); } diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php index ce3158f9bd9..fd85315f49f 100644 --- a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php @@ -88,7 +88,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface { * @return Locator */ public static function shareWithMenuTrigger($sharedWithName) { - return Locator::forThe()->css(".sharing-entry__actions .trigger")-> + return Locator::forThe()->css(".sharing-entry__actions button")-> descendantOf(self::sharedWithRow($sharedWithName))-> describedAs("Share with $sharedWithName menu trigger in the details view in Files app"); } @@ -197,7 +197,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface { public static function shareLinkAddNewButton() { // When there is no link share the "Add new share" item is shown instead // of the menu button as a direct child of ".share-menu". - return Locator::forThe()->css(".action-item.icon-add")-> + return Locator::forThe()->css(".action-item.new-share-link")-> descendantOf(self::shareLinkRow())-> describedAs("Add new share link button in the details view in Files app"); } @@ -215,7 +215,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface { * @return Locator */ public static function shareLinkMenuTrigger() { - return Locator::forThe()->css(".sharing-entry__actions .trigger")-> + return Locator::forThe()->css(".sharing-entry__actions .action-item__menutoggle")-> descendantOf(self::shareLinkRow())-> describedAs("Share link menu trigger in the details view in Files app"); } diff --git a/tests/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php index ce035647104..074a9ff5f1a 100644 --- a/tests/acceptance/features/bootstrap/UsersSettingsContext.php +++ b/tests/acceptance/features/bootstrap/UsersSettingsContext.php @@ -161,7 +161,7 @@ class UsersSettingsContext implements Context, ActorAwareInterface { * @return Locator */ public static function editModeToggle($user) { - return Locator::forThe()->css(".toggleUserActions button.icon-rename")-> + return Locator::forThe()->css(".toggleUserActions button")-> descendantOf(self::rowForUser($user))-> describedAs("The edit toggle button for the user $user in Users Settings"); } -- cgit v1.2.3