Allow actions to be unexecuted

Before actions could be marked as executed. With this commit we are also allowing actions to be marked as unexecuted.
This commit is contained in:
voodoorai2000
2019-04-23 14:56:23 +02:00
committed by decabeza
parent e139057001
commit dfbdc0568c
4 changed files with 26 additions and 1 deletions

View File

@@ -131,6 +131,17 @@ feature "Proposal's dashboard" do
expect(page).not_to have_selector(:css, "#dashboard_action_#{action.id}_execute")
end
scenario "Dashboard progress can unexecute proposed action" do
action = create(:dashboard_action, :proposed_action, :active)
executed_action = create(:dashboard_executed_action, proposal: proposal, action: action)
visit progress_proposal_dashboard_path(proposal)
expect(page).to have_content(action.title)
find(:css, "#dashboard_action_#{action.id}_unexecute").click
expect(page).to have_selector(:css, "#dashboard_action_#{action.id}_execute")
end
scenario "Dashboard progress dont show proposed actions with published_proposal: true" do
action = create(:dashboard_action, :proposed_action, :active, published_proposal: true)