From 0190ec3b1d69ff205b3a93e81d6706588d9472b5 Mon Sep 17 00:00:00 2001 From: AlexanderMitrofanov Date: Mon, 26 Oct 2026 23:38:07 +0100 Subject: [PATCH 1/2] fix(gui): keep browser CSV assertion in sync --- ChangeLog | 9 +++++++++ scripts/wasm/test-browser.py | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 340c78a9..abd12eeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,9 @@ ## Interface and handling +- keep the real-browser CSV export check synchronized with the selected result + columns, including the new seed-end defaults (#305) + - integrate CopomuS as the browser Mutation Design task with single-pair input, native controls, extended tables and four-state vaRRI visualization (#307) @@ -337,6 +340,12 @@ energies, restricted partition sums, and trackers. ################################################################################ ################################################################################ +261026 Alexander Mitrofanov + * scripts/wasm/test-browser.py + * Derive the expected CSV download header from the rendered result columns and + verify that prediction defaults include both seed boundaries, fixing the + master WebAssembly workflow after the #305 seed-overlay merge. + 261026 Alexander Mitrofanov * gui/{index.html,app.js,styles.css,copomus*.js,runner.js,sessions.js}, gui/examples/, gui/tests/, scripts/wasm/test-browser.py diff --git a/scripts/wasm/test-browser.py b/scripts/wasm/test-browser.py index aa3f3bc6..21f680c0 100644 --- a/scripts/wasm/test-browser.py +++ b/scripts/wasm/test-browser.py @@ -355,7 +355,11 @@ def predict(): with page.expect_download() as downloaded: active.locator('[data-role=download]').click() csv = Path(downloaded.value.path()).read_text() - assert csv.splitlines()[0] == 'id1;start1;end1;id2;start2;end2;subseqDP;hybridDP;E;ED1;ED2;seedE;seedStart1;seedStart2' + result_columns = active.locator('[data-role=visible-columns] input').evaluate_all( + "inputs => inputs.map(input => input.value).filter(value => value !== 'deltaE')" + ) + assert result_columns[-4:] == ['seedStart1', 'seedEnd1', 'seedStart2', 'seedEnd2'] + assert csv.splitlines()[0].split(';') == result_columns assert 'target;1;10;query;1;10;' in csv assert 'deltaE' not in csv assert active.locator('thead th').first.inner_text() == '' From 8ef81b0b37586db12e92d378d1aab9e47a66eed5 Mon Sep 17 00:00:00 2001 From: AlexanderMitrofanov Date: Tue, 27 Oct 2026 00:32:01 +0100 Subject: [PATCH 2/2] test(gui): isolate browser regression fixtures --- ChangeLog | 13 ++++++------- scripts/wasm/test-browser.py | 17 +++-------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index abd12eeb..b8cbf96d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,8 +14,8 @@ ## Interface and handling -- keep the real-browser CSV export check synchronized with the selected result - columns, including the new seed-end defaults (#305) +- isolate real-browser numerical fixtures from editable GUI examples and keep + CSV export checks synchronized with selected columns and seed-end defaults - integrate CopomuS as the browser Mutation Design task with single-pair input, native controls, extended tables and four-state vaRRI visualization (#307) @@ -26,9 +26,6 @@ - fix CopomuS explicit mutations, GC filters, signed indices, zero scores and shared profiles; validate inputs and preserve output on failure (PR #298) -- keep real-browser regression inputs stable when maintainers replace the GUI - examples, while continuing to verify that each task's example loads - - --outNumberPerSeed selects each seed's best candidate sites before final deduplication, energy/overlap/count filtering; model P ranks left-most-anchor ensembles; zero preserves ordinary prediction; the GUI exposes the quota next @@ -342,9 +339,11 @@ energies, restricted partition sums, and trackers. 261026 Alexander Mitrofanov * scripts/wasm/test-browser.py + * Stop loading editable GUI examples as numerical browser-test fixtures; seed + prediction, evaluation and mutation checks from explicit test-only inputs. * Derive the expected CSV download header from the rendered result columns and - verify that prediction defaults include both seed boundaries, fixing the - master WebAssembly workflow after the #305 seed-overlay merge. + verify both seed boundaries, restoring the master WebAssembly workflow after + the GUI default changed. 261026 Alexander Mitrofanov * gui/{index.html,app.js,styles.css,copomus*.js,runner.js,sessions.js}, diff --git a/scripts/wasm/test-browser.py b/scripts/wasm/test-browser.py index 21f680c0..ff2fbe38 100644 --- a/scripts/wasm/test-browser.py +++ b/scripts/wasm/test-browser.py @@ -42,26 +42,15 @@ def open_group(key): assert page.locator('.parameter-group:visible').count() == 1 def load_reference(task='prediction'): + # Numerical regressions use their own small inputs. GUI examples are + # maintainer-editable content and are validated separately. + page.locator('#reset').click() if task == 'evaluation': page.get_by_role('radio', name='Evaluation').check() elif task == 'mutation': page.get_by_role('radio', name='Mutation Design').check() else: page.get_by_role('radio', name='Prediction').check() - page.locator('#examples-menu summary').click() - page.locator(f'#example-options [data-example-task="{task}"]').click() - expect(page.locator('#query')).not_to_have_value('') - expect(page.locator('#target')).not_to_have_value('') - if task == 'evaluation': - expect(page.locator('#rri')).not_to_have_value('') - - # Examples are maintainer-editable content. Exercise their loading, then - # use a fixed small pair so numerical browser regressions stay stable. - page.locator('#reset').click() - if task == 'evaluation': - page.get_by_role('radio', name='Evaluation').check() - elif task == 'mutation': - page.get_by_role('radio', name='Mutation Design').check() page.locator('#query').fill('>query\nGGGAGGAGGG\n') page.locator('#target').fill('>target\nCCCUCCUCCC\n') if task == 'evaluation':