Ver Fonte

Fixed test break.

Qiang Xue há 12 anos atrás
pai
commit
41685fe8df
2 ficheiros alterados com 4 adições e 4 exclusões
  1. 1 1
      tests/_pages/ContactPage.php
  2. 3 3
      tests/_pages/LoginPage.php

+ 1 - 1
tests/_pages/ContactPage.php

@@ -17,6 +17,6 @@ class ContactPage extends BasePage
 			$inputType = $field === 'body' ? 'textarea' : 'input';
 			$this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value);
 		}
-		$this->guy->click('Submit', '#contact-form');
+		$this->guy->click('#contact-form input[type=submit]');
 	}
 }

+ 3 - 3
tests/_pages/LoginPage.php

@@ -14,8 +14,8 @@ class LoginPage extends BasePage
 	 */
 	public function login($username, $password)
 	{
-		$this->guy->fillField('input[name="LoginForm[username]"]',$username);
-		$this->guy->fillField('input[name="LoginForm[password]"]',$password);
-		$this->guy->click('Login','#login-form');
+		$this->guy->fillField('input[name="LoginForm[username]"]', $username);
+		$this->guy->fillField('input[name="LoginForm[password]"]', $password);
+		$this->guy->click('#login-form input[type=submit]');
 	}
 }