Skip to content
Snippets Groups Projects
Commit 1d780fb7 authored by Alex Pott's avatar Alex Pott
Browse files

Revert "Issue #2827014 by michielnugter, cilefen, dawehner, xjm: Throw an...

Revert "Issue #2827014 by michielnugter, cilefen, dawehner, xjm: Throw an exception when testing non response body in javascript tests"

This reverts commit f1b5e671.
parent e63e65fa
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -48,10 +48,13 @@ public function testSessionExpiration() { ...@@ -48,10 +48,13 @@ public function testSessionExpiration() {
// number of times. // number of times.
$this->drupalGet('<front>'); $this->drupalGet('<front>');
$session_assert = $this->assertSession();
$page = $this->getSession()->getPage(); $page = $this->getSession()->getPage();
for ($i = 0; $i < 25; $i++) { for ($i = 0; $i < 25; $i++) {
$page->clickLink('Link to front page'); $page->clickLink('Link to front page');
$session_assert->statusCodeEquals(200);
} }
} }
......
...@@ -366,60 +366,4 @@ function t(r, lx, ly) { ...@@ -366,60 +366,4 @@ function t(r, lx, ly) {
return $this->session->evaluateScript($full_javascript_visibility_test); return $this->session->evaluateScript($full_javascript_visibility_test);
} }
/**
* The use of statusCodeEquals() is not available.
*
* @param int $code
* The status code.
*
* @throws \Behat\Mink\Exception\UnsupportedDriverActionException
* Throws an exception on use.
*/
public function statusCodeEquals($code) {
throw new UnsupportedDriverActionException('The use of statusCodeEquals() is not available in a functional JavaScript test.');
}
/**
* The use of statusCodeNotEquals() is not available.
*
* @param int $code
* The status code.
*
* @throws \Behat\Mink\Exception\UnsupportedDriverActionException
* Throws an exception on use.
*/
public function statusCodeNotEquals($code) {
throw new UnsupportedDriverActionException('The use of statusCodeNotEquals() is not available in a functional JavaScript test.');
}
/**
* The use of responseHeaderEquals() is not available.
*
* @param string $name
* The name of the header.
* @param string $value
* The value to check the header against.
*
* @throws \Behat\Mink\Exception\UnsupportedDriverActionException
* Throws an exception on use.
*/
public function responseHeaderEquals($name, $value) {
throw new UnsupportedDriverActionException('The use of responseHeaderEquals() is not available in a functional JavaScript test.');
}
/**
* The use of responseHeaderNotEquals() is not available.
*
* @param string $name
* The name of the header.
* @param string $value
* The value to check the header against.
*
* @throws \Behat\Mink\Exception\UnsupportedDriverActionException
* Throws an exception on use.
*/
public function responseHeaderNotEquals($name, $value) {
throw new UnsupportedDriverActionException('The use of responseHeaderNotEquals() is not available in a functional JavaScript test.');
}
} }
...@@ -715,6 +715,7 @@ protected function drupalLogin(AccountInterface $account) { ...@@ -715,6 +715,7 @@ protected function drupalLogin(AccountInterface $account) {
} }
$this->drupalGet('user/login'); $this->drupalGet('user/login');
$this->assertSession()->statusCodeEquals(200);
$this->submitForm([ $this->submitForm([
'name' => $account->getUsername(), 'name' => $account->getUsername(),
'pass' => $account->passRaw, 'pass' => $account->passRaw,
...@@ -739,6 +740,7 @@ protected function drupalLogout() { ...@@ -739,6 +740,7 @@ protected function drupalLogout() {
// screen. // screen.
$assert_session = $this->assertSession(); $assert_session = $this->assertSession();
$this->drupalGet('user/logout', ['query' => ['destination' => 'user']]); $this->drupalGet('user/logout', ['query' => ['destination' => 'user']]);
$assert_session->statusCodeEquals(200);
$assert_session->fieldExists('name'); $assert_session->fieldExists('name');
$assert_session->fieldExists('pass'); $assert_session->fieldExists('pass');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment