Skip to content

Commit

Permalink
fix(acceptance-tests): wait for login page to load
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Jul 10, 2023
1 parent f1c3d85 commit 4517442
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Acceptance/TOTPAcceptanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function setUp(): void {

public function testEnableTOTP(): void {
$this->webDriver->get('http://localhost:8080/index.php/login');
$this->webDriver->wait(20, 200)->until(WebDriverExpectedCondition::titleContains('Nextcloud'));
self::assertStringContainsString('Nextcloud', $this->webDriver->getTitle());

// Log in
Expand Down Expand Up @@ -151,6 +152,7 @@ public function testLoginShouldFailWithWrongOTP(): void {
$this->createSecret();

$this->webDriver->get('http://localhost:8080/index.php/login');
$this->webDriver->wait(20, 200)->until(WebDriverExpectedCondition::titleContains('Nextcloud'));
self::assertStringContainsString('Nextcloud', $this->webDriver->getTitle());

// Log in
Expand Down

0 comments on commit 4517442

Please sign in to comment.