Files
Investidor-V2/tools/portal-stability-harness-mfa.py
nala 287e991486
tests / ci (push) Waiting to run
oportunidades 7
2026-10-13 11:40:29 +02:00

10 lines
491 B
Python

from pathlib import Path
ROOT=Path(__file__).resolve().parent.parent
for name in ['portal-stability-consumers-chromium.cjs','portal-stability-inspect-ui.cjs']:
file=ROOT/'tools'/name
text=file.read_text(encoding='utf-8')
before="await page.locator('input[name=\"code\"]').fill(otp(a.totp_secret??a.secret));"
after="await page.waitForTimeout(30500-(Date.now()%30000));"+before
assert text.count(before)==1
file.write_text(text.replace(before,after),encoding='utf-8')