Refactor New Portfolio page according to designs.

New designs call for a streamlined New Portfolio page, with far
fewer input options. This commit refactors that page according to those
designs.

Some of the route functions in this commit refer to a "step 1" of creating
a new Portfolio. Though there is no "step 2" right now, the designs call
for a multistep flow for Portfolio creation process, so this commit sets
the stage for that.
This commit is contained in:
graham-dds
2019-12-11 11:30:27 -05:00
parent f9a3d2628e
commit a097a0ce61
13 changed files with 157 additions and 306 deletions

View File

@@ -105,13 +105,7 @@ class PortfolioFactory(Base):
name = factory.Faker("domain_word")
defense_component = factory.LazyFunction(random_service_branch)
app_migration = random_choice(data.APP_MIGRATION)
complexity = [random_choice(data.APPLICATION_COMPLEXITY)]
description = factory.Faker("sentence")
dev_team = [random_choice(data.DEV_TEAM)]
native_apps = random.choice(["yes", "no", "not_sure"])
team_experience = random_choice(data.TEAM_EXPERIENCE)
@classmethod
def _create(cls, model_class, *args, **kwargs):

View File

@@ -18,7 +18,7 @@ def test_new_portfolio(client, user_session):
user = UserFactory.create()
user_session(user)
response = client.get(url_for("portfolios.new_portfolio"))
response = client.get(url_for("portfolios.new_portfolio_step_1"))
assert response.status_code == 200
@@ -34,7 +34,7 @@ def test_create_portfolio_success(client, user_session):
data={
"name": "My project name",
"description": "My project description",
"defense_component": "Air Force, Department of the",
"defense_component": "army",
},
)

View File

@@ -25,7 +25,7 @@ _NO_ACCESS_CHECK_REQUIRED = _NO_LOGIN_REQUIRED + [
"dev.test_email", # dev tool
"portfolios.accept_invitation", # available to all users; access control is built into invitation logic
"portfolios.create_portfolio", # create a portfolio
"portfolios.new_portfolio", # all users can create a portfolio
"portfolios.new_portfolio_step_1", # all users can create a portfolio
"task_orders.get_started", # all users can start a new TO
"users.update_user", # available to all users
"users.user", # available to all users