Skip to content

Commit

Permalink
test: remove added tests as they are obsolete now
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed May 15, 2024
1 parent 52fdd83 commit 4bbcbd9
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions packages/eui/src/components/date_picker/date_picker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,45 +65,4 @@ describe('EuiDatePicker', () => {
expect(container.firstChild).toMatchSnapshot();
});
});

describe('calendar week day names', () => {
it('adds long-text sr-only week names when locale is not set', () => {
const selectedDate = moment('2019-07-01T00:00:00-0700');

const { container } = render(
<EuiDatePicker {...requiredProps} inline selected={selectedDate} />
);

expect(
container.getElementsByClassName('react-datepicker__day-name')[0]
.firstChild
).toHaveAttribute('aria-hidden');
expect(
container.getElementsByClassName('react-datepicker__day-name')[0]
.lastChild
).toHaveTextContent('Sunday');
});

it('adds long-text sr-only week names when locale is set', () => {
const selectedDate = moment('2019-07-01T00:00:00-0700');

const { container } = render(
<EuiDatePicker
{...requiredProps}
inline
selected={selectedDate}
locale="en-gb"
/>
);

expect(
container.getElementsByClassName('react-datepicker__day-name')[0]
.firstChild
).toHaveAttribute('aria-hidden');
expect(
container.getElementsByClassName('react-datepicker__day-name')[0]
.lastChild
).toHaveTextContent('Monday');
});
});
});

0 comments on commit 4bbcbd9

Please sign in to comment.