Commit Graph

17301 Commits

Author SHA1 Message Date
Javi Martín
1d9d5ef0cb Don't use the --full-index option in Dockerfile
The --full-index option seemed to be causing caching issues on some
systems.

Since we don't know the reason why this option was added in the first
place, it might have some advantages. However, some people have reported
problems getting "version can no longer be found" errors for some gems
in this step, and documentation for Docker and Rails doesn't mention
this option at all.
2022-04-08 16:13:09 +02:00
Javi Martín
2bf3cb4484 Install Chromium before running bundle in Docker
This way we won't have to reinstall Chromium every time we change the
Gemfile.
2022-04-08 16:13:09 +02:00
Javi Martín
e4bc2c99bf Remove dead link in Dockerfile
The referenced URL is no longer available.
2022-04-08 16:13:09 +02:00
Javi Martín
642b7b2d75 Group Gemfile orders in Dockerfile together
The blank line between each order made it harder to read this file, and
we can use a shortcut to include all gemfiles.
2022-04-08 16:13:09 +02:00
Javi Martín
42104f2a58 Merge pull request #4765 from consul/docker_ignore
Add dockerignore file
2022-04-08 16:10:55 +02:00
Javi Martín
3c5e168eb2 Merge pull request #4803 from consul/pending_tests
Implement or remove pending tests
2022-04-07 16:02:20 +02:00
Javi Martín
b68aa67b1d Remove unnecessary "pending" comment
The test is already working with poll question answers (which are the
only ones using `has_many_images`) as well.
2022-04-07 15:34:10 +02:00
Javi Martín
e637bce3d8 Fix error messages for question answer images
Since we were creating a new answer in the form, we weren't getting the
errors associated to the answer the administrator was trying to create,
and so we were skipping the test.

Using the answer which contains the information about validation errors
fixes the issue and so we don't have to skip the tests.
2022-04-07 15:34:10 +02:00
Javi Martín
fb99d8cb33 Remove obsolete "pending" test
I'd say this feature is actually tested in the "proposal polls specific
validations"; the empty test was probably added by accident in commit
4b8cc85c4.
2022-04-07 15:34:10 +02:00
Javi Martín
c0f71c4c8d Complete proposal notification test
We were finishing the test with the first "visit", so it was doing
nothing (other than potentially generating concurrency issues with other
tests).
2022-04-07 15:34:10 +02:00
Javi Martín
e49c32638d Use if instead of skip to skip tests
This way the tests won't appear as "pending" when running the test
suite, and so we get rid of a lot of noise in the test results. There
doesn't seem to be a way to call `skip` without the test being marked as
"pending".

Note that in the globalizable tests we need to build a factory before
deciding whether an atribute is required or not (particularly for the
milestone factory, since milestone attributes are required depending on
the presence of other attributes). This isn't possible before we're
inside the test, so we can't add an `if:` condition to the test. So
we're adding the condition inside the test instead. A minor
inconvenience of this method is the test still runs even when the
condition is `false`.
2022-04-07 15:34:10 +02:00
Javi Martín
2927174e06 Remove unnecessary locales check in specs
We define the available locales in the test environment, so Spanish is
always available in this environment even if it isn't available in the
production environment.
2022-04-07 15:34:10 +02:00
Javi Martín
702fc84391 Remove pending reportable tests
These tests are obsolete since commit 5ed308c6f.
2022-04-07 15:34:10 +02:00
Javi Martín
c5791278b2 Implement pending card image expectations 2022-04-07 15:34:10 +02:00
Javi Martín
4a8a4eacdd Remove pending tag cloud test for debates
This feature was only enabled for proposals five years ago, and it
hasn't changed since then. The pending test only gets in the way.

Implement. Or implement not. There is no pending.
2022-04-07 15:34:10 +02:00
Javi Martín
6c322e20f4 Implement tests to disable homepage settings
They were marked as pending.

Note Capybara doesn't support finding a button by its `aria-labelledby`
attribute, so we're using the ugly `click_button "Yes"`, like we did in
commit fabe97e50.
2022-04-07 15:34:10 +02:00
Javi Martín
695d5d8765 Enable passing legislation comment test
It was disabled in commit 792b15b22 for unknown reasons.
2022-04-07 15:34:10 +02:00
Javi Martín
6ddb22c1ea Enable test checking alert to finish valuation
It looks like it was disabled because it was failing sometimes for some
reason. I haven't found the reason, though; we're changing the test a
little bit to make it easier to read. Enabling it will let us find out
whether it still fails.
2022-04-07 15:34:09 +02:00
Javi Martín
fa15ac0c3b Implement pending email digest test 2022-04-07 15:34:09 +02:00
Javi Martín
d5867db2cf Remove unnecessary condition to skip tag list test
This file only has tests related to tags; if the model doesn't have
tags, we simply wouldn't include `it_behaves_as` in their tests instead
of including it and then skipping it.
2022-04-07 15:34:09 +02:00
Javi Martín
42b8729cd8 Remove duplicate map test
We were skipping the test, but there's an identical test right below it.
2022-04-07 15:34:09 +02:00
Javi Martín
0eb666db4d Allow commenting on polls as moderator/admin
So it works the same way as everywhere else.
2022-04-07 15:34:09 +02:00
Javi Martín
c77759469d Enable poll comments test
This feature was actually implemented, but the test was checking the
wrong selectors.
2022-04-07 15:34:09 +02:00
Javi Martín
3752fef6bf Remove map page in debates
The map feature was never implemented for debates (only for proposals
and budget investments) and it was crashing for debates because the page
didn't load the geozones. And we don't have a "geozone" field in the
debates form either.

