Enable test checking alert to finish valuation
It looks like it was disabled because it was failing sometimes for some reason. I haven't found the reason, though; we're changing the test a little bit to make it easier to read. Enabling it will let us find out whether it still fails.
This commit is contained in:
@@ -1264,19 +1264,17 @@ describe "Admin budget investments", :admin do
|
|||||||
expect(find("#js-investment-report-alert")).to be_checked
|
expect(find("#js-investment-report-alert")).to be_checked
|
||||||
end
|
end
|
||||||
|
|
||||||
# The feature tested in this scenario works as expected but some underlying reason
|
scenario "Shows alert with unfeasible status when 'Valuation finished' is checked" do
|
||||||
# we're not aware of makes it fail at random
|
|
||||||
xscenario "Shows alert with unfeasible status when 'Valuation finished' is checked" do
|
|
||||||
budget_investment = create(:budget_investment, :unfeasible)
|
budget_investment = create(:budget_investment, :unfeasible)
|
||||||
|
|
||||||
visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment)
|
visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment)
|
||||||
click_link "Edit dossier"
|
click_link "Edit dossier"
|
||||||
|
|
||||||
expect(page).to have_content("Valuation finished")
|
expect(page).to have_field "Valuation finished", checked: false
|
||||||
valuation = find_field("budget_investment[valuation_finished]")
|
|
||||||
accept_confirm { check("Valuation finished") }
|
accept_confirm { check("Valuation finished") }
|
||||||
|
|
||||||
expect(valuation).to be_checked
|
expect(page).to have_field "Valuation finished", checked: true
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Undoes check in 'Valuation finished' if user clicks 'cancel' on alert" do
|
scenario "Undoes check in 'Valuation finished' if user clicks 'cancel' on alert" do
|
||||||
|
|||||||
Reference in New Issue
Block a user