From 942ccf66745cfd0af98e7def83174d7838e82400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 27 Feb 2025 14:35:41 +0100 Subject: [PATCH] Group similar dashboard progress tests together All these tests were basically checking the same things. Since system tests are slow, we're grouping them together so executing them is slightly faster. --- spec/system/dashboard/dashboard_spec.rb | 26 ++----------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/spec/system/dashboard/dashboard_spec.rb b/spec/system/dashboard/dashboard_spec.rb index aaf7cfb28..1550361de 100644 --- a/spec/system/dashboard/dashboard_spec.rb +++ b/spec/system/dashboard/dashboard_spec.rb @@ -47,14 +47,6 @@ describe "Proposal's dashboard" do end end - scenario "Dashboard progress show proposed actions" do - action = create(:dashboard_action, :proposed_action, :active) - - visit progress_proposal_dashboard_path(proposal) - - expect(page).to have_content(action.title) - end - scenario "Dashboard progress show proposed actions truncated description" do action = create(:dashboard_action, :proposed_action, :active, description: "One short action") action_long = create(:dashboard_action, :proposed_action, :active, @@ -105,28 +97,14 @@ describe "Proposal's dashboard" do visit progress_proposal_dashboard_path(proposal) within "#proposed_actions_pending" do - expect(page).to have_content(action.title) + expect(page).to have_content action.title end - end - scenario "Dashboard progress display proposed_action done on his section" do - action = create(:dashboard_action, :proposed_action, :active) - - visit progress_proposal_dashboard_path(proposal) find(:css, "#dashboard_action_#{action.id}_execute").click within "#proposed_actions_done" do - expect(page).to have_content(action.title) + expect(page).to have_content action.title end - end - - scenario "Dashboard progress can execute proposed action" do - action = create(:dashboard_action, :proposed_action, :active) - - visit progress_proposal_dashboard_path(proposal) - expect(page).to have_content(action.title) - - find(:css, "#dashboard_action_#{action.id}_execute").click expect(page).not_to have_css "#dashboard_action_#{action.id}_execute" end