So we're removing the map page alongside its (pending implementation)
tests.
2022-04-07 15:34:07 +02:00
Javi Martín
1f55be7c5e Remove obsolete pending test reference
The test "Sender email" already checks the receiver's name appears in
the copy sent to the sender.
2022-04-07 11:55:35 +02:00
Javi Martín
b89c358d03 Remove comments related to code from Madrid
CONSUL doesn't implement blank votes via web; the comment was based on
the code used in Madrid, which was actually very complex.

And the concept of "all city" was also specific to Madrid. Poll
questions aren't associated to a geozone, so the geozone will depend on
the poll they're associated to.
2022-04-07 11:55:35 +02:00
Javi Martín
1415be607e Merge pull request #4801 from consul/spec_support_custom_folder
Allow to customize tests common action modules
2022-04-06 17:27:30 +02:00
Senén Rodero Rodríguez
c086308b6f Call new common actions modules methods explicitly 2022-04-06 16:06:44 +02:00
Senén Rodero Rodríguez
7b1897b7a7 Remove method duplications as only the latest method loaded is used
The `management` variable gets its value from the caller context.
2022-04-06 16:06:44 +02:00
Senén Rodero Rodríguez
b24e49a6c8 Set a folder where to place custom spec support modules 2022-04-06 16:06:44 +02:00
Javi Martín
0b3c39d437 Add dockerignore file
Note there's a difference between gitignore and dockerignore; in
.gitignore, files without a leading slash match files in every folder,
while in .dockerignore, they match files in the root folder
2022-04-06 14:19:56 +02:00
Javi Martín
f487e9f0d0 Reorganize gitignore file
So it's easier to follow.
2022-04-06 14:19:55 +02:00
Javi Martín
fc70ba3db5 Define paths in gitignore in a consistent way
We used a slash as a prefix in some cases but not in other cases. Now
we're defining files and folders following the gitignore rules: files
starting with a slash are only ignored in the root folder, while files
not starting with it are ignored everywhere.

IMHO it makes sense to ignore all folders named `tmp`, `.bundle`, `log`,
`.DS_Store` or `.ruby-gemset` everywhere in the source code and not only
in the root folder.

We're also adding a trailing slash to all folders for consistency.
2022-04-06 14:19:55 +02:00
Javi Martín
f5152179e1 Remove references to IDEA files in gitignore
We can't cover the files for every editor out there, so we're removing
it in the name of neutrality. Developers using this editor to work with
CONSUL can add the `.idea` to their global gitignore configuration (on
GNU/Linux systems, for instance, the `~/.config/git/ignore` file).
2022-04-06 14:19:55 +02:00
Javi Martín
e98dc0923c Remove reference to beta testers file in gitignore
This feature was removed in commit 1e0ac137bb.
2022-04-06 14:19:55 +02:00
Javi Martín
1a880815dc Remove references to SQLite files in gitignore
We don't use SQLite and we don't support it, so these files shouldn't
exist in the first place.
2022-04-06 14:19:55 +02:00
Senén Rodero Rodríguez
46537cb708 Move nested_imageable helper methods to a new common actions module 2022-04-06 11:15:23 +02:00
Senén Rodero Rodríguez
071311be00 Move nested_documentable helper methods to a new common actions module 2022-04-06 11:15:23 +02:00
Senén Rodero Rodríguez
b26a7528df Move mappable helper methods to a new common actions module
So we can use the same customization technique overriding
the methods we need.
2022-04-06 11:15:23 +02:00
Sebastia
fbc74e8d46 Merge pull request #4800 from consul/checkbox_label_styles
Fix checkbox label styles
2022-04-04 20:09:15 +02:00
taitus
923c2a7ee2 Check labels styles
We are use a display: block style for labels containing check boxes inside
them, and the label has a width of 100%.

This means that clicking on the blank space on the right of the label text
will check/uncheck the checkbox. To avoid this behaviour we modify the
"display" attribute of the labels.

In order to prevent unexpected behaviour in terms_of_service form labels,
we add specific css for this case when define a checkbox within the
.actions class.
2022-04-04 18:55:56 +02:00
Sebastia
e2728f6eb6 Merge pull request #4769 from consul/assigned_heading
Show assigned heading on investment show
2022-03-31 17:20:50 +02:00
Julian Herrero
0c9a46221e Show assigned heading on investment show 2022-03-31 17:00:24 +02:00
taitus
78ab37db09 Reduce duplicated lines on :investments method
This way we also create a new method :investments_with_filters that
we can call to retrieve the investments when we have not a @current_order.
2022-03-31 17:00:23 +02:00
taitus
8945058a65 Extract the load_map logic from the :load_heading callback
Create a new callback for load_map. In this way we simplify a bit the logic of
:load_heading callback and unify the logic of the map loading.
2022-03-31 17:00:23 +02:00
Javi Martín
5675997a7e Merge pull request #4799 from consul/dependabot/bundler/puma-4.3.12
Bump puma from 4.3.11 to 4.3.12
2022-03-31 13:52:38 +02:00
dependabot[bot]
b2294460c4 Bump puma from 4.3.11 to 4.3.12
Bumps [puma](https://github.com/puma/puma) from 4.3.11 to 4.3.12.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v4.3.11...v4.3.12)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-31 13:10:59 +02:00
Senén Rodero
3ecf2feb2e Merge pull request #4601 from consul/budgets_hide_money
Add hide money option for approval budgets
2022-03-30 09:58:29 +02:00
decabeza
50e00a096b Update investments order when hide_money is active 2022-03-29 14:49:30 +02:00
decabeza
8c3b222c98 Manage the render of the price field on valuation investments section 2022-03-29 14:49:29 +02:00