summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/SettingsMenuContext.php
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-08 16:33:33 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-03-09 14:33:22 +0100
commit3d99a9d24ee710e7bac2fc1a4466aeefe915685a (patch)
treeb07cf9552af2e21b27ae67743fbe5e02db42db33 /tests/acceptance/features/bootstrap/SettingsMenuContext.php
parent1cc7db32cd4ef24863f359ac631f810dedb5160b (diff)
downloadnextcloud-server-3d99a9d24ee710e7bac2fc1a4466aeefe915685a.tar.gz
nextcloud-server-3d99a9d24ee710e7bac2fc1a4466aeefe915685a.zip
Header acceptance features
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/acceptance/features/bootstrap/SettingsMenuContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/SettingsMenuContext.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
index 401575c78f0..eddf2599d78 100644
--- a/tests/acceptance/features/bootstrap/SettingsMenuContext.php
+++ b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
@@ -3,6 +3,7 @@
/**
*
* @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
+ * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) (skjnldsv@protonmail.com)
*
* @license GNU AGPL version 3 or any later version
*
@@ -76,6 +77,14 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
}
/**
+ * @return array
+ */
+ public function menuItems() {
+ return $this->actor->find(self::settingsMenu(), 10)
+ ->getWrappedElement()->findAll('xpath', '//a');
+ }
+
+ /**
* @When I open the Settings menu
*/
public function iOpenTheSettingsMenu() {
@@ -117,6 +126,13 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
}
/**
+ * @Then I see that the Settings menu has only :items items
+ */
+ public function iSeeThatTheSettingsMenuHasOnlyXItems($items) {
+ PHPUnit_Framework_Assert::assertCount(intval($items), self::menuItems());
+ }
+
+ /**
* @Then I see that the :itemText item in the Settings menu is shown
*/
public function iSeeThatTheItemInTheSettingsMenuIsShown($itemText) {