From bfd0acacd10dc3fba3ecfea9f64bff5b04352b0b Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 6 Sep 2021 14:29:50 +0100 Subject: [PATCH] [TESTS] Fix SecurityTest breakage following UI changes --- tests/Controller/SecurityTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Controller/SecurityTest.php b/tests/Controller/SecurityTest.php index 051e032f3f..6f5458bd27 100644 --- a/tests/Controller/SecurityTest.php +++ b/tests/Controller/SecurityTest.php @@ -49,7 +49,7 @@ class SecurityTest extends GNUsocialTestCase $this->assertResponseIsSuccessful(); $this->assertSelectorNotExists('.alert'); $this->assertRouteSame('main_all'); - $this->assertSelectorTextContains('#user-nick', $nickname); + $this->assertSelectorTextContains('#user-info > h1', $nickname); } public function testLoginAttemptAlreadyLoggedIn() @@ -75,7 +75,7 @@ class SecurityTest extends GNUsocialTestCase $this->assertResponseIsSuccessful(); $this->assertSelectorNotExists('.alert'); $this->assertRouteSame('main_all'); - $this->assertSelectorTextContains('#user-nick', 'taken_user'); + $this->assertSelectorTextContains('#user-info > h1', 'taken_user'); } // --------- Register -------------- @@ -102,7 +102,7 @@ class SecurityTest extends GNUsocialTestCase $this->assertResponseIsSuccessful(); $this->assertSelectorNotExists('.alert'); $this->assertRouteSame('main_all'); - $this->assertSelectorTextContains('#user-nick', 'new_nickname'); + $this->assertSelectorTextContains('#user-info > h1', 'new_nickname'); } public function testRegisterDifferentPassword() @@ -125,7 +125,7 @@ class SecurityTest extends GNUsocialTestCase { self::testRegister('new_nickname', 'email@provider', $password); $this->assertResponseIsSuccessful(); - $this->assertSelectorTextContains('ul > li', $error); + $this->assertSelectorTextContains('.help-block > ul > li', $error); $this->assertRouteSame('register'); } @@ -148,7 +148,7 @@ class SecurityTest extends GNUsocialTestCase { self::testRegister('new_nickname', '', 'foobar'); $this->assertResponseIsSuccessful(); - $this->assertSelectorTextContains('ul > li', 'Please enter an email'); + $this->assertSelectorTextContains('.help-block > ul > li', 'Please enter an email'); $this->assertRouteSame('register'); } @@ -156,7 +156,7 @@ class SecurityTest extends GNUsocialTestCase { self::testRegister($nickname, 'email@provider', 'foobar'); $this->assertResponseIsSuccessful(); - $this->assertSelectorTextContains('ul > li', $error); + $this->assertSelectorTextContains('.help-block > ul > li', $error); $this->assertRouteSame('register'); }