diff options
Diffstat (limited to 'tests/acceptance/features/bootstrap/SettingsMenuContext.php')
-rw-r--r-- | tests/acceptance/features/bootstrap/SettingsMenuContext.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php index 3dd5022ecc9..e4e20997fc2 100644 --- a/tests/acceptance/features/bootstrap/SettingsMenuContext.php +++ b/tests/acceptance/features/bootstrap/SettingsMenuContext.php @@ -94,6 +94,15 @@ class SettingsMenuContext implements Context, ActorAwareInterface { } /** + * @param string $itemText + * @return Locator + */ + private static function settingsPanelEntryFor($itemText) { + return Locator::forThe()->xpath("//div[@id = 'app-navigation']//ul//li[normalize-space() = '$itemText']")-> + describedAs($itemText . " entry in Settings panel"); + } + + /** * @return array */ public function menuItems() { @@ -189,6 +198,15 @@ class SettingsMenuContext implements Context, ActorAwareInterface { } /** + * @Then I see that the :itemText entry in the settings panel is shown + */ + public function iSeeThatTheItemEntryInTheSettingsPanelIsShown($itemText) { + PHPUnit_Framework_Assert::assertTrue( + $this->actor->find(self::settingsPanelEntryFor($itemText), 10)->isVisible() + ); + } + + /** * @Then I see that the :itemText settings panel is not shown */ public function iSeeThatTheItemSettingsPanelIsNotShown($itemText) { |