Browse Source

Fix tag acceptance tests after #16682

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
tags/v18.0.0beta1
John Molakvoæ (skjnldsv) 4 years ago
parent
commit
4293ede565
No account linked to committer's email address

+ 3
- 3
tests/acceptance/features/app-files-tags.feature View File

@@ -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.

+ 16
- 0
tests/acceptance/features/bootstrap/AppNavigationContext.php View File

@@ -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
*/

Loading…
Cancel
Save