3 * Selenium TestCase for login related tests
5 declare(strict_types
=1);
7 namespace PhpMyAdmin\Tests\Selenium
;
14 class LoginTest
extends TestBase
16 protected function setUp(): void
19 $this->logOutIfLoggedIn();
23 * Test for successful login
29 public function testSuccessfulLogin()
32 $this->waitForElement('xpath', '//*[@id="server-breadcrumb"]');
33 $this->assertTrue($this->isSuccessLogin());
34 $this->logOutIfLoggedIn();
38 * Test for unsuccessful login
44 public function testLoginWithWrongPassword()
46 $this->login('Admin', 'Admin');
47 $this->waitForElement('cssSelector', 'alert-danger');
48 $this->assertTrue($this->isUnsuccessLogin());