Merge pull request #11056 from mfo/US/fix-zip-export
ETQ instructeur, je souhaite pouvoir créer un modèle d'export zip
This commit is contained in:
commit
8a01a881d1
3 changed files with 31 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
@ -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
|
Loading…
Reference in a new issue