Fix tag acceptance tests after #16682

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-10-04 07:38:55 +02:00
parent 972279d31b
commit 4293ede565
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
2 changed files with 19 additions and 3 deletions

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.

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