From 98cc84dae88dd9964a333b01ff941ade0da7113f Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 27 Nov 2024 18:41:27 +0000 Subject: [PATCH] better snapshot --- .../test_snapshots/test_add_remove_tabs.svg | 124 +++++++++--------- tests/snapshot_tests/test_snapshots.py | 6 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_add_remove_tabs.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_add_remove_tabs.svg index 1ee003e694..7f987a7129 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_add_remove_tabs.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_add_remove_tabs.svg @@ -19,138 +19,138 @@ font-weight: 700; } - .terminal-1469451834-matrix { + .terminal-43154064-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1469451834-title { + .terminal-43154064-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1469451834-r1 { fill: #c5c8c6 } -.terminal-1469451834-r2 { fill: #ddedf9;font-weight: bold } -.terminal-1469451834-r3 { fill: #797979 } -.terminal-1469451834-r4 { fill: #e0e0e0 } -.terminal-1469451834-r5 { fill: #4f4f4f } -.terminal-1469451834-r6 { fill: #0178d4 } -.terminal-1469451834-r7 { fill: #ffa62b;font-weight: bold } -.terminal-1469451834-r8 { fill: #495259 } + .terminal-43154064-r1 { fill: #c5c8c6 } +.terminal-43154064-r2 { fill: #ddedf9;font-weight: bold } +.terminal-43154064-r3 { fill: #797979 } +.terminal-43154064-r4 { fill: #e0e0e0 } +.terminal-43154064-r5 { fill: #4f4f4f } +.terminal-43154064-r6 { fill: #0178d4 } +.terminal-43154064-r7 { fill: #ffa62b;font-weight: bold } +.terminal-43154064-r8 { fill: #495259 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - ExampleApp + ExampleApp - - - - tab-2tab-3 -━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -tab-2                                                                            - - - - - - - - - - - - - - - - - - - - - r Remove first pane  a Add pane                                    ^p palette + + + + tab-2New tabNew tab +━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +tab-2                                                                            + + + + + + + + + + + + + + + + + + + + + r Remove first pane  a Add pane                                    ^p palette diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index b8168676c3..a6f3a8e36d 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -2815,7 +2815,7 @@ def on_resize(self) -> None: def test_add_remove_tabs(snap_compare): """Regression test for https://github.com/Textualize/textual/issues/5215 - You should see a TabbedContent with two panes, entitled 'tab-2' and 'tab-3'""" + You should see a TabbedContent with three panes, entitled 'tab-2', 'New tab' and 'New tab'""" class ExampleApp(App): BINDINGS = [ @@ -2837,7 +2837,7 @@ def action_remove_pane(self) -> None: def action_add_pane(self) -> None: tabbed_content = self.query_one(TabbedContent) - new_pane = TabPane("tab-3", Label("tab-3")) + new_pane = TabPane("New tab", Label("new")) tabbed_content.add_pane(new_pane) - snap_compare(ExampleApp(), press=["a", "r"]) + snap_compare(ExampleApp(), press=["a", "r", "a"])