Commit Graph

8 Commits

Author SHA1 Message Date
Javi Martín
0cec581ec0 Add and apply Capybara/RSpec/HaveSelector rule
This rule was added in rubocop-capybara 2.19.0. We were following it
about 85% of the time.

Now we won't have to check both have_css and have_selector when
searching the code.
2023-11-08 14:18:16 +01:00
taitus
612872ac7a Define and apply matcher :be_rendered
Add this changes to make components specs clear
2021-11-04 10:49:36 +01:00
taitus
2b35144540 Unify expectations on spec components folder
In this PR (https://github.com/consul/consul/pull/4683) a new syntax was introduced
in the component specs to check that the component was not rendering.
It seems interesting to add this syntax to the rest of the cases and thus unify the way
we check that a component is not rendering.
2021-11-04 10:49:36 +01:00
Javi Martín
9247a31e85 Stub current_user in all component tests
The `sign_in(nil)` method was a bit hard to understand IMHO. After all,
in controller and system tests we don't have to specify no user is
signed in; that's the default behavior.

So we're making it the default behavior for component tests as well.
2021-09-08 12:39:36 +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
taitus
c6b23bb6fa Render investments list in all budgets types
We make this change to unify the index/show budget pages.

This way both single and multiple budgets will render the investments
list component.
2021-08-09 20:07:51 +02:00
decabeza
b23fe300f5 Add supports info section on budgets index page 2021-06-14 13:48:44 +02:00