Commit Graph

12 Commits

Author SHA1 Message Date
Javi Martín
96a0aa2a88 Add and apply LineContinuationSpacing rubocop rule
So now we're consistent when separating multiline strings.
2023-08-18 14:56:17 +02:00
Javi Martín
054aef3854 Change URLs to use the new domain 2023-07-12 16:05:33 +02:00
karim-semmoud
3a623c070f Add tests for budget images with brackets / quotes 2023-06-27 13:57:51 +02:00
Javi Martín
7154228fbb Move budget map icon tests back to system specs
These tests don't work without JavaScript. They were passing because the
`within` method always passes in component tests.

This reverts most of commit 822140a14.
2021-10-18 13:51:32 +02:00
Javi Martín
d7f26f012d Fix test checking link in budget header
The test was passing because we were using `within`, but actually the
`have_css` method doesn't support the `href:` argument.
2021-10-18 13:51:32 +02:00
Javi Martín
57fcdc402d Use page.find instead of within in component tests
In component tests, the `within` method is actually an alias to RSpec's
`be_within` matcher, which is used to test numeric ranges. That meant
the tests always passed, even when there were bugs on the page.

In order to use `within` in component tests, we have to use
`page.within`. However, that also fails, since there's no such method
for `Capybara::Node::Simple'` objects, which are used in component
tests.

So we're using `page.find` instead.

See also pull request 945 in https://github.com/github/view_component
2021-10-18 13:51:32 +02:00
Javi Martín
e97c375063 Add method to stub current_user in component tests
We're choosing `sign_in` instead of `login_as` because IMHO component
tests are more similar to controller tests than they are to system
tests.
2021-09-08 12:39:36 +02:00
Javi Martín
4cbf945228 Infer type for component specs automatically 2021-09-08 12:39:36 +02:00
decabeza
d78f2e03ad Render link to budget header
- Allow to define a link (text and url) on budget form for render on the budget
header.
- Improve styles

Co-authored-by: Senén Rodero Rodríguez <senenrodero@gmail.com>
2021-06-09 19:16:55 +02:00
decabeza
090f1bcddb Not showing the phase description in the budget header
This description of the current phase is already being displayed on the same page
in the section "Participatory budgets phases"
2021-06-09 16:03:33 +02:00
decabeza
4adb7236dc Add title to budget header 2021-06-09 16:03:33 +02:00
Senén Rodero Rodríguez
822140a147 Move systems specs to budget component
As they are much faster.
2021-06-09 16:03:32 +02:00