From dba14b8a12abc3f67f0e5951ed53a62ad6e03c69 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 31 May 2023 09:17:26 +0100 Subject: [PATCH] Split up the OptionList snapshot tests Don't run 3 snapshot tests in one test function when it's easier to see what broke and where if each is in their own function. --- .../__snapshots__/test_snapshots.ambr | 444 +++++++++--------- tests/snapshot_tests/test_snapshots.py | 6 +- 2 files changed, 227 insertions(+), 223 deletions(-) diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr index e1b1456d8..cb1a58b8a 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr +++ b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr @@ -19519,7 +19519,7 @@ ''' # --- -# name: test_option_list +# name: test_option_list_build ''' @@ -19542,136 +19542,135 @@ font-weight: 700; } - .terminal-4119903855-matrix { + .terminal-1891986877-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4119903855-title { + .terminal-1891986877-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4119903855-r1 { fill: #c5c8c6 } - .terminal-4119903855-r2 { fill: #e3e3e3 } - .terminal-4119903855-r3 { fill: #e1e1e1 } - .terminal-4119903855-r4 { fill: #004578 } - .terminal-4119903855-r5 { fill: #ddedf9;font-weight: bold } - .terminal-4119903855-r6 { fill: #e2e3e3 } - .terminal-4119903855-r7 { fill: #ddedf9 } + .terminal-1891986877-r1 { fill: #ddedf9;font-weight: bold } + .terminal-1891986877-r2 { fill: #e1e9ef;font-weight: bold } + .terminal-1891986877-r3 { fill: #c5c8c6 } + .terminal-1891986877-r4 { fill: #e4e5e6 } + .terminal-1891986877-r5 { fill: #4f5459 } + .terminal-1891986877-r6 { fill: #cc555a } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - OptionListApp + OptionListApp - - - - OptionListApp - - - - ────────────────────────────────────────────────────── - Aerilon - Aquaria - Canceron - Caprica - Gemenon - Leonis - Libran - Picon - Sagittaron - Scorpia - Tauron - Virgon - - - ────────────────────────────────────────────────────── - - - + + + + OneOneOne + TwoTwoTwo + ──────────────────────────────────────────────────────────────────────────────── + ThreeThreeThree + + + + + + + + + + + + + + + + + + + @@ -19679,7 +19678,7 @@ ''' # --- -# name: test_option_list.1 +# name: test_option_list_options ''' @@ -19842,7 +19841,167 @@ ''' # --- -# name: test_option_list.2 +# name: test_option_list_strings + ''' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OptionListApp + + + + + + + + + + OptionListApp + + + + ────────────────────────────────────────────────────── + Aerilon + Aquaria + Canceron + Caprica + Gemenon + Leonis + Libran + Picon + Sagittaron + Scorpia + Tauron + Virgon + + + ────────────────────────────────────────────────────── + + + + + + + + + ''' +# --- +# name: test_option_list_tables ''' @@ -20006,165 +20165,6 @@ ''' # --- -# name: test_option_list_build - ''' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OptionListApp - - - - - - - - - - OneOneOne - TwoTwoTwo - ──────────────────────────────────────────────────────────────────────────────── - ThreeThreeThree - - - - - - - - - - - - - - - - - - - - - - - - - ''' -# --- # name: test_order_independence ''' diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index 67de7687a..2f589a915 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -212,9 +212,13 @@ def test_tabbed_content(snap_compare): assert snap_compare(WIDGET_EXAMPLES_DIR / "tabbed_content.py") -def test_option_list(snap_compare): +def test_option_list_strings(snap_compare): assert snap_compare(WIDGET_EXAMPLES_DIR / "option_list_strings.py") + +def test_option_list_options(snap_compare): assert snap_compare(WIDGET_EXAMPLES_DIR / "option_list_options.py") + +def test_option_list_tables(snap_compare): assert snap_compare(WIDGET_EXAMPLES_DIR / "option_list_tables.py")