Skip to content

Commit 2b24029

Browse files
Clean
1 parent 343d89e commit 2b24029

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/x-scheduler/src/event-calendar/EventCalendar.test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ describe('EventCalendar', () => {
148148
const monthView = withinMonthView();
149149

150150
// Weekends should be visible by default
151+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
151152
expect(monthView.getByRole('columnheader', { name: /Sunday/i })).not.to.equal(null);
153+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
152154
expect(monthView.getByRole('columnheader', { name: /Saturday/i })).not.to.equal(null);
153155

154156
// Hide the weekends
@@ -157,7 +159,9 @@ describe('EventCalendar', () => {
157159
await user.keyboard('{Escape}');
158160
await waitFor(() => expect(screen.queryByRole('menu')).to.equal(null));
159161

162+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
160163
expect(monthView.queryByRole('columnheader', { name: /Sunday/i })).to.equal(null);
164+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
161165
expect(monthView.queryByRole('columnheader', { name: /Saturday/i })).to.equal(null);
162166

163167
// Show the weekends again
@@ -166,7 +170,9 @@ describe('EventCalendar', () => {
166170
await user.keyboard('{Escape}');
167171
await waitFor(() => expect(screen.queryByRole('menu')).to.equal(null));
168172

173+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
169174
expect(monthView.getByRole('columnheader', { name: /Sunday/i })).not.to.equal(null);
175+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within month view
170176
expect(monthView.getByRole('columnheader', { name: /Saturday/i })).not.to.equal(null);
171177
});
172178

packages/x-scheduler/src/month-view/MonthView.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ describe('<MonthView />', () => {
310310
);
311311

312312
const toolbar = withinEventCalendarToolbar();
313+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within toolbar
313314
await user.click(toolbar.getByRole('button', { name: /previous month/i }));
314315
expect(onVisibleDateChange.lastCall.firstArg).toEqualDateTime(
315316
adapter.addMonths(adapter.startOfMonth(DEFAULT_TESTING_VISIBLE_DATE), -1),
@@ -329,6 +330,7 @@ describe('<MonthView />', () => {
329330
);
330331

331332
const toolbar = withinEventCalendarToolbar();
333+
// eslint-disable-next-line testing-library/prefer-screen-queries -- scoped query within toolbar
332334
await user.click(toolbar.getByRole('button', { name: /next month/i }));
333335
expect(onVisibleDateChange.lastCall.firstArg).toEqualDateTime(
334336
adapter.addMonths(adapter.startOfMonth(DEFAULT_TESTING_VISIBLE_DATE), 1),

0 commit comments

Comments
 (0)