From a351d620b27ce085867696f2c21147366d72c18c Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Sat, 22 Apr 2023 08:42:38 +0100 Subject: [PATCH] Add some pauses to the UI-baed tabbed content tests This particular test seems rather flakey in GitHub's actions. In most cases passing, with the odd fail here and there (normally when unrelated changed are made -- I've had this fail when docs have been changed; zero code changes!) So, on the off chance that a little extra pause will help... --- tests/test_tabbed_content.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_tabbed_content.py b/tests/test_tabbed_content.py index 8efb4cfdf..216a6bf34 100644 --- a/tests/test_tabbed_content.py +++ b/tests/test_tabbed_content.py @@ -22,6 +22,7 @@ async def test_tabbed_content_switch_via_ui(): tabbed_content = app.query_one(TabbedContent) # Check first tab assert tabbed_content.active == "foo" + await pilot.pause() assert app.query_one("#foo-label").region assert not app.query_one("#bar-label").region assert not app.query_one("#baz-label").region @@ -29,6 +30,7 @@ async def test_tabbed_content_switch_via_ui(): # Click second tab await pilot.click("Tab#bar") assert tabbed_content.active == "bar" + await pilot.pause() assert not app.query_one("#foo-label").region assert app.query_one("#bar-label").region assert not app.query_one("#baz-label").region @@ -36,6 +38,7 @@ async def test_tabbed_content_switch_via_ui(): # Click third tab await pilot.click("Tab#baz") assert tabbed_content.active == "baz" + await pilot.pause() assert not app.query_one("#foo-label").region assert not app.query_one("#bar-label").region assert app.query_one("#baz-label").region @@ -43,6 +46,7 @@ async def test_tabbed_content_switch_via_ui(): # Press left await pilot.press("left") assert tabbed_content.active == "bar" + await pilot.pause() assert not app.query_one("#foo-label").region assert app.query_one("#bar-label").region assert not app.query_one("#baz-label").region @@ -50,6 +54,7 @@ async def test_tabbed_content_switch_via_ui(): # Press right await pilot.press("right") assert tabbed_content.active == "baz" + await pilot.pause() assert not app.query_one("#foo-label").region assert not app.query_one("#bar-label").region assert app.query_one("#baz-label").region