mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 08:13: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:
38
tests/ui/company_elements_test.py
Normal file
38
tests/ui/company_elements_test.py
Normal file
@ -0,0 +1,38 @@
|
||||
"""Tests for company elements."""
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from aki_prj23_transparenzregister.ui import company_elements, data_elements
|
||||
|
||||
|
||||
def test_import() -> None:
|
||||
"""Checks if an import co ui_elements can be made."""
|
||||
assert company_elements is not None
|
||||
|
||||
|
||||
def test_create_company_stats(full_db: Session) -> None:
|
||||
"""Checks if the company widgets can be created."""
|
||||
company_df = data_elements.get_company_data(full_db)
|
||||
value_chosen = 1
|
||||
selected_company_stats = company_df.loc[value_chosen]
|
||||
company_elements.create_company_stats(selected_company_stats)
|
||||
|
||||
|
||||
def test_create_tabs(full_db: Session) -> None:
|
||||
"""Checks if the tabs of the company page can be created."""
|
||||
selected_company_id = 1
|
||||
finance_df = data_elements.get_finance_data(full_db)
|
||||
selected_finance_df = finance_df.loc[
|
||||
finance_df["company_id"] == selected_company_id
|
||||
]
|
||||
company_elements.create_tabs(selected_company_id, selected_finance_df)
|
||||
|
||||
|
||||
def test_kennzahlen_layout(full_db: Session) -> None:
|
||||
"""Checks if the financial metric layout of the company page can be created."""
|
||||
selected_company_id = 1
|
||||
finance_df = data_elements.get_finance_data(full_db)
|
||||
selected_finance_df = finance_df.loc[
|
||||
finance_df["company_id"] == selected_company_id
|
||||
]
|
||||
company_elements.kennzahlen_layout(selected_finance_df)
|
Reference in New Issue
Block a user