summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r--tests/acceptance/features/bootstrap/LoginPageContext.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/acceptance/features/bootstrap/LoginPageContext.php b/tests/acceptance/features/bootstrap/LoginPageContext.php
index 7502b143718..3fb06abb235 100644
--- a/tests/acceptance/features/bootstrap/LoginPageContext.php
+++ b/tests/acceptance/features/bootstrap/LoginPageContext.php
@@ -38,34 +38,22 @@ class LoginPageContext implements Context, ActorAwareInterface {
*/
private $filesAppContext;
- /**
- * @return Locator
- */
- public static function userNameField() {
+ public static function userNameField(): Locator {
return Locator::forThe()->field("user")->
describedAs("User name field in Login page");
}
- /**
- * @return Locator
- */
- public static function passwordField() {
+ public static function passwordField(): Locator {
return Locator::forThe()->field("password")->
describedAs("Password field in Login page");
}
- /**
- * @return Locator
- */
- public static function loginButton() {
- return Locator::forThe()->css(".submit-wrapper .submit-wrapper__input")->
+ public static function loginButton(): Locator {
+ return Locator::forThe()->css(".button-vue[type='submit']")->
describedAs("Login button in Login page");
}
- /**
- * @return Locator
- */
- public static function wrongPasswordMessage() {
+ public static function wrongPasswordMessage(): Locator {
return Locator::forThe()->xpath("//*[@class = 'warning wrongPasswordMsg' and normalize-space() = 'Wrong username or password.']")->
describedAs("Wrong password message in Login page");
}
@@ -81,7 +69,7 @@ class LoginPageContext implements Context, ActorAwareInterface {
/**
* @When I log in with user :user and password :password
*/
- public function iLogInWithUserAndPassword($user, $password) {
+ public function iLogInWithUserAndPassword(string $user, string $password): void {
$this->actor->find(self::userNameField(), 10)->setValue($user);
$this->actor->find(self::passwordField())->setValue($password);
$this->actor->find(self::loginButton())->click();