3420 [Flaky Spec] Fix date format in spec when single-digit day of month #3430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Changelog Category: Fixed