chore: enable freeze string literals by comment

This commit is contained in:
Colin Darie 2024-04-29 00:17:15 +02:00
parent edeb9a46ec
commit 77fb0553fc
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2262 changed files with 4520 additions and 1 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Attachment::EditComponent, type: :component do
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:types_de_champ_public) { [{ type: :titre_identite }] }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Attachment::MultipleComponent, type: :component do
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:types_de_champ_public) { [{ type: :titre_identite }] }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Attachment::ShowComponent, type: :component do
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:types_de_champ_public) { [{ type: :piece_justificative }] }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Conditions::ChampsConditionsComponent, type: :component do
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Conditions::IneligibiliteRulesComponent, type: :component do
include Logic
let(:procedure) { create(:procedure) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Conditions::RoutingRulesComponent, type: :component do
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Dossiers::BatchAlertComponent, type: :component do
let(:instructeur) { create(:instructeur) }
let(:procedure) { create(:procedure) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Dossiers::BatchOperationComponent, type: :component do
include ActionView::Context
include ActionView::Helpers::FormHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Dossiers::EditFooterComponent, type: :component do
let(:annotation) { false }
let(:component) { Dossiers::EditFooterComponent.new(dossier:, annotation:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Dossiers::ExportLinkComponent, type: :component do
let(:procedure) { create(:procedure) }
let(:groupe_instructeur) { create(:groupe_instructeur, procedure: procedure, instructeurs: [build(:instructeur)]) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe Dossiers::MessageComponent, type: :component do
let(:component) do
described_class.new(

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe EditableChamp::DatetimeComponent, type: :component do
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :datetime, stable_id: 99 }]) }
let(:dossier) { create(:dossier, procedure:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe EditableChamp::EditableChampComponent, type: :component do
let(:procedure) { create(:procedure, types_de_champ_public:, types_de_champ_private:) }
let(:types_de_champ_public) { [] }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe EditableChamp::ExplicationComponent, type: :component do
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:dossier) { create(:dossier, :with_populated_champs, procedure:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe EditableChamp::PieceJustificativeComponent, type: :component do
let(:procedure) { create(:procedure, :published, types_de_champ_public:) }
let(:types_de_champ_public) { [{ type: :piece_justificative }] }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe EditableChamp::SectionComponent, type: :component do
include TreeableConcern
let(:procedure) { create(:procedure, types_de_champ_public:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe GroupeGestionnaire::GroupeGestionnaireTreeStructures::TreeStructureComponent, type: :component do
let(:component) do
described_class.new(

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe TypesDeChampEditor::HeaderSectionComponent, type: :component do
include ActionView::Context
include ActionView::Helpers::FormHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Instructeurs::ColumnFilterComponent, type: :component do
let(:component) { described_class.new(procedure:, procedure_presentation:, statut:, column:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Instructeurs::ColumnPickerComponent, type: :component do
let(:component) { described_class.new(procedure:, procedure_presentation:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe MainNavigation::InstructeurExpertNavigationComponent, type: :component do
let(:component) { described_class.new }
let(:as_instructeur) { true }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Dossiers::MessageComponentPreview < ViewComponent::Preview
def with_default_commentaire
render Dossiers::MessageComponent.new(commentaire: commentaire, connected_user: user)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class TypesDeChampEditor::ChampComponentPreview < ViewComponent::Preview
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class TypesDeChampEditor::ConditionsComponentPreview < ViewComponent::Preview
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::Card::AnnotationsComponent, type: :component do
describe 'render' do
let(:procedure) { create(:procedure, id: 1, types_de_champ_private:, types_de_champ_public:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::Card::ChampsComponent, type: :component do
describe 'render' do
let(:procedure) { create(:procedure, id: 1, types_de_champ_private:, types_de_champ_public:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::Card::ChorusComponent, type: :component do
describe 'render' do
let(:procedure) { create(:procedure) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::Card::IneligibiliteDossierComponent, type: :component do
describe 'render' do
subject do

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::ErrorsSummary, type: :component do
subject { render_inline(described_class.new(procedure:, validation_context:)) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::OneGroupeManagementComponent, type: :component do
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Procedure::PendingRepublishComponent, type: :component do
subject { render_inline(described_class.new(render_if:, procedure: build(:procedure, id: 1))) }
let(:page) { subject }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe SimpleFormatComponent, type: :component do
let(:allow_a) { false }
let(:allow_autolink) { false }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
RSpec.describe TagsButtonListComponent, type: :component do
let(:tags) do
{

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe TypesDeChampEditor::ChampComponent, type: :component do
describe 'render' do
let(:component) { described_class.new(coordinate:, upper_coordinates: []) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe Conditions::ConditionsErrorsComponent, type: :component do
include Logic

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe TypesDeChampEditor::EditorComponent, type: :component do
let(:revision) { procedure.draft_revision }
let(:procedure) { create(:procedure, id: 1, types_de_champ_private:, types_de_champ_public:) }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe TypesDeChampEditor::ChampComponent, type: :component do
describe 'render by type' do
context 'explication' do