mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 08:23:55 +02:00
175 create person page (#178)
Created person page and updated search bar in the header to search for persons
This commit is contained in:
27
tests/ui/person_page_test.py
Normal file
27
tests/ui/person_page_test.py
Normal file
@ -0,0 +1,27 @@
|
||||
"""Tests for the person page dashboard."""
|
||||
from collections.abc import Generator
|
||||
|
||||
import pytest
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from aki_prj23_transparenzregister.ui.pages import person
|
||||
from aki_prj23_transparenzregister.ui.session_handler import SessionHandler
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _set_session(full_db: Session) -> Generator[None, None, None]:
|
||||
"""Sets a session for the dash application to be used."""
|
||||
SessionHandler.session = full_db
|
||||
yield
|
||||
SessionHandler.session = None
|
||||
|
||||
|
||||
def test_import() -> None:
|
||||
"""Checks if an import of the company page can be made."""
|
||||
assert person is not None
|
||||
|
||||
|
||||
def test_layout() -> None:
|
||||
"""Checks if the company page can be created."""
|
||||
selected_company_id = "2"
|
||||
person.layout(selected_company_id)
|
Reference in New Issue
Block a user