behat date step causes whitespace error in single digit dates

Bug #1714408 reported by Rebecca Blundell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Rebecca Blundell

Bug Description

There is a bug in the patch for Bug 1711277 - Add a step to check dates.
If the date is a single digit, e.g. today being 1 September, the date comes out as " 1 September 2017", when "01 September 2017" is what is being looked for on the page. This can be fixed by trimming the result.

I've also noticed that my i_should_see_date() function never runs the else statement as I'm passing in a default. I should clean this up, either by passing in null as a default format or by removing the else altogether.

Tags: behat
Changed in mahara:
status: New → In Progress
assignee: nobody → Rebecca Blundell (rjb-dev)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7968

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7968
Committed: https://git.mahara.org/mahara/mahara/commit/f1182d0b6d5d3b74bcba4d30f80e7c43dc0e5f86
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit f1182d0b6d5d3b74bcba4d30f80e7c43dc0e5f86
Author: Rebecca Blundell <email address hidden>
Date: Fri Sep 1 15:31:02 2017 +1200

Bug 1714408: Fix whitespace error in date format

Remove default date format and require it to be passed in.
Reinstate if statement which now runs if the date format is not found
in the langconfig.php file.

Also fix format in the modified_date.feature file so the test works
for single digit dates.

Change-Id: I532e8db518a34e803c47d9192fd9cc74231d3999

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 17.10.0
importance: Undecided → High
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.