This filter was added in commit 4285ba4b, it was changed in commit
002d8688, and most of the code from the original commit has disappeared
without a trace (maybe due to a merge conflict?).
This filter could actually be useful if we started using it when users
click on a tag. Since we don't, I'm removing it. We might add it back if
we decide to actually use it.
The following code:
```
<span class="show-for-sr">You're on page</span> 1
```
Will generate an element with `position: absolute`. When reading the
contents, it's not clear whether this element is supposed to be in the
same paragraph or in a different one. Currently Capybara treats it as
if it were part of a different paragraph.
Since this could be the way screen readers read the text, I'm changing
the test to reflect this fact. We might change our minds in the future.
Checking the whole text is tricky because the text has a `<br>` tag, and
now Capybara doesn't normalize whitespace by default anymore.
Here are a couple more options we could use:
```
expect(page).to have_content strip_tags(message.gsub(/\s*<br>\s*/,"\n"))
expect(page).to have_content strip_tags(message), normalize_ws: true
```
But then developers would wonder why we're doing all this, and would
need an extra effort to fully understand the test.
Since the tests are only checking the presence of the flash message,
checking a relevant part of the test is enough, works with any version
of Capybara, and makes the test easy to follow.
With the rack driver, the `ballot_sheet.data` text was being converted
from newline characters to whitespace, while with the JavaScript driver
we get newline characters for `<br>` tags, as we expect.
We're now using the same version we used to generate our Gemfile.lock.
Using the latest bundler we got a deprecation warning, which might turn
into an error in the future:
[DEPRECATED] The `--deployment` flag is deprecated because it relies on
being remembered across bundler invocations, which bundler will no
longer do in future versions.
We could also upgrade to bundler 2.x, but since we're using Ruby 2.4 and
Ruby 2.6 comes with bundler 1.17, we've decided to keep this version.
In this spec, we were doing to request at the same time; one to unselect
an investment and another one to filter the investments. If the second
request finished before the first one, the test failed.
Adding an expectation to check the first request has finished before the
second one starts solves the problem.
Legislation::Proposal is not Globalize model but use CommentableActions and try
detect remote translations. Add new condition to discard Non Globalize models.
This fix is necessary since the following commit was included: c1f3a4ad.
- Validate that locale is a valid locale for RemoteTranslation Client.
- RemoteTranslation can only be created for resources that do not have the requested
language translated
In the admin menu, some links take you to a section, and some links open
a submenu with more links.
When we disable the "multi-open" property of the menu and the active
element is a link which takes you to a section, Foundation will hide it
whenever we click a link which opens a submenu.
The easiest solution is to enable "multi-open" property.
When a current locale is not defined on applicaton.js, datepicker load
the last jquery-ui/i18n/datepicker-xx defined.
Add 'jquery-ui/i18n/datepicker-en-GB' as last "require" to use when a current locale is not defined.