Skip to content

Commit

Permalink
fix: Downgrade wicked_pdf to 2.6.3 (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois authored Jan 31, 2024
1 parent a5b9852 commit a703fef
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ GEM
websocket-extensions (0.1.5)
wicked (1.4.0)
railties (>= 3.0.7)
wicked_pdf (2.7.0)
wicked_pdf (2.6.3)
activesupport
wisper (2.0.1)
wisper-rspec (1.1.0)
Expand Down
29 changes: 29 additions & 0 deletions spec/system/admin/export_initiative_signatures_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# frozen_string_literal: true

require "spec_helper"

describe "Export" do
include_context "when admins initiative"

let!(:votes) { create_list(:initiative_user_vote, 5, initiative: initiative) }

before do
switch_to_host(organization.host)
login_as user, scope: :user
end

it "downloads the PDF file", :download do
visit decidim_admin_initiatives.initiatives_path

within find("tr", text: translated(initiative.title)) do
page.find(".action-icon--edit").click
end

click_link "Export PDF of signatures"
within ".confirm-reveal" do
click_link "OK"
end

expect(File.basename(download_path)).to include("votes_#{initiative.id}.pdf")
end
end

0 comments on commit a703fef

Please sign in to comment.