First pass at new reporting designs
This commit lays out the genral structure and provides necessary data for the new reporting page designs. Some of the data generated by the report domain classes (including the mock CSP reporting class) was modified to fit new designs. This also included removing data that was no longer necessary. Part of the newly mocked data includes the idea of "expended" data per CLIN or task order. This was was mocked simply by using a 75% of the obligated funds fo a given object. Tests were also written for these new/ modifed reporting functions. As for the front end, this commit only focuses on the high-level markup layout. This includes splitting the large reporting index page into smaller component templates for each of the major sections of the report.
This commit is contained in:
@@ -1,27 +1,22 @@
|
||||
from atst.domain.reports import Reports
|
||||
|
||||
from tests.factories import PortfolioFactory
|
||||
from tests.factories import *
|
||||
|
||||
|
||||
def test_portfolio_totals():
|
||||
portfolio = PortfolioFactory.create()
|
||||
report = Reports.portfolio_totals(portfolio)
|
||||
assert report == {"budget": 0, "spent": 0}
|
||||
|
||||
|
||||
# this is sketched in until we do real reporting
|
||||
# this is sketched out until we do real reporting
|
||||
def test_monthly_totals():
|
||||
portfolio = PortfolioFactory.create()
|
||||
monthly = Reports.monthly_totals(portfolio)
|
||||
|
||||
assert not monthly["environments"]
|
||||
assert not monthly["applications"]
|
||||
assert not monthly["portfolio"]
|
||||
pass
|
||||
|
||||
|
||||
# this is sketched in until we do real reporting
|
||||
def test_cumulative_budget():
|
||||
portfolio = PortfolioFactory.create()
|
||||
months = Reports.cumulative_budget(portfolio)
|
||||
# this is sketched out until we do real reporting
|
||||
def test_current_obligated_funds():
|
||||
pass
|
||||
|
||||
assert len(months["months"]) >= 12
|
||||
|
||||
# this is sketched out until we do real reporting
|
||||
def test_expired_task_orders():
|
||||
pass
|
||||
|
||||
|
||||
# this is sketched out until we do real reporting
|
||||
def test_obligated_funds_by_JEDI_clin():
|
||||
pass
|
||||
|
@@ -110,7 +110,6 @@ def test_portfolio_reports_with_mock_portfolio(client, user_session):
|
||||
response = client.get(url_for("portfolios.reports", portfolio_id=portfolio.id))
|
||||
assert response.status_code == 200
|
||||
assert portfolio.name in response.data.decode()
|
||||
assert "$251,626.00 Total spend to date" in response.data.decode()
|
||||
|
||||
|
||||
def test_delete_portfolio_success(client, user_session):
|
||||
|
Reference in New Issue
Block a user