Skip to content

Commit 1e0acc6

Browse files
committed
Fix testWxtLogin() test for user logout
1 parent a1a2530 commit 1e0acc6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ jobs:
5555
cd site-wxt
5656
make drupal_install
5757
make drupal_migrate
58+
sudo mkdir -p /tmp/browser_output
59+
sudo chmod -R 777 /tmp/browser_output
5860
make test

tests/src/Functional/WxTTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,20 @@ class WxTTest extends BrowserTestBase {
3232
*/
3333
public function testWxtLogin() {
3434
// Create a user to check the login.
35-
$user = $this->createUser();
35+
$user = $this->createUser(['access toolbar']);
3636

3737
// Log in our user.
3838
$this->drupalLogin($user);
3939

4040
// Verify that logged in user can access the logout link.
4141
$this->drupalGet('user');
42+
$this->assertSession()->statusCodeEquals(200);
4243

43-
$this->assertSession()->linkByHrefExists('/user/logout');
44+
print "\n===== RESPONSE HTML START =====\n";
45+
print $this->getSession()->getPage()->getContent();
46+
print "\n===== RESPONSE HTML END =====\n";
47+
48+
$this->assertSession()->elementExists('css', 'a[href*="/user/logout"]');
4449
}
4550

4651
}

0 commit comments

Comments
 (0)