Merge pull request #4619 from consul/dependabot/bundler/master/view_component-2.37.0
Bump view_component from 2.28.0 to 2.37.0
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -59,7 +59,7 @@ gem "translator-text", "~> 0.1.0"
|
|||||||
gem "turbolinks", "~> 5.2.1"
|
gem "turbolinks", "~> 5.2.1"
|
||||||
gem "turnout", "~> 2.5.0"
|
gem "turnout", "~> 2.5.0"
|
||||||
gem "uglifier", "~> 4.2.0"
|
gem "uglifier", "~> 4.2.0"
|
||||||
gem "view_component", "~> 2.28.0", require: "view_component/engine"
|
gem "view_component", "~> 2.37.0", require: "view_component/engine"
|
||||||
gem "whenever", "~> 1.0.0", require: false
|
gem "whenever", "~> 1.0.0", require: false
|
||||||
gem "wicked_pdf", "~> 2.1.0"
|
gem "wicked_pdf", "~> 2.1.0"
|
||||||
gem "wkhtmltopdf-binary", "~> 0.12.4"
|
gem "wkhtmltopdf-binary", "~> 0.12.4"
|
||||||
|
|||||||
@@ -668,8 +668,9 @@ GEM
|
|||||||
uniform_notifier (1.14.2)
|
uniform_notifier (1.14.2)
|
||||||
user_agent_parser (2.6.0)
|
user_agent_parser (2.6.0)
|
||||||
uuidtools (2.1.5)
|
uuidtools (2.1.5)
|
||||||
view_component (2.28.0)
|
view_component (2.37.0)
|
||||||
activesupport (>= 5.0.0, < 7.0)
|
activesupport (>= 5.0.0, < 8.0)
|
||||||
|
method_source (~> 1.0)
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
wasabi (3.6.1)
|
wasabi (3.6.1)
|
||||||
@@ -797,7 +798,7 @@ DEPENDENCIES
|
|||||||
turbolinks (~> 5.2.1)
|
turbolinks (~> 5.2.1)
|
||||||
turnout (~> 2.5.0)
|
turnout (~> 2.5.0)
|
||||||
uglifier (~> 4.2.0)
|
uglifier (~> 4.2.0)
|
||||||
view_component (~> 2.28.0)
|
view_component (~> 2.37.0)
|
||||||
web-console (~> 3.7.0)
|
web-console (~> 3.7.0)
|
||||||
webdrivers (~> 4.6.0)
|
webdrivers (~> 4.6.0)
|
||||||
whenever (~> 1.0.0)
|
whenever (~> 1.0.0)
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ describe Budgets::Investments::FormComponent, type: :component do
|
|||||||
|
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:current_user).and_return(create(:user))
|
allow(controller).to receive(:current_user).and_return(create(:user))
|
||||||
allow(request).to receive(:path_parameters).and_return(budget_id: budget.id)
|
end
|
||||||
|
|
||||||
|
around do |example|
|
||||||
|
with_request_url(new_budget_investment_path(budget)) { example.run }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "accept terms of services field" do
|
describe "accept terms of services field" do
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ require "rails_helper"
|
|||||||
describe Layout::LocaleSwitcherComponent, type: :component do
|
describe Layout::LocaleSwitcherComponent, type: :component do
|
||||||
let(:component) { Layout::LocaleSwitcherComponent.new }
|
let(:component) { Layout::LocaleSwitcherComponent.new }
|
||||||
|
|
||||||
before do
|
around do |example|
|
||||||
allow(request).to receive(:path_parameters).and_return(
|
with_request_url("/") { example.run }
|
||||||
Rails.application.routes.recognize_path("/")
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with only one language" do
|
context "with only one language" do
|
||||||
|
|||||||
@@ -6,14 +6,12 @@ describe SDGManagement::Relations::IndexComponent, type: :component, controller:
|
|||||||
.and_return(SDGManagement::RelationsController::FILTERS)
|
.and_return(SDGManagement::RelationsController::FILTERS)
|
||||||
allow_any_instance_of(SDGManagement::RelationsController).to receive(:current_filter)
|
allow_any_instance_of(SDGManagement::RelationsController).to receive(:current_filter)
|
||||||
.and_return(SDGManagement::RelationsController::FILTERS.first)
|
.and_return(SDGManagement::RelationsController::FILTERS.first)
|
||||||
allow_any_instance_of(ApplicationHelper).to receive(:current_path_with_query_params)
|
|
||||||
.and_return("/anything")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the search form" do
|
it "renders the search form" do
|
||||||
component = SDGManagement::Relations::IndexComponent.new(Proposal.none.page(1))
|
component = SDGManagement::Relations::IndexComponent.new(Proposal.none.page(1))
|
||||||
|
|
||||||
render_inline component
|
with_request_url("/anything") { render_inline component }
|
||||||
|
|
||||||
expect(page).to have_css "form.complex"
|
expect(page).to have_css "form.complex"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,12 +17,10 @@ describe Shared::AdvancedSearchComponent, type: :component do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "SDG filter" do
|
describe "SDG filter", controller: ProposalsController do
|
||||||
before do
|
before do
|
||||||
Setting["feature.sdg"] = true
|
Setting["feature.sdg"] = true
|
||||||
Setting["sdg.process.proposals"] = true
|
Setting["sdg.process.proposals"] = true
|
||||||
|
|
||||||
allow(component).to receive(:controller_path).and_return("proposals")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not render when the feature is disabled" do
|
it "does not render when the feature is disabled" do
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ require "rails_helper"
|
|||||||
describe Shared::FilterSelectorComponent, type: :component do
|
describe Shared::FilterSelectorComponent, type: :component do
|
||||||
it "renders a form with a select" do
|
it "renders a form with a select" do
|
||||||
component = Shared::FilterSelectorComponent.new(i18n_namespace: "budgets.investments.index")
|
component = Shared::FilterSelectorComponent.new(i18n_namespace: "budgets.investments.index")
|
||||||
allow(component).to receive(:url_for).and_return("/")
|
|
||||||
allow(component).to receive(:valid_filters).and_return(["unfeasible", "winners"])
|
allow(component).to receive(:valid_filters).and_return(["unfeasible", "winners"])
|
||||||
allow(component).to receive(:current_filter).and_return(nil)
|
allow(component).to receive(:current_filter).and_return(nil)
|
||||||
|
|
||||||
render_inline component
|
with_request_url("/") { render_inline component }
|
||||||
|
|
||||||
expect(page).to have_select "Filtering projects by"
|
expect(page).to have_select "Filtering projects by"
|
||||||
expect(page).to have_selector "form[method='get'].filter-selector select"
|
expect(page).to have_selector "form[method='get'].filter-selector select"
|
||||||
|
|||||||
Reference in New Issue
Block a user