Skip to content

Commit

Permalink
Adjust acceptance test selectors
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 committed Aug 25, 2022
1 parent bfb5295 commit ede9ac2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/features/app-files-sharing-link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function appNavigation() {
* @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");
}
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/bootstrap/FilesAppContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static function favoriteActionInFileDetailsInDetailsView() {
* @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");
}
Expand All @@ -125,7 +125,7 @@ public static function notFavoritedStateIconInFileDetailsInDetailsView() {
* @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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static function sharedWithRow($sharedWithName) {
* @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");
}
Expand Down Expand Up @@ -197,7 +197,7 @@ public static function shareLinkRow() {
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");
}
Expand All @@ -215,7 +215,7 @@ public static function copyLinkButton() {
* @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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function selectedSelectOption($cell, $user) {
* @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");
}
Expand Down

0 comments on commit ede9ac2

Please sign in to comment.