Add Milestone tag select filter on executions public page
This commit is contained in:
@@ -1335,6 +1335,7 @@ describe "Admin budget investments" do
|
||||
budget_investment = create(:budget_investment)
|
||||
|
||||
visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment)
|
||||
|
||||
expect(page).not_to have_content("Milestone Tags:")
|
||||
|
||||
click_link "Edit classification"
|
||||
|
||||
@@ -235,6 +235,52 @@ describe "Executions" do
|
||||
select "Bidding (0)", from: "status"
|
||||
expect(page).not_to have_content(investment1.title)
|
||||
end
|
||||
|
||||
scenario "by milestone tag, only display tags for winner investments", :js do
|
||||
create(:milestone, milestoneable: investment1, status: status1)
|
||||
create(:milestone, milestoneable: investment2, status: status2)
|
||||
create(:milestone, milestoneable: investment3, status: status2)
|
||||
investment1.milestone_tag_list.add("tag1", "tag2")
|
||||
investment1.save
|
||||
investment2.milestone_tag_list.add("tag2")
|
||||
investment2.save
|
||||
investment3.milestone_tag_list.add("tag2")
|
||||
investment3.save
|
||||
|
||||
visit budget_path(budget)
|
||||
|
||||
click_link "See results"
|
||||
click_link "Milestones"
|
||||
|
||||
expect(page).to have_content(investment1.title)
|
||||
expect(page).to have_content(investment2.title)
|
||||
|
||||
select "tag2 (2)", from: "milestone_tag"
|
||||
|
||||
expect(page).to have_content(investment1.title)
|
||||
expect(page).to have_content(investment2.title)
|
||||
|
||||
select "Studying the project (1)", from: "status"
|
||||
|
||||
expect(page).to have_content(investment1.title)
|
||||
expect(page).not_to have_content(investment2.title)
|
||||
|
||||
select "Bidding (1)", from: "status"
|
||||
|
||||
expect(page).not_to have_content(investment1.title)
|
||||
expect(page).to have_content(investment2.title)
|
||||
|
||||
select "tag1 (1)", from: "milestone_tag"
|
||||
|
||||
expect(page).not_to have_content(investment1.title)
|
||||
expect(page).not_to have_content(investment2.title)
|
||||
|
||||
select "All (2)", from: "milestone_tag"
|
||||
|
||||
expect(page).not_to have_content(investment1.title)
|
||||
expect(page).to have_content(investment2.title)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "Heading Order" do
|
||||
|
||||
Reference in New Issue
Block a user