Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3420 [Flaky Spec] Fix date format in spec when single-digit day of month #3430

Conversation

kristinalim
Copy link
Member

Fix date format in spec when single-digit day of month.

What? Why?

Closes #3420

Affected spec was failing if the current day of month has only one digit. The test could not find the date in the import date filter.

Before this commit, the resulting string in the test replaced "  " (2 spaces) with " " (1 space), so "February  2" was being changed to "February 2". The import date filter however uses 2 spaces in this case, even if the browser shows only 1 (HTML inline text renders multiple consecutive spaces as just one).

Selection of the date in the filter is done in select_select2_result (defined in Spree) with :contains() in selector used by jQuery.

What should we test?

Semaphore build should be green.

In the long term, these specs should also not fail.

Release notes

  • Address intermittently failing feature tests

Changelog Category: Fixed

This was failing if the current day of month only has one digit. The
test could not find the date in the import date filter.

Before this commit, the resulting string in the test replaced "  " with
" ", so "February  2" was being changed to "February 2". The import date
filter however uses two spaces in this case, even if the browser shows
only one (HTML inline text renders two spaces as just one).
@kristinalim kristinalim self-assigned this Feb 1, 2019
@luisramos0 luisramos0 merged commit a0b5509 into openfoodfoundation:master Feb 3, 2019
@luisramos0
Copy link
Contributor

I am merging this to master (not a power I usually use) so we can start the week with a green build!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants