Merge branch 'dev'
This commit is contained in:
commit
d92780b859
20 changed files with 200 additions and 288 deletions
54
.rubocop.yml
54
.rubocop.yml
|
@ -669,7 +669,12 @@ Rails/BulkChangeTable:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Rails/CreateTableWithTimestamps:
|
Rails/CreateTableWithTimestamps:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- db/migrate/2015*.rb
|
||||||
|
- db/migrate/2016*.rb
|
||||||
|
- db/migrate/2017*.rb
|
||||||
|
- db/migrate/2018*.rb
|
||||||
|
|
||||||
Rails/Date:
|
Rails/Date:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -806,37 +811,39 @@ Style/Alias:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/ArrayJoin:
|
Style/ArrayJoin:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/AsciiComments:
|
Style/AsciiComments:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/Attr:
|
Style/Attr:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/AutoResourceCleanup:
|
Style/AutoResourceCleanup:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/BarePercentLiterals:
|
Style/BarePercentLiterals:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/BeginBlock:
|
Style/BeginBlock:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/BlockComments:
|
Style/BlockComments:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/BlockDelimiters:
|
Style/BlockDelimiters:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- "spec/**/*"
|
||||||
|
|
||||||
Style/BracesAroundHashParameters:
|
Style/BracesAroundHashParameters:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/CaseEquality:
|
Style/CaseEquality:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/CharacterLiteral:
|
Style/CharacterLiteral:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -845,10 +852,10 @@ Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/ClassCheck:
|
Style/ClassCheck:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/ClassMethods:
|
Style/ClassMethods:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/ClassVars:
|
Style/ClassVars:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -857,7 +864,7 @@ Style/CollectionMethods:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/ColonMethodCall:
|
Style/ColonMethodCall:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/ColonMethodDefinition:
|
Style/ColonMethodDefinition:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -881,7 +888,7 @@ Style/DateTime:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/DefWithParentheses:
|
Style/DefWithParentheses:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/Dir:
|
Style/Dir:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -896,7 +903,7 @@ Style/DoubleNegation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/EachForSimpleLoop:
|
Style/EachForSimpleLoop:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/EachWithObject:
|
Style/EachWithObject:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -914,43 +921,44 @@ Style/EmptyLambdaParameter:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Style/EmptyLiteral:
|
Style/EmptyLiteral:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/EmptyMethod:
|
Style/EmptyMethod:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/Encoding:
|
Style/Encoding:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/EndBlock:
|
Style/EndBlock:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/EvalWithLocation:
|
Style/EvalWithLocation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/EvenOdd:
|
Style/EvenOdd:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/ExpandPathArguments:
|
Style/ExpandPathArguments:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Style/FlipFlop:
|
Style/FlipFlop:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/For:
|
Style/For:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/FormatString:
|
Style/FormatString:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/FormatStringToken:
|
Style/FormatStringToken:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
EnforcedStyle: template
|
||||||
|
|
||||||
Style/FrozenStringLiteralComment:
|
Style/FrozenStringLiteralComment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/GlobalVars:
|
Style/GlobalVars:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/GuardClause:
|
Style/GuardClause:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -517,7 +517,7 @@ GEM
|
||||||
rspec-support (3.8.0)
|
rspec-support (3.8.0)
|
||||||
rspec_junit_formatter (0.4.1)
|
rspec_junit_formatter (0.4.1)
|
||||||
rspec-core (>= 2, < 4, != 2.12.0)
|
rspec-core (>= 2, < 4, != 2.12.0)
|
||||||
rubocop (0.60.0)
|
rubocop (0.61.1)
|
||||||
jaro_winkler (~> 1.5.1)
|
jaro_winkler (~> 1.5.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.5, != 2.5.1.1)
|
parser (>= 2.5, != 2.5.1.1)
|
||||||
|
|
|
@ -93,7 +93,7 @@ class StatsController < ApplicationController
|
||||||
else
|
else
|
||||||
evolution = 0
|
evolution = 0
|
||||||
end
|
end
|
||||||
formatted_evolution = sprintf("%+d", evolution)
|
formatted_evolution = format("%+d", evolution)
|
||||||
|
|
||||||
{
|
{
|
||||||
total: total.to_s,
|
total: total.to_s,
|
||||||
|
@ -111,7 +111,7 @@ class StatsController < ApplicationController
|
||||||
else
|
else
|
||||||
evolution = 0
|
evolution = 0
|
||||||
end
|
end
|
||||||
formatted_evolution = sprintf("%+d", evolution)
|
formatted_evolution = format("%+d", evolution)
|
||||||
|
|
||||||
{
|
{
|
||||||
total: total.to_s,
|
total: total.to_s,
|
||||||
|
|
|
@ -1,164 +0,0 @@
|
||||||
// Include runtime-polyfills for older browsers.
|
|
||||||
// Due to .babelrc's 'useBuiltIns', only polyfills actually
|
|
||||||
// required by the browsers we support will be included.
|
|
||||||
import '@babel/polyfill';
|
|
||||||
|
|
||||||
// This file is copied from mailjet. We serve here a copy of it ourselves
|
|
||||||
// to avoid loading javascript files from other domains on the frontpage.
|
|
||||||
|
|
||||||
// Array of popin translations
|
|
||||||
const i8nMessages = [];
|
|
||||||
i8nMessages['en_US'] = [];
|
|
||||||
i8nMessages['fr_FR'] = [];
|
|
||||||
i8nMessages['de_DE'] = [];
|
|
||||||
i8nMessages['es_ES'] = [];
|
|
||||||
i8nMessages['en_US']['iframe-error'] =
|
|
||||||
'Your browser does not support the IFrame element';
|
|
||||||
i8nMessages['en_US']['close-popin'] = 'Close';
|
|
||||||
i8nMessages['fr_FR']['iframe-error'] =
|
|
||||||
"Votre navigateur ne supporte pas l'élément iframe";
|
|
||||||
i8nMessages['fr_FR']['close-popin'] = 'Fermer';
|
|
||||||
i8nMessages['de_DE']['iframe-error'] =
|
|
||||||
'Ihr navigator verträgt kein Element iframe';
|
|
||||||
i8nMessages['de_DE']['close-popin'] = 'Schließen';
|
|
||||||
i8nMessages['es_ES']['iframe-error'] =
|
|
||||||
'Su navegante no soporta el elemento iframe';
|
|
||||||
i8nMessages['es_ES']['close-popin'] = 'Cerrarse';
|
|
||||||
|
|
||||||
function mjOpenPopin(event, element) {
|
|
||||||
event.preventDefault();
|
|
||||||
//event.stopPropagation();
|
|
||||||
|
|
||||||
//var token = str.substring(btnNode.id.lastIndexOf("-") + 1, btnNode.id.length - btnNode.id.lastIndexOf("-"));
|
|
||||||
var token = element.getAttribute('data-token');
|
|
||||||
|
|
||||||
//Register parameters
|
|
||||||
var widgetPopinData = document.querySelector(
|
|
||||||
".mj-w-data[data-token='" + token + "']"
|
|
||||||
);
|
|
||||||
if (widgetPopinData) {
|
|
||||||
var apiKey = widgetPopinData.getAttribute('data-apikey');
|
|
||||||
var wId = widgetPopinData.getAttribute('data-w-id');
|
|
||||||
var locale = widgetPopinData.getAttribute('data-lang');
|
|
||||||
var base = widgetPopinData.getAttribute('data-base');
|
|
||||||
var width = widgetPopinData.getAttribute('data-width');
|
|
||||||
var height = widgetPopinData.getAttribute('data-height');
|
|
||||||
var statics = widgetPopinData.getAttribute('data-statics');
|
|
||||||
|
|
||||||
// Call to Mailjet CSS file
|
|
||||||
var cssFile = document.createElement('link');
|
|
||||||
cssFile.setAttribute('rel', 'stylesheet');
|
|
||||||
cssFile.setAttribute('type', 'text/css');
|
|
||||||
if (statics) {
|
|
||||||
base += '/' + statics;
|
|
||||||
}
|
|
||||||
cssFile.setAttribute('href', base + '/css/w-popin-less.css');
|
|
||||||
document.getElementsByTagName('head')[0].appendChild(cssFile);
|
|
||||||
|
|
||||||
var htmlCode =
|
|
||||||
'<div id="mj-w-overlay" style="display: none;">' +
|
|
||||||
'<div id="mj-w-popin-block" style="max-width:' +
|
|
||||||
width +
|
|
||||||
'px; max-height:' +
|
|
||||||
height +
|
|
||||||
'px">' +
|
|
||||||
'<div id="mj-w-loader"></div>' +
|
|
||||||
'<img id="mj-w-close-img" alt="' +
|
|
||||||
i8nMessages[locale]['close-popin'] +
|
|
||||||
'" title="' +
|
|
||||||
i8nMessages[locale]['close-popin'] +
|
|
||||||
'" src="' +
|
|
||||||
base +
|
|
||||||
'/images/w-popin-close.png" style="display:none;" />' +
|
|
||||||
'<iframe id="mj-w-iframe" src="' +
|
|
||||||
base +
|
|
||||||
'/widget/iframe/' +
|
|
||||||
apiKey +
|
|
||||||
'/' +
|
|
||||||
wId +
|
|
||||||
'" scrolling="no" width="100% " frameborder="0" allotransparency="true" style="background-color:transparent; border-radius:3px;height: 0px;">' +
|
|
||||||
'<p>' +
|
|
||||||
i8nMessages[locale]['iframe-error'] +
|
|
||||||
'</p>' +
|
|
||||||
'</iframe>' +
|
|
||||||
'</div>' +
|
|
||||||
'</div>';
|
|
||||||
|
|
||||||
widgetPopinData.innerHTML = htmlCode;
|
|
||||||
|
|
||||||
document.getElementById('mj-w-iframe').onload = function() {
|
|
||||||
document.getElementById('mj-w-iframe').style.height = height + 'px';
|
|
||||||
document.getElementById('mj-w-close-img').style.display = 'block';
|
|
||||||
document.getElementById('mj-w-loader').style.display = 'none';
|
|
||||||
document.getElementById('mj-w-popin-block').style.border = 'none';
|
|
||||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
|
||||||
document.getElementById('mj-w-iframe').style.width = '100%';
|
|
||||||
document.getElementById('mj-w-popin-block').style.height = 'auto';
|
|
||||||
document.getElementById('mj-w-popin-block').style.width = '90%';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var closeImgNode = document.getElementById('mj-w-close-img');
|
|
||||||
closeImgNode.addEventListener('click', function(event) {
|
|
||||||
closePopin();
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener('keydown', escapeEvent);
|
|
||||||
document.getElementById('mj-w-iframe').onclick = function(event) {
|
|
||||||
event.stopPropagation();
|
|
||||||
};
|
|
||||||
//document.addEventListener("click");
|
|
||||||
|
|
||||||
document.getElementById('mj-w-overlay').style.display = 'block';
|
|
||||||
document
|
|
||||||
.getElementById('mj-w-overlay')
|
|
||||||
.addEventListener('click', function(event) {
|
|
||||||
closePopin();
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Escape event : close popin
|
|
||||||
function escapeEvent(e) {
|
|
||||||
if (e.keyCode == 27) {
|
|
||||||
// Escape key
|
|
||||||
closePopin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close popin (remove popin HTML code)
|
|
||||||
function closePopin() {
|
|
||||||
var rootContainer = document.getElementById('mj-w-overlay');
|
|
||||||
if (rootContainer) {
|
|
||||||
rootContainer.parentNode.removeChild(rootContainer);
|
|
||||||
}
|
|
||||||
document.removeEventListener('keypress', escapeEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
addEventListener('load', () => {
|
|
||||||
// Display popin when click event occure on widget button
|
|
||||||
for (let btnNode of document.getElementsByClassName('mj-w-btn')) {
|
|
||||||
btnNode.style.cursor = 'pointer';
|
|
||||||
btnNode.addEventListener('click', function(event) {
|
|
||||||
mjOpenPopin(event, this);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
addEventListener('resize', () => {
|
|
||||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
|
||||||
const popin = document.getElementById('mj-w-popin-block');
|
|
||||||
const iframe = document.getElementById('mj-w-iframe');
|
|
||||||
if (popin) {
|
|
||||||
popin.style.height = 'auto';
|
|
||||||
popin.style.width = '90%';
|
|
||||||
}
|
|
||||||
if (iframe) {
|
|
||||||
iframe.style.width = '100%';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
window.mjOpenPopin = mjOpenPopin;
|
|
|
@ -41,11 +41,11 @@ class FileSizeValidator < ActiveModel::EachValidator
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_each(record, attribute, value)
|
def validate_each(record, attribute, value)
|
||||||
if !value.kind_of?(CarrierWave::Uploader::Base)
|
if !value.is_a?(CarrierWave::Uploader::Base)
|
||||||
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected")
|
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected")
|
||||||
end
|
end
|
||||||
|
|
||||||
if value.kind_of?(String)
|
if value.is_a?(String)
|
||||||
value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value)
|
value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -167,13 +167,13 @@ module TagsSubstitutionConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def types_de_champ_tags(types_de_champ, available_for_states)
|
def types_de_champ_tags(types_de_champ, available_for_states)
|
||||||
types_de_champ.map { |tdc|
|
types_de_champ.map do |tdc|
|
||||||
{
|
{
|
||||||
libelle: tdc.libelle,
|
libelle: tdc.libelle,
|
||||||
description: tdc.description,
|
description: tdc.description,
|
||||||
available_for_states: available_for_states
|
available_for_states: available_for_states
|
||||||
}
|
}
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def replace_tags(text, dossier)
|
def replace_tags(text, dossier)
|
||||||
|
|
|
@ -239,6 +239,10 @@ class Procedure < ApplicationRecord
|
||||||
whitelisted_at.present?
|
whitelisted_at.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_old_pjs?
|
||||||
|
types_de_piece_justificative.any?
|
||||||
|
end
|
||||||
|
|
||||||
def total_dossier
|
def total_dossier
|
||||||
self.dossiers.state_not_brouillon.size
|
self.dossiers.state_not_brouillon.size
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,5 +5,5 @@ class TypeDePieceJustificative < ApplicationRecord
|
||||||
|
|
||||||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||||
|
|
||||||
validates :lien_demarche, format: { with: URI::regexp }, allow_blank: true, allow_nil: true
|
validates :lien_demarche, format: { with: URI.regexp }, allow_blank: true, allow_nil: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
.row.white-back
|
.row.white-back
|
||||||
#piece_justificative_form
|
.alert.alert-info
|
||||||
= render 'form'
|
.form-group
|
||||||
|
%p
|
||||||
|
Pour vos nouveaux besoins de pièces jointes, nous vous invitons à
|
||||||
|
= link_to(admin_procedure_types_de_champ_path(@procedure)) do
|
||||||
|
rajouter des champs
|
||||||
|
\ <em>pièce justificative</em> à votre formulaire.
|
||||||
|
|
||||||
|
%p
|
||||||
|
Ils offrent les avantages suivants :
|
||||||
|
|
||||||
|
%ul
|
||||||
|
%li Pièces justificatives au fil du formulaire, pour un déroulé plus fluide
|
||||||
|
%li Possibilité de fournir à l’usager un fichier type à remplir et renvoyer
|
||||||
|
%li Possibilité pour l’usager de supprimer les documents joints par erreur
|
||||||
|
%li Support des pièces de grande taille (jusqu’à 200 Mo par pièce)
|
||||||
|
%li Pas de limite de soumission simultanée de plusieurs pièces, pour une expérience usager plus confortable
|
||||||
|
|
||||||
|
= link_to(admin_procedure_types_de_champ_path(@procedure), class: 'btn btn-success') do
|
||||||
|
Ajouter un champ PJ
|
||||||
|
|
||||||
|
- if @procedure.has_old_pjs?
|
||||||
|
#piece_justificative_form
|
||||||
|
= render 'form'
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
%data.mj-w-data{ "data-apikey" => "1v5T", "data-base" => "https://app.mailjet.com", "data-height" => "328", "data-lang" => "fr_FR", "data-statics" => "statics", "data-token" => "11c89e7ddb46fbcdcb7f8fe5fdfca818", "data-w-id" => "39b", "data-width" => "640", "value" => "mj" }
|
|
||||||
= javascript_pack_tag 'mailjet', defer: true, 'data-turbolinks-eval': false
|
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
- if content_for?(:footer)
|
- if content_for?(:footer)
|
||||||
= content_for(:footer)
|
= content_for(:footer)
|
||||||
= render partial: "layouts/mailjet_newsletter"
|
|
||||||
|
|
||||||
- if Rails.env.development?
|
- if Rails.env.development?
|
||||||
= javascript_include_tag :xray
|
= javascript_include_tag :xray
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
%ul.footer-logos
|
%ul.footer-logos
|
||||||
%li.footer-text
|
%li.footer-text
|
||||||
Un service fourni par la <a href="http://www.modernisation.gouv.fr/">DINSIC</a>
|
Un service fourni par la
|
||||||
|
= link_to "DINSIC", "http://www.modernisation.gouv.fr/"
|
||||||
%br
|
%br
|
||||||
et incubé par <a href="https://beta.gouv.fr">beta.gouv.fr</a>
|
et incubé par
|
||||||
|
= link_to "beta.gouv.fr", "https://beta.gouv.fr"
|
||||||
%li
|
%li
|
||||||
= link_to "http://www.modernisation.gouv.fr/" do
|
= link_to "http://www.modernisation.gouv.fr/" do
|
||||||
%span.footer-logo.footer-logo-dinsic{ role: 'img', 'aria-label': 'DINSIC' }
|
%span.footer-logo.footer-logo-dinsic{ role: 'img', 'aria-label': 'DINSIC' }
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
%ul.footer-links
|
%ul.footer-links
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
%a{ href: '#', 'data-token' => '11c89e7ddb46fbcdcb7f8fe5fdfca818', onclick: 'mjOpenPopin(event, this)' } Newsletter
|
= link_to "Newsletter", "https://my.sendinblue.com/users/subscribe/js_id/3s2q1/id/1", :class => "footer-link", :target => "_blank"
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "Nouveautés", "https://github.com/betagouv/tps/releases", :class => "footer-link"
|
= link_to "Nouveautés", "https://github.com/betagouv/tps/releases", :class => "footer-link"
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
|
@ -25,9 +27,9 @@
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "CGU", CGU_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
= link_to "CGU", CGU_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "Mentions légales", MENTIONS_LEGALES_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
= link_to "Mentions légales", MENTIONS_LEGALES_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
||||||
%li.footer-link
|
%li.footer-link
|
||||||
= link_to "Suivi d'audience et vie privée", suivi_path, :class => "footer-link"
|
= link_to "Suivi d'audience et vie privée", suivi_path, :class => "footer-link"
|
||||||
|
|
||||||
%li.footer-column
|
%li.footer-column
|
||||||
%ul.footer-links
|
%ul.footer-links
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
- content_for :footer do
|
- content_for :footer do
|
||||||
= render partial: "root/footer"
|
= render partial: "root/footer"
|
||||||
|
|
||||||
.tour-de-france-banner
|
|
||||||
.container
|
|
||||||
L'équipe demarches-simplifiees.fr vient à votre rencontre cet automne.
|
|
||||||
= succeed '.' do
|
|
||||||
= link_to "En savoir plus", tour_de_france_path
|
|
||||||
|
|
||||||
.landing
|
.landing
|
||||||
.landing-panel.hero-panel
|
.landing-panel.hero-panel
|
||||||
.container
|
.container
|
||||||
|
|
6
db/migrate/20181218204707_add_missing_timestamps.rb
Normal file
6
db/migrate/20181218204707_add_missing_timestamps.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
class AddMissingTimestamps < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_timestamps :administrateurs_gestionnaires, null: true
|
||||||
|
add_timestamps :geo_areas, null: true
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2018_12_18_103212) do
|
ActiveRecord::Schema.define(version: 2018_12_18_204707) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -60,6 +60,8 @@ ActiveRecord::Schema.define(version: 2018_12_18_103212) do
|
||||||
create_table "administrateurs_gestionnaires", id: false, force: :cascade do |t|
|
create_table "administrateurs_gestionnaires", id: false, force: :cascade do |t|
|
||||||
t.integer "administrateur_id"
|
t.integer "administrateur_id"
|
||||||
t.integer "gestionnaire_id"
|
t.integer "gestionnaire_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
t.index ["administrateur_id"], name: "index_administrateurs_gestionnaires_on_administrateur_id"
|
t.index ["administrateur_id"], name: "index_administrateurs_gestionnaires_on_administrateur_id"
|
||||||
t.index ["gestionnaire_id", "administrateur_id"], name: "unique_couple_administrateur_gestionnaire", unique: true
|
t.index ["gestionnaire_id", "administrateur_id"], name: "unique_couple_administrateur_gestionnaire", unique: true
|
||||||
t.index ["gestionnaire_id"], name: "index_administrateurs_gestionnaires_on_gestionnaire_id"
|
t.index ["gestionnaire_id"], name: "index_administrateurs_gestionnaires_on_gestionnaire_id"
|
||||||
|
@ -344,6 +346,8 @@ ActiveRecord::Schema.define(version: 2018_12_18_103212) do
|
||||||
t.jsonb "properties"
|
t.jsonb "properties"
|
||||||
t.bigint "champ_id"
|
t.bigint "champ_id"
|
||||||
t.string "geo_reference_id"
|
t.string "geo_reference_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
t.index ["champ_id"], name: "index_geo_areas_on_champ_id"
|
t.index ["champ_id"], name: "index_geo_areas_on_champ_id"
|
||||||
t.index ["source"], name: "index_geo_areas_on_source"
|
t.index ["source"], name: "index_geo_areas_on_source"
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace :cloudstorage do
|
||||||
Rake::Task['cloudstorage:init'].invoke
|
Rake::Task['cloudstorage:init'].invoke
|
||||||
|
|
||||||
error_count = 0
|
error_count = 0
|
||||||
[Cerfa, PieceJustificative, Procedure].each { |c|
|
[Cerfa, PieceJustificative, Procedure].each do |c|
|
||||||
c.all.each { |entry|
|
c.all.each do |entry|
|
||||||
content = (c == Procedure) ? entry.logo : entry.content
|
content = (c == Procedure) ? entry.logo : entry.content
|
||||||
if !(content.current_path.nil? || File.exist?(File.dirname(content.current_path) + '/uploaded'))
|
if !(content.current_path.nil? || File.exist?(File.dirname(content.current_path) + '/uploaded'))
|
||||||
secure_token = SecureRandom.uuid
|
secure_token = SecureRandom.uuid
|
||||||
|
@ -56,8 +56,8 @@ namespace :cloudstorage do
|
||||||
puts "Skipping #{content.current_path}"
|
puts "Skipping #{content.current_path}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
}
|
end
|
||||||
|
|
||||||
puts "There were #{error_count} errors while uploading files. See upload_errors.report file for details."
|
puts "There were #{error_count} errors while uploading files. See upload_errors.report file for details."
|
||||||
puts 'Enf of migration'
|
puts 'Enf of migration'
|
||||||
|
@ -67,8 +67,8 @@ namespace :cloudstorage do
|
||||||
task :revert do
|
task :revert do
|
||||||
Rake::Task['cloudstorage:init'].invoke
|
Rake::Task['cloudstorage:init'].invoke
|
||||||
|
|
||||||
[Cerfa, PieceJustificative, Procedure].each { |c|
|
[Cerfa, PieceJustificative, Procedure].each do |c|
|
||||||
c.all.each { |entry|
|
c.all.each do |entry|
|
||||||
content = (c == Procedure) ? entry.logo : entry.content
|
content = (c == Procedure) ? entry.logo : entry.content
|
||||||
if content.current_path.present?
|
if content.current_path.present?
|
||||||
if File.exist?(File.dirname(content.current_path) + '/uploaded')
|
if File.exist?(File.dirname(content.current_path) + '/uploaded')
|
||||||
|
@ -86,26 +86,26 @@ namespace :cloudstorage do
|
||||||
FileUtils.rm(File.dirname(content.current_path) + '/secure_token_cloudstorage')
|
FileUtils.rm(File.dirname(content.current_path) + '/secure_token_cloudstorage')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Clear old documents in tenant'
|
desc 'Clear old documents in tenant'
|
||||||
task :clear do
|
task :clear do
|
||||||
Rake::Task['cloudstorage:init'].invoke
|
Rake::Task['cloudstorage:init'].invoke
|
||||||
|
|
||||||
@cont.objects.each { |object|
|
@cont.objects.each do |object|
|
||||||
puts "Removing #{object}"
|
puts "Removing #{object}"
|
||||||
@cont.delete_object(object)
|
@cont.delete_object(object)
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task :clear_old_objects do
|
task :clear_old_objects do
|
||||||
Rake::Task['cloudstorage:init'].invoke
|
Rake::Task['cloudstorage:init'].invoke
|
||||||
|
|
||||||
@cont.objects_detail.each { |object, details|
|
@cont.objects_detail.each do |object, details|
|
||||||
last_modified = Time.zone.parse(details[:last_modified])
|
last_modified = Time.zone.parse(details[:last_modified])
|
||||||
@cont.delete_object(object) if last_modified.utc <= (Time.zone.now - 2.years).utc
|
@cont.delete_object(object) if last_modified.utc <= (Time.zone.now - 2.years).utc
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
namespace :after_party do
|
||||||
|
desc 'Deployment task: fix_email_templates_subjects'
|
||||||
|
task fix_email_templates_subjects: :environment do
|
||||||
|
puts "Running deploy task 'fix_email_templates_subjects'"
|
||||||
|
|
||||||
|
klasses = [
|
||||||
|
Mails::ClosedMail,
|
||||||
|
Mails::InitiatedMail,
|
||||||
|
Mails::ReceivedMail,
|
||||||
|
Mails::RefusedMail,
|
||||||
|
Mails::WithoutContinuationMail
|
||||||
|
]
|
||||||
|
|
||||||
|
klasses.each do |klass|
|
||||||
|
klass
|
||||||
|
.where("subject LIKE '%--libellé procédure--%'")
|
||||||
|
.each do |instance|
|
||||||
|
|
||||||
|
instance.update(subject: instance.subject.gsub("--libellé procédure--", "--libellé démarche--"))
|
||||||
|
rake_puts "Subject mis-à-jour pour #{klass.to_s}##{instance.id}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Update task as completed. If you remove the line below, the task will
|
||||||
|
# run with every deploy (or every time you call after_party:run).
|
||||||
|
AfterParty::TaskRecord.create version: '20181219122438'
|
||||||
|
end # task :fix_email_templates_subjects
|
||||||
|
end # namespace :after_party
|
|
@ -52,7 +52,7 @@ class ProgressReport
|
||||||
|
|
||||||
def print_progress
|
def print_progress
|
||||||
elapsed = Time.zone.now - @start
|
elapsed = Time.zone.now - @start
|
||||||
percent = sprintf('%5.1f%%', @per_10_000 / 100.0)
|
percent = format('%5.1f%%', @per_10_000 / 100.0)
|
||||||
total = @total.to_s
|
total = @total.to_s
|
||||||
count = @count.to_s.rjust(total.length)
|
count = @count.to_s.rjust(total.length)
|
||||||
rake_print("\r#{percent} (#{count}/#{total}) [#{format_duration(elapsed)}/#{format_duration(elapsed * 10_000.0 / @per_10_000)}]")
|
rake_print("\r#{percent} (#{count}/#{total}) [#{format_duration(elapsed)}/#{format_duration(elapsed * 10_000.0 / @per_10_000)}]")
|
||||||
|
|
|
@ -6,28 +6,31 @@ feature 'add a new type de piece justificative', js: true do
|
||||||
before do
|
before do
|
||||||
login_as administrateur, scope: :administrateur
|
login_as administrateur, scope: :administrateur
|
||||||
end
|
end
|
||||||
context 'when there is no piece justificative' do
|
context 'when there is an existing piece justificative' do
|
||||||
let(:procedure) { create(:procedure, administrateur: administrateur) }
|
let(:procedure) { create(:procedure, administrateur: administrateur) }
|
||||||
before do
|
before do
|
||||||
|
# Create a dummy PJ, because adding PJs is no longer allowed on procedures that
|
||||||
|
# do not already have one
|
||||||
|
procedure.types_de_piece_justificative.create(libelle: "dummy PJ")
|
||||||
visit admin_procedure_pieces_justificatives_path(procedure)
|
visit admin_procedure_pieces_justificatives_path(procedure)
|
||||||
end
|
end
|
||||||
scenario 'displays a form to add new type de piece justificative' do
|
scenario 'displays a form to add new type de piece justificative' do
|
||||||
within '#new_type_de_piece_justificative' do
|
within '#new_type_de_piece_justificative' do
|
||||||
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_0_libelle')
|
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
context 'when user fills field and submit' do
|
context 'when user fills field and submit' do
|
||||||
let(:libelle) { 'ma piece' }
|
let(:libelle) { 'ma piece' }
|
||||||
let(:description) { 'ma description' }
|
let(:description) { 'ma description' }
|
||||||
before do
|
before do
|
||||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_0_libelle').set(libelle)
|
page.find_by_id('procedure_types_de_piece_justificative_attributes_1_libelle').set(libelle)
|
||||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_0_description').set(description)
|
page.find_by_id('procedure_types_de_piece_justificative_attributes_1_description').set(description)
|
||||||
page.click_on 'Ajouter la pièce'
|
page.click_on 'Ajouter la pièce'
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
end
|
end
|
||||||
subject do
|
subject do
|
||||||
procedure.reload
|
procedure.reload
|
||||||
procedure.types_de_piece_justificative.first
|
procedure.types_de_piece_justificative.second
|
||||||
end
|
end
|
||||||
scenario 'creates new type de piece' do
|
scenario 'creates new type de piece' do
|
||||||
expect(subject.libelle).to eq(libelle)
|
expect(subject.libelle).to eq(libelle)
|
||||||
|
@ -35,23 +38,23 @@ feature 'add a new type de piece justificative', js: true do
|
||||||
end
|
end
|
||||||
scenario 'displays new created pj' do
|
scenario 'displays new created pj' do
|
||||||
within '#liste_piece_justificative' do
|
within '#liste_piece_justificative' do
|
||||||
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_0_libelle')
|
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
||||||
expect(page.body).to match(libelle)
|
expect(page.body).to match(libelle)
|
||||||
expect(page.body).to match(description)
|
expect(page.body).to match(description)
|
||||||
end
|
end
|
||||||
within '#new_type_de_piece_justificative' do
|
within '#new_type_de_piece_justificative' do
|
||||||
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
expect(page).to have_css('#procedure_types_de_piece_justificative_attributes_2_libelle')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
context 'when user delete pj' do
|
context 'when user delete pj' do
|
||||||
before do
|
before do
|
||||||
pj = procedure.types_de_piece_justificative.first
|
pj = procedure.types_de_piece_justificative.second
|
||||||
page.find_by_id("delete_type_de_piece_justificative_#{pj.id}").click
|
page.find_by_id("delete_type_de_piece_justificative_#{pj.id}").click
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
end
|
end
|
||||||
scenario 'removes pj from page' do
|
scenario 'removes pj from page' do
|
||||||
within '#liste_piece_justificative' do
|
within '#liste_piece_justificative' do
|
||||||
expect(page).not_to have_css('#procedure_types_de_piece_justificative_attributes_0_libelle')
|
expect(page).not_to have_css('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
||||||
expect(page.body).not_to match(libelle)
|
expect(page.body).not_to match(libelle)
|
||||||
expect(page.body).not_to match(description)
|
expect(page.body).not_to match(description)
|
||||||
end
|
end
|
||||||
|
@ -60,12 +63,12 @@ feature 'add a new type de piece justificative', js: true do
|
||||||
context 'when user change existing type de pj' do
|
context 'when user change existing type de pj' do
|
||||||
let(:new_libelle) { 'mon nouveau libelle' }
|
let(:new_libelle) { 'mon nouveau libelle' }
|
||||||
before do
|
before do
|
||||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_0_libelle').set(new_libelle)
|
page.find_by_id('procedure_types_de_piece_justificative_attributes_1_libelle').set(new_libelle)
|
||||||
page.find_by_id('save').click
|
page.find_by_id('save').click
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
end
|
end
|
||||||
scenario 'saves change in database' do
|
scenario 'saves change in database' do
|
||||||
pj = procedure.types_de_piece_justificative.first
|
pj = procedure.types_de_piece_justificative.second
|
||||||
expect(pj.libelle).to eq(new_libelle)
|
expect(pj.libelle).to eq(new_libelle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -87,60 +87,68 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
||||||
procedure.update(service: create(:service))
|
procedure.update(service: create(:service))
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Add champ, add file, visualize them in procedure preview' do
|
context 'With old PJ' do
|
||||||
fill_in 'procedure_types_de_champ_attributes_0_libelle', with: 'libelle de champ'
|
before do
|
||||||
click_on 'add_type_de_champ'
|
# Create a dummy PJ, because adding PJs is no longer allowed on procedures that
|
||||||
expect(page).to have_current_path(admin_procedure_types_de_champ_path(Procedure.last))
|
# do not already have one
|
||||||
expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle')
|
Procedure.last.types_de_piece_justificative.create(libelle: "dummy PJ")
|
||||||
expect(Procedure.last.types_de_champ.first.libelle).to eq('libelle de champ')
|
|
||||||
|
|
||||||
click_on 'onglet-pieces'
|
|
||||||
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
|
||||||
fill_in 'procedure_types_de_piece_justificative_attributes_0_libelle', with: 'libelle de piece'
|
|
||||||
click_on 'add_piece_justificative'
|
|
||||||
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
|
||||||
expect(page).to have_selector('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
|
||||||
|
|
||||||
preview_window = window_opened_by { click_on 'onglet-preview' }
|
|
||||||
within_window(preview_window) do
|
|
||||||
expect(page).to have_current_path(apercu_procedure_path(Procedure.last))
|
|
||||||
expect(page).to have_field('libelle de champ')
|
|
||||||
expect(page).to have_field('libelle de piece')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'After adding champ and file, check impossibility to publish procedure, add instructeur and make publication' do
|
|
||||||
fill_in 'procedure_types_de_champ_attributes_0_libelle', with: 'libelle de champ'
|
|
||||||
click_on 'add_type_de_champ'
|
|
||||||
click_on 'onglet-pieces'
|
|
||||||
|
|
||||||
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
|
||||||
fill_in 'procedure_types_de_piece_justificative_attributes_0_libelle', with: 'libelle de piece'
|
|
||||||
click_on 'add_piece_justificative'
|
|
||||||
|
|
||||||
click_on 'onglet-infos'
|
|
||||||
expect(page).to have_current_path(admin_procedure_path(Procedure.last))
|
|
||||||
expect(page).to have_selector('#disabled-publish-procedure')
|
|
||||||
expect(page.find_by_id('disabled-publish-procedure')[:disabled]).to eq('true')
|
|
||||||
|
|
||||||
click_on 'onglet-instructeurs'
|
|
||||||
expect(page).to have_current_path(admin_procedure_instructeurs_path(Procedure.last))
|
|
||||||
fill_in 'gestionnaire_email', with: 'gestionnaire@apientreprise.fr'
|
|
||||||
click_on 'add-gestionnaire-email'
|
|
||||||
page.first('.gestionnaire-affectation').click
|
|
||||||
|
|
||||||
click_on 'onglet-infos'
|
|
||||||
expect(page).to have_current_path(admin_procedure_path(Procedure.last))
|
|
||||||
expect(page).to have_selector('#publish-procedure', visible: true)
|
|
||||||
find('#publish-procedure').click
|
|
||||||
|
|
||||||
within '#publish-modal' do
|
|
||||||
expect(page).to have_field('procedure_path', with: 'lien-de-la-procedure')
|
|
||||||
click_on 'publish'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_text('Démarche publiée')
|
scenario 'Add champ, add file, visualize them in procedure preview' do
|
||||||
expect(page).to have_selector('.procedure-lien')
|
fill_in 'procedure_types_de_champ_attributes_0_libelle', with: 'libelle de champ'
|
||||||
|
click_on 'add_type_de_champ'
|
||||||
|
expect(page).to have_current_path(admin_procedure_types_de_champ_path(Procedure.last))
|
||||||
|
expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle')
|
||||||
|
expect(Procedure.last.types_de_champ.first.libelle).to eq('libelle de champ')
|
||||||
|
|
||||||
|
click_on 'onglet-pieces'
|
||||||
|
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
||||||
|
fill_in 'procedure_types_de_piece_justificative_attributes_0_libelle', with: 'libelle de piece'
|
||||||
|
click_on 'add_piece_justificative'
|
||||||
|
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
||||||
|
expect(page).to have_selector('#procedure_types_de_piece_justificative_attributes_1_libelle')
|
||||||
|
|
||||||
|
preview_window = window_opened_by { click_on 'onglet-preview' }
|
||||||
|
within_window(preview_window) do
|
||||||
|
expect(page).to have_current_path(apercu_procedure_path(Procedure.last))
|
||||||
|
expect(page).to have_field('libelle de champ')
|
||||||
|
expect(page).to have_field('libelle de piece')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario 'After adding champ and file, check impossibility to publish procedure, add instructeur and make publication' do
|
||||||
|
fill_in 'procedure_types_de_champ_attributes_0_libelle', with: 'libelle de champ'
|
||||||
|
click_on 'add_type_de_champ'
|
||||||
|
click_on 'onglet-pieces'
|
||||||
|
|
||||||
|
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.last))
|
||||||
|
fill_in 'procedure_types_de_piece_justificative_attributes_0_libelle', with: 'libelle de piece'
|
||||||
|
click_on 'add_piece_justificative'
|
||||||
|
|
||||||
|
click_on 'onglet-infos'
|
||||||
|
expect(page).to have_current_path(admin_procedure_path(Procedure.last))
|
||||||
|
expect(page).to have_selector('#disabled-publish-procedure')
|
||||||
|
expect(page.find_by_id('disabled-publish-procedure')[:disabled]).to eq('true')
|
||||||
|
|
||||||
|
click_on 'onglet-instructeurs'
|
||||||
|
expect(page).to have_current_path(admin_procedure_instructeurs_path(Procedure.last))
|
||||||
|
fill_in 'gestionnaire_email', with: 'gestionnaire@apientreprise.fr'
|
||||||
|
click_on 'add-gestionnaire-email'
|
||||||
|
page.first('.gestionnaire-affectation').click
|
||||||
|
|
||||||
|
click_on 'onglet-infos'
|
||||||
|
expect(page).to have_current_path(admin_procedure_path(Procedure.last))
|
||||||
|
expect(page).to have_selector('#publish-procedure', visible: true)
|
||||||
|
find('#publish-procedure').click
|
||||||
|
|
||||||
|
within '#publish-modal' do
|
||||||
|
expect(page).to have_field('procedure_path', with: 'lien-de-la-procedure')
|
||||||
|
click_on 'publish'
|
||||||
|
end
|
||||||
|
|
||||||
|
expect(page).to have_text('Démarche publiée')
|
||||||
|
expect(page).to have_selector('.procedure-lien')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue