diff options
| author | historia <historiavg@proton.me> | 2026-09-12 16:48:55 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-12 16:48:55 -0400 |
| commit | 18346d8deb858cc77d166ffea8ef76d9c9d48bfe (patch) | |
| tree | e11bb5951a047ed372053906dcbb97b8651cee84 /lib/project/tests/test_gui_browser_races.py | |
| parent | 464edbc4fd658728f06d3a7d98340aa28ff3e3ec (diff) | |
| download | producer-18346d8deb858cc77d166ffea8ef76d9c9d48bfe.tar.gz | |
feat: automatic stereo mixdown
Diffstat (limited to 'lib/project/tests/test_gui_browser_races.py')
| -rw-r--r-- | lib/project/tests/test_gui_browser_races.py | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/project/tests/test_gui_browser_races.py b/lib/project/tests/test_gui_browser_races.py index fab60ba..5f2638b 100644 --- a/lib/project/tests/test_gui_browser_races.py +++ b/lib/project/tests/test_gui_browser_races.py @@ -15,8 +15,8 @@ def test_gui_browser_cancellation_is_not_pretend(studio): with sync_playwright() as playwright: browser = playwright.chromium.launch(headless=True, args=["--no-sandbox"]) page = browser.new_page() - page.goto(studio["url"] + "/#token=" + studio["token"]) - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.goto(studio["url"]) + page.locator("#pick-files").set_input_files(studio["source"]) expect(page.locator("#wave-status")).to_contain_text("2,048", timeout=10000) studio["control"]["hold"] = True page.locator("#render-preview").click() @@ -48,8 +48,8 @@ def test_gui_browser_late_audio_is_aborted_and_urls_are_released(studio): const create = URL.createObjectURL.bind(URL), revoke = URL.revokeObjectURL.bind(URL); URL.createObjectURL = blob => { const url = create(blob); objectURLs.created.push(url); return url; }; URL.revokeObjectURL = url => { objectURLs.revoked.push(url); revoke(url); };""") - page.goto(studio["url"] + "/#token=" + studio["token"]) - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.goto(studio["url"]) + page.locator("#pick-files").set_input_files(studio["source"]) expect(page.locator("#wave-status")).to_contain_text("2,048", timeout=10000) page.locator("#selection-start").fill("1") page.locator("#selection-end").fill("4") @@ -99,10 +99,9 @@ def test_gui_browser_nonzero_monitoring_gain_is_playback_only(studio): AudioContext.prototype.createGain = function() { const gain = createGain.call(this); monitorGains.push(gain); return gain; };""") - page.goto(studio["url"] + "/#token=" + studio["token"]) - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.goto(studio["url"]) + page.locator("#pick-files").set_input_files(studio["source"]) expect(page.locator("#wave-status")).to_contain_text("2,048", timeout=10000) - page.locator("#advanced-settings summary").click() # Real FFmpeg leveling makes a measurable difference without any AI runtime. page.locator("#setting-leveling").check() page.locator("#setting-level_target_db").fill("-12") @@ -137,9 +136,9 @@ def test_delayed_job_list_preserves_new_submission_intent(studio, kind): with sync_playwright() as playwright: browser = playwright.chromium.launch(headless=True, args=["--no-sandbox"]) page = browser.new_page() - page.goto(studio["url"] + "/#token=" + studio["token"]) + page.goto(studio["url"]) if kind == "preview": - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.locator("#pick-files").set_input_files(studio["source"]) expect(page.locator("#wave-status")).to_contain_text("2,048", timeout=10000) held = [] @@ -158,7 +157,7 @@ def test_delayed_job_list_preserves_new_submission_intent(studio, kind): with page.expect_response(lambda response: response.request.method == "POST" and response.url.endswith("/api/jobs")) as posted: if kind == "scan": - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.locator("#pick-files").set_input_files(studio["source"]) else: page.locator("#render-preview").click() assert posted.value.status == 202 @@ -186,8 +185,8 @@ def test_delayed_audio_resume_does_not_start_superseded_playback(studio, interru window.releaseAudioResume = () => { resume.call(this).then(resolve); }; }); };""") - page.goto(studio["url"] + "/#token=" + studio["token"]) - page.get_by_role("button", name=re.compile(r"WAV\s*Narration.wav")).click() + page.goto(studio["url"]) + page.locator("#pick-files").set_input_files(studio["source"]) expect(page.locator("#wave-status")).to_contain_text("2,048", timeout=10000) page.locator("#render-preview").click() expect(page.locator("#comparison-status")).to_contain_text("Ready", timeout=30000) @@ -200,8 +199,8 @@ def test_delayed_audio_resume_does_not_start_superseded_playback(studio, interru page.locator("#setting-denoise_strength").fill("0.4") else: page.route("**/api/jobs", lambda route: route.fulfill( - status=401, content_type="application/json", body='{"detail":"Expired"}')) - expect(page.locator("#workspace")).to_have_attribute("disabled", "", timeout=10000) + status=500, content_type="application/json", body='{"detail":"down"}')) + expect(page.locator("#connection")).to_contain_text("interrupted", timeout=10000) page.evaluate("releaseAudioResume()") # Let both the resume and any erroneously scheduled play promise settle. page.wait_for_timeout(300) |
