MCPcopy Index your code
hub / github.com/reactive-python/reactpy / test_snake_case_attributes

Function test_snake_case_attributes

src/py/reactpy/tests/test_client.py:142–163  ·  view source on GitHub ↗
(display: DisplayFixture)

Source from the content-addressed store, hash-verified

140
141
142async def test_snake_case_attributes(display: DisplayFixture):
143 @reactpy.component
144 def SomeComponent():
145 return reactpy.html.h1(
146 {
147 "id": "my-title",
148 "style": {"background_color": "blue"},
149 "class_name": "hello",
150 "data_some_thing": "some-data",
151 "aria_some_thing": "some-aria",
152 },
153 "title with some attributes",
154 )
155
156 await display.show(SomeComponent)
157
158 title = await display.page.wait_for_selector("#my-title")
159
160 assert await title.get_attribute("class") == "hello"
161 assert await title.get_attribute("style") == "background-color: blue;"
162 assert await title.get_attribute("data-some-thing") == "some-data"
163 assert await title.get_attribute("aria-some-thing") == "some-aria"

Callers

nothing calls this directly

Calls 1

showMethod · 0.80

Tested by

no test coverage detected