refactor: Clean lint errors and organise files
This commit is contained in:
@@ -29,11 +29,12 @@ export class RegisterPage {
|
||||
try {
|
||||
await expect(this.usernameInput).toBeVisible({ timeout: 10_000 });
|
||||
} catch {
|
||||
// Angular router may redirect to /login on first load; click through.
|
||||
const registerLink = this.page.getByRole('link', { name: 'Register' })
|
||||
.or(this.page.getByText('Register'));
|
||||
// Angular router may redirect to /login on first load; use the
|
||||
// visible login-form action instead of broad text matching.
|
||||
const registerButton = this.page.getByRole('button', { name: 'Register', exact: true }).last();
|
||||
|
||||
await registerLink.first().click();
|
||||
await expect(registerButton).toBeVisible({ timeout: 10_000 });
|
||||
await registerButton.click();
|
||||
await expect(this.usernameInput).toBeVisible({ timeout: 30_000 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user