[TESTS] Fix SecurityTest breakage following UI changes

This commit is contained in:
Hugo Sales 2021-09-06 14:29:50 +01:00
parent e8ae0b74e0
commit bfd0acacd1
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -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');
}