Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
Added new test: header
Browse files Browse the repository at this point in the history
  • Loading branch information
LineIndent committed Sep 3, 2023
1 parent d3e8757 commit 22514e1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/core/test_header.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from app.core.header import RxHeader
import reflex as rx
import pytest


@pytest.fixture
def build():
return RxHeader().build()


@pytest.fixture
def header():
return RxHeader()


def test_header_type(build, header):
assert isinstance(build, rx.Component)
assert isinstance(header.theme_toggle, rx.Tooltip)
assert isinstance(header.rx_header, rx.Hstack)
assert isinstance(header.site_name, rx.Link)


def test_header_background_color(header):
header.rx_header.__dict__["style"]["bg"] = "orange"
assert header.rx_header.__dict__["style"]["bg"] == "orange"

0 comments on commit 22514e1

Please sign in to comment.