Commit Graph

20346 Commits

Author SHA1 Message Date
Sebastia
72b92b3c30 Merge pull request #5999 from consuldemocracy/dependabot/bundler/acts-as-taggable-on-12.0.0
Bump acts-as-taggable-on from 11.0.0 to 12.0.0
2025-06-11 12:27:22 +02:00
Sebastia
b986038057 Merge pull request #5998 from consuldemocracy/dependabot/bundler/wkhtmltopdf-binary-0.12.6.9
Bump wkhtmltopdf-binary from 0.12.6.8 to 0.12.6.9
2025-06-11 11:52:58 +02:00
Sebastia
c37f77aad7 Merge pull request #5997 from consuldemocracy/dependabot/bundler/exiftool_vendored-13.30.0
Bump exiftool_vendored from 12.97.0 to 13.30.0
2025-06-11 11:35:54 +02:00
Sebastia
fbeae4f95e Merge pull request #5973 from consuldemocracy/dependabot/npm_and_yarn/stylelint-order-7.0.0
Bump stylelint-order from 6.0.4 to 7.0.0
2025-06-10 11:01:37 +02:00
dependabot[bot]
01f92311b7 Bump stylelint-order from 6.0.4 to 7.0.0
Bumps [stylelint-order](https://github.com/hudochenkov/stylelint-order) from 6.0.4 to 7.0.0.
- [Release notes](https://github.com/hudochenkov/stylelint-order/releases)
- [Changelog](https://github.com/hudochenkov/stylelint-order/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hudochenkov/stylelint-order/compare/6.0.4...7.0.0)

---
updated-dependencies:
- dependency-name: stylelint-order
  dependency-version: 7.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-10 08:14:11 +00:00
Sebastia
887ff116ea Merge pull request #6008 from consuldemocracy/dependabot/npm_and_yarn/stylelint-16.20.0
Bump stylelint from 16.14.1 to 16.20.0
2025-06-10 10:12:05 +02:00
Sebastia
7d6bf0589d Merge pull request #5989 from consuldemocracy/nested-documentable-specs
Make nested documentable specs faster
2025-06-10 09:30:18 +02:00
taitus
49facdca7d Refactor nested document tests to simplify contexts and remove duplication 2025-06-09 17:35:40 +02:00
taitus
44cfb9bcc2 Unify lets from documentable and imageable to attachables methods 2025-06-09 17:35:40 +02:00
taitus
472e244103 Move tests related with attached documents from documentable shared specs to nested documentable file
Note that we moved some system tests to component tests, since they don't involve user interaction and can
be fully covered at the component level.
2025-06-09 17:32:41 +02:00
dependabot[bot]
09acb6afd5 Bump stylelint from 16.14.1 to 16.20.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.14.1 to 16.20.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.14.1...16.20.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.20.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 14:21:32 +00:00
dependabot[bot]
8e9c3d366a Bump exiftool_vendored from 12.97.0 to 13.30.0
Bumps [exiftool_vendored](https://github.com/exiftool-rb/exiftool_vendored.rb) from 12.97.0 to 13.30.0.
- [Commits](https://github.com/exiftool-rb/exiftool_vendored.rb/compare/v12.97.0...v13.30.0)

---
updated-dependencies:
- dependency-name: exiftool_vendored
  dependency-version: 13.30.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 14:03:13 +00:00
Sebastia
e786f09964 Merge pull request #5983 from consuldemocracy/dependabot/bundler/autoprefixer-rails-10.4.21.0
Bump autoprefixer-rails from 10.4.19.0 to 10.4.21.0
2025-06-09 16:01:50 +02:00
taitus
7a317ef9c1 Unify and move documentable shared specs to nested documentable file 2025-06-09 15:23:59 +02:00
taitus
11f09c281c Move test for check metadata to nested documentable system 2025-06-09 15:23:59 +02:00
taitus
9e805d95de Unify tests from "Only for edit path" describe in order to reduce duplicated code 2025-06-09 15:23:59 +02:00
taitus
2420f27704 Unify tests when removing documents 2025-06-09 15:23:59 +02:00
Sebastia
a3f3f3658b Merge pull request #5907 from consuldemocracy/dependabot/bundler/omniauth-2.1.3
Bump omniauth from 2.1.2 to 2.1.3
2025-06-09 12:27:34 +02:00
dependabot[bot]
dcfd630928 Bump omniauth from 2.1.2 to 2.1.3
Bumps [omniauth](https://github.com/omniauth/omniauth) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/omniauth/omniauth/releases)
- [Commits](https://github.com/omniauth/omniauth/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: omniauth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 09:57:35 +00:00
dependabot[bot]
b0735cfc92 Bump acts-as-taggable-on from 11.0.0 to 12.0.0
Bumps [acts-as-taggable-on](https://github.com/mbleigh/acts-as-taggable-on) from 11.0.0 to 12.0.0.
- [Release notes](https://github.com/mbleigh/acts-as-taggable-on/releases)
- [Changelog](https://github.com/mbleigh/acts-as-taggable-on/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mbleigh/acts-as-taggable-on/compare/v11.0.0...v12.0.0)

---
updated-dependencies:
- dependency-name: acts-as-taggable-on
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 09:57:24 +00:00
Sebastia
f2dce3ace7 Merge pull request #5864 from consuldemocracy/dependabot/bundler/omniauth-google-oauth2-1.2.1
Bump omniauth-google-oauth2 from 1.2.0 to 1.2.1
2025-06-09 11:55:56 +02:00
dependabot[bot]
c42ed076e8 Bump omniauth-google-oauth2 from 1.2.0 to 1.2.1
Bumps [omniauth-google-oauth2](https://github.com/zquestz/omniauth-google-oauth2) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/zquestz/omniauth-google-oauth2/releases)
- [Changelog](https://github.com/zquestz/omniauth-google-oauth2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zquestz/omniauth-google-oauth2/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: omniauth-google-oauth2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 09:22:59 +00:00
Sebastia
014b32da78 Merge pull request #5991 from consuldemocracy/fix-poster
Fix PDF poster generated in dashboard
2025-06-09 09:40:20 +02:00
taitus
e241e5b961 Unify poster preview with poster PDF styles
Since commit c5103d3025, the styles from application.scss no longer apply
to app/views/dashboard/poster/index.pdf.erb.

To recover the text-center alignment, we add the rule in dashboard.scss.

Note that we also remove text-center from the h2, since it wasn't applied
and there's no need to recover it because it doesn't exist in the preview
either.
2025-06-09 09:20:59 +02:00
taitus
59c61d02cc Remove redundant tests from "Only for edit path" describe
These tests already tested in previous tests.
2025-06-06 17:18:15 +02:00
taitus
28e9832c40 Unify tests in order to remove duplicated code
Note that we are removing a specific "context" that can be replaced
with an "if" in the previous spec.
2025-06-06 17:18:15 +02:00
taitus
b7025a8135 Remove "outdated" comment
Since commit 23682fadd8, we have had the comment:
> # Review
> # Doble check why the file is stored with a name different to empty.pdf

This might be outdated.
2025-06-06 17:18:15 +02:00
taitus
afdf65dec9 Remove unnecessary tests and expectations related with loading-bar
These expectations are already covered by attach_new_file, so they are no longer needed:
>  expect(page).to have_css ".loading-bar.complete"

We can remove the tests:
> "Should update loading bar style after invalid file upload"
because the expectation:
> expect(page).to have_css ".loading-bar.errors"
It is already tested in "Should not update document cached_attachment field after invalid file upload"
2025-06-06 17:18:15 +02:00
taitus
88ba548343 Unify fill_in field in one line 2025-06-06 17:18:15 +02:00
taitus
e6089c2b63 Remove expect_document_has_title method
I think tests are now clearer by using have_field.

Note that I have remove the within ".document-fields" because there is
only one document.
2025-06-06 17:18:15 +02:00
taitus
d7581955f8 Remove duplicated code in imageable and documentable attach file methods 2025-06-06 17:18:15 +02:00
taitus
82296a33e2 Use documentable_attach_new_file method where possible
Use this commit to unify two similar specs.
2025-06-06 17:18:15 +02:00
taitus
64c1c59a7a Unify tests related with shows or hides max documents warning 2025-06-06 17:18:15 +02:00
taitus
a4e7b70227 Unify tests related with shows or hides new document link 2025-06-06 17:18:15 +02:00
taitus
82dac1225c Simplify tests by setting "max documents allowed" to 1
Note that this commit also applies a similar change to the
imageable_attach_new_file method by removing an unnecessary variable.

In order to testing with more than 1 max documents allowed we
keep one test with this value.
2025-06-06 17:18:15 +02:00
taitus
addda0c773 Unify duplicated methods in common_actions folder
Replaced the user with a level_two one in the "Default whole city" test to
bypass the full name requirement, which only applies to unverified users.
2025-06-06 17:07:50 +02:00
taitus
2cc23309b8 Unify attachables methods 2025-06-06 16:00:16 +02:00
taitus
e7c5b03d8c Extract edit proposals from shared nested documentable to system specs
We can remove shared nested documentable file because has not references.
2025-06-06 16:00:15 +02:00
taitus
979171ec45 Extract proposals from shared nested documentable to system specs
Removed the now-unused 'documentable_fill_new_valid_proposal' method
from common actions.

Note that it does not seem necessary to create an administrator with the user, as was
done in the original shared example. Also, as in the previous commit, it appears that
we do not need to set the user as the author when creating the documentable.

Also removed the documentable_redirected_to_resource_show_or_navigate_to method,
which was only used for the :proposal factory but was not necessary.
- In the "Proposal new" case (this commit), after submitting the form we are
redirected to the "created" page, where the link "Not now, go to my proposal"
does not appear. This caused the method to always raise a
Capybara::ElementNotFound and return nil.

Instead, this "created" page already displays a preview of the proposal
and a link to publish it. Since we can verify that the proposal was created
successfully here, no redirection or click is needed.

- In the "Proposal edit" case (next commit), the user is redirected directly
to the proposal's "show" page after update, so again, the method is
unnecessary and has been removed.
2025-06-06 15:56:27 +02:00
taitus
12c1d77061 Extract management_budget_investment from shared nested documentable spec to system specs
Replaced 'login_as' with 'do_login_for' using 'management: management_section?' to
handle login requirements correctly for each context.

Also removed the now-unused 'documentable_fill_new_valid_budget_investment' helper
from common actions.

Note that it does not seem necessary to create an administrator with the user, as was
done in the original shared example. Also, as in the previous commit, it appears that
we do not need to set the user as the author when creating the documentable.

While reviewing this, we also noticed that the create(:administrator, user: user) call
was unnecessarily included in the nested_imageable system spec in commit cdfaec5217 when
the path is a management section. So we use this commit to remove the unnecessary condition.
2025-06-06 15:56:27 +02:00
taitus
b7adf760f6 Extract budget_investment from shared nested documentable spec to system specs
Make 'path', 'submit_button_text' and 'notice_text' dynamic based on
the factory.

Also adjusted the user. Budget investments require a level 2 user but do not need to be
an administrator.

Copied and renamed the 'documentable_fill_new_valid_budget_investment' method from
common actions, and introduced a 'fill_in_required_fields' method to manage multiple factories.

Added the two tests that were conditionally skipped in the shared example using
'unless: documentable_factory_name == "dashboard_action"', but omitted the call to
'documentable_redirected_to_resource_show_or_navigate_to', since it only applies to
proposals.

Note that when we create the documentable seems do not need use the user as author.
2025-06-06 15:56:25 +02:00
taitus
4d8a337e8a Extract dashboard_action from shared nested documentable spec to system specs
Removed 'documentable_path_arguments' and 'management'
parameters because they are not used by dashboard_action.

Also moved and renamed the 'documentable_fill_new_valid_dashboard_action' method
from the common actions helper to this file, since it is now only used here.

Hardcoded 'path', 'submit_button_text', and 'notice_text' for dashboard_action.
These remain fixed for now until dynamic values are required in future commits.
2025-06-06 15:48:46 +02:00
dependabot[bot]
0ae4b693c7 Bump autoprefixer-rails from 10.4.19.0 to 10.4.21.0
Bumps [autoprefixer-rails](https://github.com/ai/autoprefixer-rails) from 10.4.19.0 to 10.4.21.0.
- [Changelog](https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ai/autoprefixer-rails/compare/10.4.19.0...10.4.21.0)

---
updated-dependencies:
- dependency-name: autoprefixer-rails
  dependency-version: 10.4.21.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-04 12:29:25 +00:00
Sebastia
28847bfed0 Merge pull request #5977 from consuldemocracy/dependabot/bundler/faraday-retry-2.3.1
Bump faraday-retry from 2.2.1 to 2.3.1
2025-06-04 14:24:25 +02:00
dependabot[bot]
b02901e0e1 Bump faraday-retry from 2.2.1 to 2.3.1
Bumps [faraday-retry](https://github.com/lostisland/faraday-retry) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/lostisland/faraday-retry/releases)
- [Changelog](https://github.com/lostisland/faraday-retry/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday-retry/compare/v2.2.1...v2.3.1)

---
updated-dependencies:
- dependency-name: faraday-retry
  dependency-version: 2.3.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 15:28:52 +00:00
Sebastia
5651cfa358 Merge pull request #5842 from consuldemocracy/dependabot/bundler/capistrano3-puma-6.0.0
Bump capistrano3-puma from 5.2.0 to 6.0.0
2025-06-02 16:46:19 +02:00
Sebastia
afae59e1d4 Merge pull request #5948 from consuldemocracy/dependabot/bundler/image_processing-1.14.0
Bump image_processing from 1.13.0 to 1.14.0
2025-06-02 16:45:47 +02:00
dependabot[bot]
55acd50232 Bump image_processing from 1.13.0 to 1.14.0
Bumps [image_processing](https://github.com/janko/image_processing) from 1.13.0 to 1.14.0.
- [Changelog](https://github.com/janko/image_processing/blob/master/CHANGELOG.md)
- [Commits](https://github.com/janko/image_processing/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: image_processing
  dependency-version: 1.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 13:54:35 +00:00
Sebastia
8299769957 Merge pull request #5946 from consuldemocracy/dependabot/bundler/redcarpet-3.6.1
Bump redcarpet from 3.6.0 to 3.6.1
2025-06-02 15:51:44 +02:00
taitus
4cd2d2f794 Define Puma log paths for consistency with installer
capistrano3-puma v6.0.0 updated the defaults for puma_access_log and
puma_error_log to use a single file based on puma_env, like:

> set_if_empty :puma_access_log, -> { File.join(shared_path, 'log', "#{fetch(:puma_env)}.log") }
> set_if_empty :puma_error_log, -> { File.join(shared_path, 'log', "#{fetch(:puma_env)}.log") }

However, our installer expect:
- puma_access.log
- puma_error.log

To keep the existing behavior aligned with the installer, we define
the Puma log paths in config/deploy.rb
2025-06-02 15:39:04 +02:00