From 26f292ca73144869931f070e84c7a300041e3a31 Mon Sep 17 00:00:00 2001 From: AlexanderMitrofanov Date: Mon, 26 Oct 2026 22:04:53 +0100 Subject: [PATCH] fix(gui): isolate browser test fixtures --- ChangeLog | 11 +++++++++-- scripts/wasm/test-browser.py | 19 ++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 340c78a9..107d29f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,8 +23,8 @@ - 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 +- isolate real-browser numerical fixtures from editable GUI examples and cover + the complete prediction seed-coordinate CSV defaults (#310) - --outNumberPerSeed selects each seed's best candidate sites before final deduplication, energy/overlap/count filtering; model P ranks left-most-anchor @@ -337,6 +337,13 @@ 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. + * Expect both seed start and end coordinates in the prediction CSV defaults, + restoring the WASM browser workflow after the GUI default changed (#310). + 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..436137dd 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': @@ -355,7 +344,7 @@ 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' + assert csv.splitlines()[0] == 'id1;start1;end1;id2;start2;end2;subseqDP;hybridDP;E;ED1;ED2;seedE;seedStart1;seedEnd1;seedStart2;seedEnd2' assert 'target;1;10;query;1;10;' in csv assert 'deltaE' not in csv assert active.locator('thead th').first.inner_text() == ''