Skip to content

Commit

Permalink
add some more tests (#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lendemor authored Sep 22, 2024
1 parent afd52a8 commit 61332fd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/components/datadisplay/test_dataeditor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from reflex.components.datadisplay.dataeditor import DataEditor


def test_dataeditor():
editor_wrapper = DataEditor.create().render()
editor = editor_wrapper["children"][0]
assert editor_wrapper["name"] == "div"
assert editor_wrapper["props"] == [
'css={({ ["width"] : "100%", ["height"] : "100%" })}'
]
assert editor["name"] == "DataEditor"
38 changes: 38 additions & 0 deletions tests/components/recharts/test_polar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from reflex.components.recharts import (
Pie,
PolarAngleAxis,
PolarGrid,
PolarRadiusAxis,
Radar,
RadialBar,
)


def test_pie():
pie = Pie.create().render()
assert pie["name"] == "RechartsPie"


def test_radar():
radar = Radar.create().render()
assert radar["name"] == "RechartsRadar"


def test_radialbar():
radialbar = RadialBar.create().render()
assert radialbar["name"] == "RechartsRadialBar"


def test_polarangleaxis():
polarangleaxis = PolarAngleAxis.create().render()
assert polarangleaxis["name"] == "RechartsPolarAngleAxis"


def test_polargrid():
polargrid = PolarGrid.create().render()
assert polargrid["name"] == "RechartsPolarGrid"


def test_polarradiusaxis():
polarradiusaxis = PolarRadiusAxis.create().render()
assert polarradiusaxis["name"] == "RechartsPolarRadiusAxis"

0 comments on commit 61332fd

Please sign in to comment.