summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-07-24 20:00:20 +0200
committerGitHub <noreply@github.com>2018-07-24 20:00:20 +0200
commit71028fde6b201e35fa7efb224896c8bf3050a856 (patch)
tree7e81164334ea5da0f7ac0d667057d54d5bd21aee /tests/acceptance/features/bootstrap
parent9b9d729acf8a6c46374d1ef55915c6fca988b191 (diff)
parent801bf813178573b539a8d66bcb1420cd11455994 (diff)
downloadnextcloud-server-71028fde6b201e35fa7efb224896c8bf3050a856.tar.gz
nextcloud-server-71028fde6b201e35fa7efb224896c8bf3050a856.zip
Merge pull request #10322 from weeman1337/feature-9978-improve-disabled-user-login-message
Login: Implements the "user disabled" message like the "wrong password" message
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r--tests/acceptance/features/bootstrap/LoginPageContext.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/LoginPageContext.php b/tests/acceptance/features/bootstrap/LoginPageContext.php
index 1496e3030c2..df7944aa912 100644
--- a/tests/acceptance/features/bootstrap/LoginPageContext.php
+++ b/tests/acceptance/features/bootstrap/LoginPageContext.php
@@ -71,6 +71,14 @@ class LoginPageContext implements Context, ActorAwareInterface {
}
/**
+ * @return Locator
+ */
+ public static function userDisabledMessage() {
+ return Locator::forThe()->xpath("//*[@class = 'warning userDisabledMsg' and normalize-space() = 'User disabled']")->
+ describedAs('User disabled message on login page');
+ }
+
+ /**
* @When I log in with user :user and password :password
*/
public function iLogInWithUserAndPassword($user, $password) {
@@ -97,6 +105,14 @@ class LoginPageContext implements Context, ActorAwareInterface {
}
/**
+ * @Then I see that the disabled user message is shown
+ */
+ public function iSeeThatTheDisabledUserMessageIsShown() {
+ PHPUnit_Framework_Assert::assertTrue(
+ $this->actor->find(self::userDisabledMessage(), 10)->isVisible());
+ }
+
+ /**
* @BeforeScenario
*/
public function getOtherRequiredSiblingContexts(BeforeScenarioScope $scope) {