Răsfoiți Sursa

Unbreak tests after recent changes in main (p2)

Masen Furer 1 an în urmă
părinte
comite
b607531318

+ 2 - 2
reflex/.templates/apps/sidebar/code/styles.py

@@ -36,12 +36,12 @@ overlapping_button_style = {
 }
 
 base_style = {
-    rx.MenuButton: {
+    rx.chakra.MenuButton: {
         "width": "3em",
         "height": "3em",
         **overlapping_button_style,
     },
-    rx.MenuItem: hover_accent_bg,
+    rx.chakra.MenuItem: hover_accent_bg,
 }
 
 markdown_style = {

+ 1 - 1
tests/components/layout/test_match.py

@@ -260,7 +260,7 @@ def test_match_case_tuple_elements(match_case):
                 ([1, 2], rx.text("third value")),
                 rx.text("default value"),
             ),
-            "Match cases should have the same return types. Case 3 with return value `<RadixThemesText> {`first value`} </RadixThemesText>` "
+            "Match cases should have the same return types. Case 3 with return value `<RadixThemesText as={`p`}> {`first value`} </RadixThemesText>` "
             "of type <class 'reflex.components.radix.themes.typography.text.Text'> is not <class 'reflex.vars.BaseVar'>",
         ),
     ],

+ 2 - 2
tests/components/test_component.py

@@ -627,7 +627,7 @@ def test_component_with_only_valid_children(fixture, request):
 @pytest.mark.parametrize(
     "component,rendered",
     [
-        (rx.text("hi"), "<RadixThemesText>\n  {`hi`}\n</RadixThemesText>"),
+        (rx.text("hi"), "<RadixThemesText as={`p`}>\n  {`hi`}\n</RadixThemesText>"),
         (
             rx.box(rx.chakra.heading("test", size="md")),
             "<RadixThemesBox>\n  <Heading size={`md`}>\n  {`test`}\n</Heading>\n</RadixThemesBox>",
@@ -768,7 +768,7 @@ class EventState(rx.State):
             id="direct-prop",
         ),
         pytest.param(
-            rx.text(as_=f"foo{TEST_VAR}bar"),  # type: ignore
+            rx.heading(as_=f"foo{TEST_VAR}bar"),
             [FORMATTED_TEST_VAR],
             id="fstring-prop",
         ),