-
Notifications
You must be signed in to change notification settings - Fork 72
[terra-time-input] - Mode changing issue on JAWS and SR fixes #2017
Changes from 12 commits
c65eafb
b0958bd
f7dcd76
e073d2e
bc5bcef
4d8461d
d101e79
5f4efa5
87fc28f
30f0b1f
0480b33
c2bcf0c
885cc4d
c40ecea
fb6f7ab
83bc3ca
e10da89
a7adf38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -695,6 +695,10 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const minuteValue = Number($('input[name="terra-time-minute-input"]').getValue()); | ||
const minuteTimeValue = today.minutes(); | ||
const minuteInRange = (minuteTimeValue === minuteValue + 1 || minuteTimeValue === minuteValue); | ||
expect(minuteInRange).toBe(true); | ||
}); | ||
|
||
it('should set date to today in the second input', () => { | ||
|
@@ -709,10 +713,6 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const secondsValue = Number($('input[name="terra-time-second-input"]').getValue()); | ||
const secondsTimeValue = today.seconds(); | ||
const secondsInRange = (secondsTimeValue === secondsValue + 1 || secondsTimeValue === secondsValue); | ||
expect(secondsInRange).toBe(true); | ||
}); | ||
}); | ||
|
||
|
@@ -769,10 +769,6 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const secondsValue = Number($('input[name="terra-time-second-input"]').getValue()); | ||
const secondsTimeValue = today.seconds(); | ||
const secondsInRange = (secondsTimeValue === secondsValue + 1 || secondsTimeValue === secondsValue); | ||
expect(secondsInRange).toBe(true); | ||
}); | ||
}); | ||
|
||
|
@@ -817,17 +813,13 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const secondsValue = Number($('input[name="terra-time-second-input"]').getValue()); | ||
const secondsTimeValue = today.seconds(); | ||
const secondsInRange = (secondsTimeValue === secondsValue + 1 || secondsTimeValue === secondsValue); | ||
expect(secondsInRange).toBe(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why has this been removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
}); | ||
}); | ||
}); | ||
|
||
describe('-', () => { | ||
describe('if blank date', () => { | ||
it('should set date to today and now minus 1 minute in the hour input', () => { | ||
it('should set date to today and now minus 1 hour in the hour input', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/date-time-picker/date-time-picker-default'); | ||
browser.refresh(); | ||
$('input[name="terra-time-hour-input"]').click(); | ||
|
@@ -863,13 +855,13 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect(minuteInRange).toBe(true); | ||
}); | ||
|
||
it('should set date to today and now minus 1 minute in the second input', () => { | ||
it('should set date to today and now minus 1 second in the second input', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/date-time-picker/date-time-picker-with-seconds'); | ||
browser.refresh(); | ||
$('input[name="terra-time-second-input"]').click(); | ||
browser.keys('-'); | ||
|
||
const today = moment.utc().subtract(1, 'minutes'); | ||
const today = moment.utc().subtract(1, 'seconds'); | ||
expect($('input[name="terra-date-year-input"]')).toHaveValue(today.year().toString()); | ||
expect($('input[name="terra-date-month-input"]')).toHaveValue((`0${(today.month() + 1)}`).slice(-2)); | ||
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
|
@@ -1150,7 +1142,7 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
|
||
describe('+', () => { | ||
describe('if blank date', () => { | ||
it('should set date to today and now plus 1 minute in the hour input', () => { | ||
it('should set date to today and now plus 1 hour in the hour input', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/date-time-picker/date-time-picker-default'); | ||
browser.refresh(); | ||
$('input[name="terra-time-hour-input"]').click(); | ||
|
@@ -1186,22 +1178,18 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect(minuteInRange).toBe(true); | ||
}); | ||
|
||
it('should set date to today and now plus 1 minute in the second input', () => { | ||
it('should set date to today and now plus 1 seconds in the second input', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/date-time-picker/date-time-picker-with-seconds'); | ||
browser.refresh(); | ||
$('input[name="terra-time-second-input"]').click(); | ||
browser.keys('+'); | ||
|
||
const today = moment.utc().add(1, 'minutes'); | ||
const today = moment.utc().add(1, 'seconds'); | ||
expect($('input[name="terra-date-year-input"]')).toHaveValue(today.year().toString()); | ||
expect($('input[name="terra-date-month-input"]')).toHaveValue((`0${(today.month() + 1)}`).slice(-2)); | ||
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const secondsValue = Number($('input[name="terra-time-second-input"]').getValue()); | ||
const secondsTimeValue = today.seconds(); | ||
const secondsInRange = (secondsTimeValue === secondsValue + 1 || secondsTimeValue === secondsValue); | ||
expect(secondsInRange).toBe(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test says that you are testing +1 sec to the seconds but I cannot see the validation for seconds field here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
}); | ||
}); | ||
|
||
|
@@ -1246,7 +1234,7 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
expect(minuteInRange).toBe(true); | ||
}); | ||
|
||
it('should set date to today and now plus 1 minute in the second input', () => { | ||
it('should set date to today and now plus 1 second in the second input', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/date-time-picker/date-time-picker-with-seconds'); | ||
browser.refresh(); | ||
$('input[name="terra-date-year-input"]').click(); | ||
|
@@ -1256,16 +1244,12 @@ Terra.describeViewports('DateTimePicker', ['large'], () => { | |
$('input[name="terra-time-second-input"]').click(); | ||
browser.keys('+'); | ||
|
||
const today = moment.utc().add(1, 'minutes'); | ||
const today = moment.utc().add(1, 'seconds'); | ||
expect($('input[name="terra-date-year-input"]')).toHaveValue(today.year().toString()); | ||
expect($('input[name="terra-date-month-input"]')).toHaveValue((`0${(today.month() + 1)}`).slice(-2)); | ||
expect($('input[name="terra-date-day-input"]')).toHaveValue((`0${today.date()}`).slice(-2)); | ||
expect($('input[name="terra-time-hour-input"]')).toHaveValue((`0${today.hour()}`).slice(-2)); | ||
expect($('input[name="terra-time-minute-input"]')).toHaveValue((`0${today.minute()}`).slice(-2)); | ||
const secondsValue = Number($('input[name="terra-time-second-input"]').getValue()); | ||
const secondsTimeValue = today.seconds(); | ||
const secondsInRange = (secondsTimeValue === secondsValue + 1 || secondsTimeValue === secondsValue); | ||
expect(secondsInRange).toBe(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test says that you are testing +1 sec to the seconds but you have removed seconds field validation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
}); | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated