From 6ebcd6b2f63ea06f2f31b9f2f735fb0e31eb32c3 Mon Sep 17 00:00:00 2001 From: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> Date: Fri, 9 Feb 2024 11:42:10 +0100 Subject: [PATCH] fix: Add missing local_area translation and fix chromedriver (#65) * fix: Add missing local_area translation * fix: Fix chromedriver version * fix: Add headless chrome --- .github/workflows/ci_cd.yml | 4 ---- config/i18n-tasks.yml | 1 + config/locales/en.yml | 3 +++ config/locales/fr.yml | 3 +++ spec/spec_helper.rb | 17 +++++++++++++++++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 038733b8..147c2c6f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -105,8 +105,6 @@ jobs: - run: mkdir -p ./spec/tmp/screenshots name: Create the screenshots folder - uses: nanasess/setup-chromedriver@v2 - with: - chromedriver-version: 119.0.6045.105 - run: bundle exec rake "test:run[exclude, spec/system/**/*_spec.rb, ${{ matrix.slice }}]" name: RSpec - run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH @@ -173,8 +171,6 @@ jobs: - run: mkdir -p ./spec/tmp/screenshots name: Create the screenshots folder - uses: nanasess/setup-chromedriver@v2 - with: - chromedriver-version: 119.0.6045.105 - run: bundle exec rake "test:run[include, spec/system/**/*_spec.rb, ${{ matrix.slice }}]" name: RSpec - run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 5cca4f89..9a48f534 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -161,3 +161,4 @@ ignore_unused: - devise.shared.links.forgot_your_password - devise.shared.links.sign_in_with_france_connect - layouts.decidim.footer.made_with_open_source + - decidim.participatory_processes.show.local_area diff --git a/config/locales/en.yml b/config/locales/en.yml index 2da2555f..452f2249 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -190,6 +190,9 @@ en: text: Qu'est-ce-que FranceConnect ? forgot_password: ok_text: Attention, ce mot de passe est celui de votre compte local et en aucun cas celui du compte que vous utilisez au travers de FranceConnect. Il vous servira uniquement lorsque vous vous connecterez avec votre adresse mail plutôt que via FranceConnect. + participatory_processes: + show: + local_area: Local area proposals: collaborative_drafts: collaborative_draft: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b0d3d027..8494e4d1 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -194,6 +194,9 @@ fr: text: Qu'est-ce-que FranceConnect ? forgot_password: ok_text: Attention, ce mot de passe est celui de votre compte local et en aucun cas celui du compte que vous utilisez au travers de FranceConnect. Il vous servira uniquement lorsque vous vous connecterez avec votre adresse mail plutôt que via FranceConnect. + participatory_processes: + show: + local_area: Espace d'organisation proposals: collaborative_drafts: collaborative_draft: diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index dbedb2cf..b572af1a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,23 @@ Dir.glob("./spec/support/**/*.rb").each { |f| require f } +Capybara.register_driver :headless_chrome do |app| + options = ::Selenium::WebDriver::Chrome::Options.new + options.args << "--headless=new" + options.args << "--no-sandbox" + options.args << if ENV["BIG_SCREEN_SIZE"].present? + "--window-size=1920,3000" + else + "--window-size=1920,1080" + end + options.args << "--ignore-certificate-errors" if ENV["TEST_SSL"] + Capybara::Selenium::Driver.new( + app, + browser: :chrome, + capabilities: [options] + ) +end + RSpec.configure do |config| config.formatter = ENV.fetch("RSPEC_FORMAT", "progress").to_sym config.include EnvironmentVariablesHelper