fix(export_template.zip): link must have kind param

This commit is contained in:
mfo 2024-11-18 11:15:55 +01:00
parent 4b740f8f29
commit 2894897ad1
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
3 changed files with 31 additions and 2 deletions

View file

@ -37,7 +37,7 @@
.fr-mt-5w
= link_to t('.new_zip_export_template'), new_instructeur_procedure_export_template_path(@procedure), class: "fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-add-line fr-mr-1w"
= link_to t('.new_zip_export_template'), new_instructeur_procedure_export_template_path(@procedure, kind: 'zip'), class: "fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-add-line fr-mr-1w"
= link_to t('.new_tabular_export_template'), new_instructeur_procedure_export_template_path(@procedure, kind: 'tabular'), class: "fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-add-line"
.fr-table.fr-table--bordered.fr-table--no-caption.fr-mt-5w

View file

@ -6,7 +6,7 @@ describe "procedure exports" do
let(:types_de_champ_public) { [{ type: :text }] }
before { login_as(instructeur.user, scope: :user) }
scenario "create an export_template tabular and u", js: true do
scenario "create an export_template tabular", js: true do
Flipper.enable(:export_template, procedure)
visit instructeur_procedure_path(procedure)

View file

@ -0,0 +1,29 @@
# frozen_string_literal: true
describe "procedure exports zip" do
let(:instructeur) { create(:instructeur) }
let(:procedure) { create(:procedure, :published, types_de_champ_public:, instructeurs: [instructeur]) }
let(:types_de_champ_public) { [{ type: :text }] }
before { login_as(instructeur.user, scope: :user) }
scenario "create an export_template zip", chome: true do
visit instructeur_procedure_path(procedure)
click_on "Voir les exports et modèles d'export"
click_on "Modèles d'export"
click_on "Créer un modèle d'export zip"
fill_in "Nom du modèle", with: "Mon modèle"
expect(page).to have_content("Sélectionnez les fichiers que vous souhaitez exporter")
click_on "Enregistrer"
find("#tabpanel-export-templates", wait: 5, visible: true)
find("#tabpanel-export-templates").click
within 'table' do
expect(page).to have_content('Mon modèle')
end
end
end