Skip to content

Commit

Permalink
Merge branch 'corel' into corel-270-disable-non-active-release-add
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanl17 authored Nov 27, 2024
2 parents 0e4e00b + 170fdd3 commit 3ed971f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,17 @@ describe('ReleasesOverview', () => {
const getCalendar = () => getByDataUi(document.body, 'Calendar')

it('has today in bold to signify that there is a release', () => {
const todayTile = within(getCalendar()).getByText(TODAY.getDate())
expect(todayTile.parentNode).toHaveStyle('font-weight: 700')
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByTestId(
'day-tile-today',
)
expect(todayTile.firstChild).toHaveStyle('font-weight: 700')
})

describe('selecting a release date', () => {
beforeEach(() => {
const todayTile = within(getCalendar()).getByText(TODAY.getDate())
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByTestId(
'day-tile-today',
)
fireEvent.click(todayTile)
})

Expand Down Expand Up @@ -354,15 +358,15 @@ describe('ReleasesOverview', () => {
})

it('shows today as having no releases', () => {
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByText(
TODAY.getDate(),
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByTestId(
'day-tile-today',
)
expect(todayTile.parentNode).not.toHaveStyle('font-weight: 700')
})

it('shows no releases when filtered by today', () => {
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByText(
TODAY.getDate(),
const todayTile = within(getByDataUi(document.body, 'Calendar')).getByTestId(
'day-tile-today',
)
fireEvent.click(todayTile)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function CalendarDay(props: CalendarDayProps) {
__unstable_focusRing
data-weekday
data-focused={focused ? 'true' : ''}
data-testid={isToday ? 'day-tile-today' : `day-tile-${date.getDate()}-${date.getMonth()}`}
role="button"
tabIndex={-1}
onClick={handleClick}
Expand Down

0 comments on commit 3ed971f

Please sign in to comment.