From 939586f5f812e83164c6c4fc16aacaf992a0dc55 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 25 May 2023 11:06:21 +0100 Subject: [PATCH] Add snapshot tests for the SelectionList examples --- .../__snapshots__/test_snapshots.ambr | 491 ++++++++++++++++++ tests/snapshot_tests/test_snapshots.py | 4 + 2 files changed, 495 insertions(+) diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr index 7013a574a..ea041f772 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr +++ b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr @@ -23523,6 +23523,497 @@ ''' # --- +# name: test_selection_list + ''' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SelectionListApp + + + + + + + + + + SelectionListApp + + +  Shall we play some games? ── Selected games ───────────── + [ + XFalken's Maze'secret_back_door', + XBlack Jack'a_nice_game_of_chess', + XGin Rummy'fighter_combat' + XHearts] + XBridge + XCheckers + XChess + XPoker + XFighter Combat + + + + + + ──────────────────────────────────────────────────────────── + + + + + + + + + ''' +# --- +# name: test_selection_list.1 + ''' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SelectionListApp + + + + + + + + + + SelectionListApp + + +  Shall we play some games? ────────────────────────────────── + + XFalken's Maze + XBlack Jack + XGin Rummy + XHearts + XBridge + XCheckers + XChess + XPoker + XFighter Combat + + + + + + + ────────────────────────────────────────────────────────────── + + + + + + + + ''' +# --- +# name: test_selection_list.2 + ''' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SelectionListApp + + + + + + + + + + SelectionListApp + + +  Shall we play some games? ────────────────────────────────── + + XFalken's Maze + XBlack Jack + XGin Rummy + XHearts + XBridge + XCheckers + XChess + XPoker + XFighter Combat + + + + + + + ────────────────────────────────────────────────────────────── + + + + + + + + ''' +# --- # name: test_switches ''' diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index fd22c0ca3..6f9aabbcc 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -232,6 +232,10 @@ def test_progress_bar_completed_styled(snap_compare): def test_select(snap_compare): assert snap_compare(WIDGET_EXAMPLES_DIR / "select_widget.py") +def test_selection_list(snap_compare): + assert snap_compare(WIDGET_EXAMPLES_DIR / "selection_list_selected.py") + assert snap_compare(WIDGET_EXAMPLES_DIR / "selection_list_selections.py") + assert snap_compare(WIDGET_EXAMPLES_DIR / "selection_list_tuples.py") def test_select_expanded(snap_compare): assert snap_compare(