diff --git a/.github/workflows/studio-ui-smoke.yml b/.github/workflows/studio-ui-smoke.yml index 297a585430..51d6d6ee1d 100644 --- a/.github/workflows/studio-ui-smoke.yml +++ b/.github/workflows/studio-ui-smoke.yml @@ -255,17 +255,21 @@ jobs: jq -e '.status == "healthy"' /tmp/health3.json - name: Pass bootstrap pw for IME / i18n test - # IME smoke does the change-password against the bootstrap that - # Studio's frontend injects into the page, so it only needs the - # NEW password. + # IME smoke does its own change-password through the UI. The page no + # longer autofills the seed, so the test needs the current (bootstrap) + # password to fill the Current password field plus the NEW password. run: | + OLD=$(cat ~/.unsloth/studio/auth/.bootstrap_password) NEW="CIIme-$(python -c 'import secrets; print(secrets.token_urlsafe(16))')" + echo "::add-mask::$OLD" echo "::add-mask::$NEW" + echo "STUDIO_IME_OLD_PW=$OLD" >> "$GITHUB_ENV" echo "STUDIO_IME_NEW_PW=$NEW" >> "$GITHUB_ENV" - name: Drive IME + multilingual paste regression with Playwright env: BASE_URL: http://127.0.0.1:18896 + STUDIO_OLD_PW: ${{ env.STUDIO_IME_OLD_PW }} STUDIO_NEW_PW: ${{ env.STUDIO_IME_NEW_PW }} PW_ART_DIR: logs/playwright_ime STUDIO_UI_STRICT: '1' diff --git a/tests/studio/playwright_chat_ime_i18n.py b/tests/studio/playwright_chat_ime_i18n.py index 9c01e95fd4..3189ff475c 100644 --- a/tests/studio/playwright_chat_ime_i18n.py +++ b/tests/studio/playwright_chat_ime_i18n.py @@ -28,6 +28,7 @@ from _playwright_robust import ( # noqa: E402 ) BASE = os.environ["BASE_URL"] +OLD = os.environ["STUDIO_OLD_PW"] NEW = os.environ["STUDIO_NEW_PW"] ART_DIR = os.environ.get("PW_ART_DIR", "logs/playwright_ime") ART = Path(ART_DIR) @@ -161,6 +162,10 @@ with sync_playwright() as p: pass pw_field = page.locator("#new-password") pw_field.wait_for(state = "visible", timeout = 60_000) + # Served page no longer autofills the seed; fill Current password when shown. + cur_pw = page.locator("#current-password") + if cur_pw.count(): + cur_pw.fill(OLD, timeout = 60_000) pw_field.fill(NEW, timeout = 60_000) page.fill("#confirm-password", NEW, timeout = 60_000) shoot("01-change-password-filled") diff --git a/tests/studio/playwright_chat_ui.py b/tests/studio/playwright_chat_ui.py index 065ba7a745..4d995aaebd 100644 --- a/tests/studio/playwright_chat_ui.py +++ b/tests/studio/playwright_chat_ui.py @@ -236,6 +236,10 @@ with sync_playwright() as p: pass # best-effort -- proceed even if network never idles pw_field = page.locator("#new-password") pw_field.wait_for(state = "visible", timeout = 60_000) + # Served page no longer autofills the seed; fill Current password when shown. + cur_pw = page.locator("#current-password") + if cur_pw.count(): + cur_pw.fill(OLD, timeout = 60_000) # Do NOT shoot() between wait_for and fill -- the screenshot's # font-load wait can let a background poll detach the form. pw_field.fill(NEW, timeout = 60_000) diff --git a/tests/studio/playwright_extra_ui.py b/tests/studio/playwright_extra_ui.py index 209a8a06f1..f6ada49f00 100644 --- a/tests/studio/playwright_extra_ui.py +++ b/tests/studio/playwright_extra_ui.py @@ -134,6 +134,10 @@ with sync_playwright() as p: pass pw_field = page.locator("#new-password") pw_field.wait_for(state = "visible", timeout = 60_000) + # Served page no longer autofills the seed; fill Current password when shown. + cur_pw = page.locator("#current-password") + if cur_pw.count(): + cur_pw.fill(OLD, timeout = 60_000) pw_field.fill(NEW, timeout = 60_000) page.fill("#confirm-password", NEW, timeout = 60_000) # Click submit AND wait for the POST response together so a server-side reject