diff --git a/tests/acceptance/features/app-files-tags.feature b/tests/acceptance/features/app-files-tags.feature index 4ee7ad7770..5c0942472a 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 356ac0afa4..02a8b1c015 100644 --- a/tests/acceptance/features/bootstrap/AppNavigationContext.php +++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php @@ -45,6 +45,15 @@ class AppNavigationContext implements Context, ActorAwareInterface { describedAs($sectionText . " section item in App Navigation"); } + /** + * @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 */ @@ -79,6 +88,13 @@ class AppNavigationContext implements Context, ActorAwareInterface { $this->actor->find(self::appNavigationSectionItemFor($section), 10)->click(); } + /** + * @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 */