Skip to content

Commit

Permalink
Update tests after changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jlledom committed Dec 5, 2024
1 parent 587a618 commit 39b8c24
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('select a period', () => {
const expectedHint = `The token will expire on ${targetDate.toLocaleDateString()}`

selectItem(wrapper, targetItem)
const hint = wrapper.find('.pf-c-form-control-expiration-hint').text()
const hint = wrapper.find('.pf-c-form__helper-text').text()

expect(hint).toBe(expectedHint)
})
Expand Down Expand Up @@ -91,6 +91,17 @@ describe('select "Custom"', () => {
})

describe('pick a date from the calendar', () => {
it('should update hint to the correct date', () => {
const wrapper = mountWrapper()

selectItem(wrapper, targetItem)
const targetDate = pickDate(wrapper)
const expectedHint = `The token will expire on ${targetDate.toLocaleDateString()}`
const hint = wrapper.find('.pf-c-form__helper-text').text()

expect(hint).toBe(expectedHint)
})

it('should update hidden input value to the correct timestamp', () => {
const wrapper = mountWrapper()

Expand Down

0 comments on commit 39b8c24

Please sign in to comment.