Skip to content

Commit

Permalink
Merge pull request #22 from coopdevs/access-csv-import
Browse files Browse the repository at this point in the history
Navigate to CSV import from /direct_verifications
  • Loading branch information
sauloperez authored May 27, 2021
2 parents b45a311 + 144c7bd commit a6f4dcb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</h2>
</div>
<div class="card-section">
<p><%= t("decidim.direct_verifications.verification.admin.new.info") %></p>
<p><%= t("decidim.direct_verifications.verification.admin.new.info_html", link: new_import_path) %></p>
<%= form_tag direct_verifications_path, multipart: true, class: "form" do %>
<%= label_tag :userslist, t("admin.new.textarea", scope: "decidim.direct_verifications.verification") %>
<%= text_area_tag :userslist, @userslist, rows: 10 %>
Expand Down
3 changes: 1 addition & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ en:
authorization_handler: Verification method
authorize: Authorize users
check: Check users status
info: Enter the emails here, one per line. If the emails are preceded
by a text, it will be interpreted as the user's name
info_html: You can <a href=%{link}>import a CSV</a> or enter the emails here, one per line. If the emails are preceded by a text, it will be interpreted as the user's name.
register: Register users in the platform (if they exist they will be ignored)
revoke: Revoke authorization from users
submit: Send and process the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
visit decidim_admin_direct_verifications.new_import_path
end

it "can be accessed from direct_verifications_path" do
visit decidim_admin_direct_verifications.direct_verifications_path
click_link "import a CSV"
expect(page).to have_current_path(decidim_admin_direct_verifications.new_import_path)
end

context "when registering users" do
it "registers users through a CSV file" do
attach_file("CSV file with users data", filename)
Expand Down

0 comments on commit a6f4dcb

Please sign in to comment.