test(e2e): take the TOTP parameters and the field hooks from the source

The spec re-declared the server's algorithm, digit count and period as
literals, so a change to any of them would leave the spec generating codes the
server no longer verifies and blaming the product. It imports the three
exported constants instead; the recovery-batch size stays a literal, because
its module pulls in the database client and would drag the generated client
into the Playwright process.

The two credential fields on the login form are addressed by test id now, like
the submit button beside them, and the recovery toggle at the challenge is
renamed to the house's noun-verb order.
This commit is contained in:
Marc-André Bombeck committed 2026-09-10 04:52:53 +02:00
1 parent 78789e090e
commit 01fe007f35
3 files changed
+15 -8

No files matched your search

+2
View File
@@ -438,6 +438,7 @@ export default function LoginPage() {
<Label htmlFor="email">{t("auth.emailOrUsername")}</Label>
<Input
id="email"
data-testid="login-email"
type="text"
value={email}
onChange={(e) => setEmail(e.target.value)}
@@ -459,6 +460,7 @@ export default function LoginPage() {
<Label htmlFor="password">{t("auth.password")}</Label>
<Input
id="password"
data-testid="login-password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
+1 -1
View File
@@ -198,7 +198,7 @@ export function MfaLoginStep({
{hasTotp && (
<button
type="button"
data-testid="mfa-toggle-recovery"
data-testid="mfa-recovery-toggle"
onClick={() => {
setUseRecovery((v) => !v);
setCode("");