44import reactpy
55from reactpy import html
66from reactpy .reactjs import component_from_npm , import_reactjs
7- from reactpy .testing import GITHUB_ACTIONS , BackendFixture , DisplayFixture
7+ from reactpy .testing import BackendFixture , DisplayFixture
8+
9+ from .. import pytestmark # noqa: F401
810
911MISSING_IMPORT_MAP_MSG = "ReactPy did not detect a suitable JavaScript import map"
1012
@@ -17,7 +19,6 @@ async def display(browser):
1719 yield new_display
1820
1921
20- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
2122async def test_component_from_npm_react_bootstrap (display : DisplayFixture , caplog ):
2223 Button = component_from_npm ("react-bootstrap" , "Button" , version = "2" )
2324
@@ -39,7 +40,6 @@ def App():
3940 assert MISSING_IMPORT_MAP_MSG not in " " .join (x .msg for x in caplog .records )
4041
4142
42- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
4343async def test_component_from_npm_react_bootstrap_with_local_framework (browser , caplog ):
4444 Button = component_from_npm ("react-bootstrap" , "Button" , version = "2" )
4545
@@ -65,7 +65,6 @@ def App():
6565 assert MISSING_IMPORT_MAP_MSG not in " " .join (x .msg for x in caplog .records )
6666
6767
68- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
6968async def test_component_from_npm_without_explicit_reactjs_import (browser , caplog ):
7069 Button = component_from_npm ("react-bootstrap" , "Button" , version = "2" )
7170
@@ -89,7 +88,6 @@ def App():
8988 assert MISSING_IMPORT_MAP_MSG in " " .join (x .msg for x in caplog .records )
9089
9190
92- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
9391async def test_component_from_npm_material_ui (display : DisplayFixture ):
9492 Button = component_from_npm ("@mui/material" , "Button" , version = "7" )
9593
@@ -105,7 +103,6 @@ def App():
105103 await expect (button ).to_contain_class ("MuiButton-root" )
106104
107105
108- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
109106async def test_component_from_npm_antd (display : DisplayFixture ):
110107 Button = component_from_npm ("antd" , "Button" , version = "6" )
111108
@@ -119,7 +116,6 @@ def App():
119116 await expect (button ).to_contain_class ("ant-btn" )
120117
121118
122- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
123119async def test_component_from_npm_chakra_ui (display : DisplayFixture ):
124120 ChakraProvider , _ , Button = _get_chakra_components ()
125121
@@ -135,7 +131,6 @@ def App():
135131 await expect (button ).to_contain_class ("chakra-button" )
136132
137133
138- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
139134async def test_component_from_npm_semantic_ui_react (browser ):
140135 # Semantic UI is deprecated and doesn't get updates. Thus, it is incompatible with the
141136 # latest React versions. We use this as an opportunity to test Preact here.
@@ -156,7 +151,6 @@ def App():
156151 await expect (button ).to_contain_class ("button" )
157152
158153
159- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
160154async def test_component_from_npm_mantine (display : DisplayFixture ):
161155 MantineProvider , Button = component_from_npm (
162156 "@mantine/core" , ["MantineProvider" , "Button" ], version = "8"
@@ -172,7 +166,6 @@ def App():
172166 await expect (button ).to_contain_class ("mantine-Button-root" )
173167
174168
175- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
176169async def test_component_from_npm_fluent_ui (display : DisplayFixture ):
177170 PrimaryButton = component_from_npm ("@fluentui/react" , "PrimaryButton" , version = "8" )
178171
@@ -186,7 +179,6 @@ def App():
186179 await expect (button ).to_contain_class ("ms-Button" )
187180
188181
189- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
190182async def test_component_from_npm_blueprint (display : DisplayFixture ):
191183 Button = component_from_npm ("@blueprintjs/core" , "Button" , version = "6" )
192184
@@ -200,7 +192,6 @@ def App():
200192 await expect (button ).to_contain_class ("bp6-button" )
201193
202194
203- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
204195async def test_component_from_npm_grommet (display : DisplayFixture ):
205196 Grommet , Button = component_from_npm ("grommet" , ["Grommet" , "Button" ], version = "2" )
206197
@@ -215,7 +206,6 @@ def App():
215206 await expect (button ).to_have_text ("Click me" )
216207
217208
218- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
219209async def test_component_from_npm_evergreen (display : DisplayFixture ):
220210 Button = component_from_npm ("evergreen-ui" , "Button" , version = "7" )
221211
@@ -228,7 +218,6 @@ def App():
228218 await expect (button ).to_have_text ("Click me" )
229219
230220
231- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
232221async def test_component_from_npm_react_spinners (display : DisplayFixture ):
233222 ClipLoader = component_from_npm ("react-spinners" , "ClipLoader" , version = "0.17.0" )
234223
@@ -251,7 +240,6 @@ def App():
251240 await expect (loader ).to_be_visible ()
252241
253242
254- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
255243async def test_nested_npm_components (display : DisplayFixture ):
256244 ChakraProvider , Box , _ = _get_chakra_components ()
257245 BootstrapButton = component_from_npm ("react-bootstrap" , "Button" , version = "2" )
@@ -283,7 +271,6 @@ def App():
283271 await expect (button ).to_contain_class ("btn" )
284272
285273
286- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
287274async def test_interleaved_npm_and_server_components (display : DisplayFixture ):
288275 Card = component_from_npm ("antd" , "Card" , version = "6" )
289276 Button = component_from_npm ("@mui/material" , "Button" , version = "7" )
@@ -316,7 +303,6 @@ def App():
316303 await expect (button ).to_have_css ("text-transform" , "uppercase" )
317304
318305
319- @pytest .mark .flaky (reruns = 10 if GITHUB_ACTIONS else 1 )
320306async def test_complex_nested_material_ui (display : DisplayFixture ):
321307 mui_components = component_from_npm (
322308 "@mui/material" ,
0 commit comments