diff --git a/gemfiles/decidim_0.26.gemfile b/gemfiles/decidim_0.26.gemfile index 7f46001..8d83bba 100644 --- a/gemfiles/decidim_0.26.gemfile +++ b/gemfiles/decidim_0.26.gemfile @@ -30,4 +30,5 @@ end group :test do gem "rubocop-faker" + gem "axe-core-api", "~> 4.7.0" end \ No newline at end of file diff --git a/spec/proposals/system/edit_proposal_spec.rb b/spec/proposals/system/edit_proposal_spec.rb index e65ec05..6d8f9ee 100644 --- a/spec/proposals/system/edit_proposal_spec.rb +++ b/spec/proposals/system/edit_proposal_spec.rb @@ -3,12 +3,14 @@ require "spec_helper" describe "Edit proposals", type: :system do - include_context "with a component" + include_context "with a component" do + let!(:component) { create(:extended_proposal_component, participatory_space: participatory_space) } + end let(:manifest_name) { "proposals" } let!(:user) { create :user, :confirmed, organization: participatory_process.organization } let!(:another_user) { create :user, :confirmed, organization: participatory_process.organization } - let!(:proposal) { create :proposal, users: [user], component: component } + let!(:proposal) { create :extended_proposal, users: [user], component: component } let!(:proposal_title) { translated(proposal.title) } before do @@ -77,7 +79,7 @@ def visit_proposal let(:component) { create(:extended_proposal_component, :with_geocoding_enabled, participatory_space: participatory_process) } let(:address) { "6 Villa des Nymphéas 75020 Paris" } let(:new_address) { "6 rue Sorbier 75020 Paris" } - let!(:proposal) { create :proposal, address: address, users: [user], component: component } + let!(:proposal) { create :extended_proposal, address: address, users: [user], component: component } let(:latitude) { 48.8682538 } let(:longitude) { 2.389643 } @@ -234,7 +236,7 @@ def visit_proposal end describe "editing my proposal outside the time limit" do - let!(:proposal) { create :proposal, users: [user], component: component, created_at: 1.hour.ago } + let!(:proposal) { create :extended_proposal, users: [user], component: component, created_at: 1.hour.ago } before do login_as another_user, scope: :user diff --git a/spec/proposals/system/proposal_show_spec.rb b/spec/proposals/system/proposal_show_spec.rb index 2bb1656..28db170 100644 --- a/spec/proposals/system/proposal_show_spec.rb +++ b/spec/proposals/system/proposal_show_spec.rb @@ -3,9 +3,12 @@ require "spec_helper" describe "Show a Proposal", type: :system do - include_context "with a component" let(:manifest_name) { "proposals" } - let(:proposal) { create :proposal, component: component } + include_context "with a component" do + let!(:component) { create(:extended_proposal_component, + participatory_space: participatory_space) } + end + let(:proposal) { create :extended_proposal, component: component } def visit_proposal visit resource_locator(proposal).path diff --git a/spec/proposals/system/proposals_spec.rb b/spec/proposals/system/proposals_spec.rb index 0c89f47..6a2c204 100644 --- a/spec/proposals/system/proposals_spec.rb +++ b/spec/proposals/system/proposals_spec.rb @@ -183,7 +183,7 @@ let!(:proposal) do create( - :proposal, + :extended_proposal, :accepted, :official, :with_answer, @@ -225,7 +225,7 @@ context "when a proposal has costs" do let!(:proposal) do create( - :proposal, + :extended_proposal, :accepted, :with_answer, component: component, @@ -648,7 +648,7 @@ end context "when paginating" do - let!(:collection) { create_list :proposal, collection_size, component: component } + let!(:collection) { create_list :extended_proposal, collection_size, component: component } let!(:resource_selector) { ".card--proposal" } it_behaves_like "a paginated resource"