Skip to content

Commit 5734a08

Browse files
committed
test: fix tests
1 parent 5a59b1f commit 5734a08

2 files changed

Lines changed: 35 additions & 13 deletions

File tree

packages/react/src/calendar/__tests__/__snapshots__/calendar.test.tsx.snap

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@ exports[`<Calendar /> should match the snapshot 1`] = `
99
<div
1010
class="ty-calendar__header"
1111
>
12-
<button
13-
aria-label="Previous"
14-
class="ty-calendar__nav-btn"
15-
type="button"
12+
<div
13+
class="ty-calendar__header-nav"
1614
>
17-
18-
</button>
15+
<button
16+
aria-label="Previous year"
17+
class="ty-calendar__nav-btn"
18+
type="button"
19+
>
20+
«
21+
</button>
22+
<button
23+
aria-label="Previous month"
24+
class="ty-calendar__nav-btn"
25+
type="button"
26+
>
27+
28+
</button>
29+
</div>
1930
<span
2031
class="ty-calendar__title"
2132
>
@@ -26,13 +37,24 @@ exports[`<Calendar /> should match the snapshot 1`] = `
2637
January 2024
2738
</button>
2839
</span>
29-
<button
30-
aria-label="Next"
31-
class="ty-calendar__nav-btn"
32-
type="button"
40+
<div
41+
class="ty-calendar__header-nav"
3342
>
34-
35-
</button>
43+
<button
44+
aria-label="Next month"
45+
class="ty-calendar__nav-btn"
46+
type="button"
47+
>
48+
49+
</button>
50+
<button
51+
aria-label="Next year"
52+
class="ty-calendar__nav-btn"
53+
type="button"
54+
>
55+
»
56+
</button>
57+
</div>
3658
</div>
3759
<div
3860
class="ty-calendar__body"

packages/react/src/calendar/__tests__/calendar.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe('<Calendar />', () => {
115115

116116
it('should render Today button when showToday is true', () => {
117117
const { container } = render(<Calendar showToday value={new Date(2024, 0, 15)} />);
118-
const todayBtn = container.querySelector('.ty-calendar__today-btn');
118+
const todayBtn = container.querySelector('.ty-calendar__today-link');
119119
expect(todayBtn).toBeTruthy();
120120
expect(todayBtn!.textContent).toBe('Today');
121121
});

0 commit comments

Comments
 (0)