Skip to content

Commit 245bd77

Browse files
committed
removed the date formatters, updated testdata json with dateformat yyyy-mm-dd
1 parent 21d1cb4 commit 245bd77

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/test/java/io/github/mfaisalkhatri/pages/RegistrationPage.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ public void fillRegistrationForm (final RegistrationData registrationData) {
3131
firstNameField ().sendKeys (registrationData.getFirstName ());
3232
lastNameField ().clear ();
3333
lastNameField ().sendKeys (registrationData.getLastName ());
34-
35-
Locale defaultLocale = Locale.getDefault ();
36-
DateFormat dateFormat = DateFormat.getDateInstance (DateFormat.SHORT, defaultLocale);
37-
String formattedDate = dateFormat.format (registrationData.getDob ());
38-
dobField ().sendKeys (formattedDate);
39-
34+
dobField ().sendKeys (registrationData.getDob ());
4035
streetField ().clear ();
4136
streetField ().sendKeys (registrationData.getStreet ());
4237
postalCodeField ().clear ();

src/test/resources/testdata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"firstName": "Jason",
55
"lastName": "Langer",
6-
"dob": "01/04/1987",
6+
"dob": "1987-04-01",
77
"street": "11/2, Fort Street",
88
"postalCode": "113445",
99
"city": "California",
@@ -17,7 +17,7 @@
1717
{
1818
"firstName": "Michael",
1919
"lastName": "Justin",
20-
"dob": "23/07/1981",
20+
"dob": "1981-07-23",
2121
"street": "21/4, Dallas Street",
2222
"postalCode": "12976",
2323
"city": "California",

0 commit comments

Comments
 (0)