diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-10-04 07:38:55 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-10-04 07:48:45 +0200 |
commit | 4293ede56545ce7f6f1b3e214335a68b271f517d (patch) | |
tree | 0e961fe99fb5642bf72a5fda72111901346d0a67 /tests/acceptance | |
parent | 972279d31b15dfe972eb5c254ed8b56b7d926d72 (diff) | |
download | nextcloud-server-4293ede56545ce7f6f1b3e214335a68b271f517d.tar.gz nextcloud-server-4293ede56545ce7f6f1b3e214335a68b271f517d.zip |
Fix tag acceptance tests after #16682
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r-- | tests/acceptance/features/app-files-tags.feature | 6 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/AppNavigationContext.php | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/tests/acceptance/features/app-files-tags.feature b/tests/acceptance/features/app-files-tags.feature index 4ee7ad7770d..5c0942472a8 100644 --- a/tests/acceptance/features/app-files-tags.feature +++ b/tests/acceptance/features/app-files-tags.feature @@ -31,7 +31,7 @@ Feature: app-files-tags Scenario: create tags using the Administration settings Given I am logged in as the admin And I visit the settings page - And I open the "Tag management" section + And I open the "Workflows" section of the "Administration" group # The "create" button does nothing before JavaScript was initialized, and # the only way to detect that is waiting for the button to select tags to be # shown. @@ -42,7 +42,7 @@ Feature: app-files-tags # Scenario: add tags using the dropdown in the details view # Given I am logged in as the admin # And I visit the settings page -# And I open the "Tag management" section +# And I open the "Workflows" section of the "Administration" group # # The "create" button does nothing before JavaScript was initialized, and # # the only way to detect that is waiting for the button to select tags to be # # shown. @@ -70,7 +70,7 @@ Feature: app-files-tags # Scenario: remove tags using the dropdown in the details view # Given I am logged in as the admin # And I visit the settings page -# And I open the "Tag management" section +# And I open the "Workflows" section of the "Administration" group # # The "create" button does nothing before JavaScript was initialized, and # # the only way to detect that is waiting for the button to select tags to be # # shown. diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php index 356ac0afa46..02a8b1c0152 100644 --- a/tests/acceptance/features/bootstrap/AppNavigationContext.php +++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php @@ -48,6 +48,15 @@ class AppNavigationContext implements Context, ActorAwareInterface { /** * @return Locator */ + public static function appNavigationSectionItemInFor($caption, $sectionText) { + return Locator::forThe()->xpath("//li[normalize-space() = '$caption']/following-sibling::li/a[normalize-space() = '$sectionText']/..")-> + descendantOf(self::appNavigation())-> + describedAs($sectionText . " section item of the $caption group in App Navigation"); + } + + /** + * @return Locator + */ public static function appNavigationCurrentSectionItem() { return Locator::forThe()->css(".active")-> descendantOf(self::appNavigation())-> @@ -80,6 +89,13 @@ class AppNavigationContext implements Context, ActorAwareInterface { } /** + * @Given I open the :section section of the :caption group + */ + public function iOpenTheSectionOf($caption, $section) { + $this->actor->find(self::appNavigationSectionItemInFor($caption, $section), 10)->click(); + } + + /** * @Given I click the :class button on the :section section */ public function iClickTheButtonInTheSection($class, $section) { |