|
@@ -66,7 +66,7 @@ describe('Carousel', function () {
|
|
|
const rightButton = screen.getByRole('button', {name: 'Scroll right'});
|
|
|
expect(screen.queryByRole('button', {name: 'Scroll left'})).not.toBeInTheDocument();
|
|
|
|
|
|
- // Test scroll into view, the 2nd element should have it's 'scrollIntoView' called
|
|
|
+ // Test scroll into view, the 2nd element should have its 'scrollIntoView' called
|
|
|
elements[1].scrollIntoView = jest.fn();
|
|
|
await userEvent.click(rightButton);
|
|
|
expect(elements[1].scrollIntoView).toHaveBeenCalled();
|
|
@@ -99,7 +99,7 @@ describe('Carousel', function () {
|
|
|
const leftButton = screen.getByRole('button', {name: 'Scroll left'});
|
|
|
expect(screen.queryByRole('button', {name: 'Scroll right'})).not.toBeInTheDocument();
|
|
|
|
|
|
- // Test scroll into view, the 1st element should have it's 'scrollIntoView' called
|
|
|
+ // Test scroll into view, the 1st element should have its 'scrollIntoView' called
|
|
|
elements[0].scrollIntoView = jest.fn();
|
|
|
await userEvent.click(leftButton);
|
|
|
expect(elements[0].scrollIntoView).toHaveBeenCalled();
|
|
@@ -132,7 +132,7 @@ describe('Carousel', function () {
|
|
|
const rightButton = screen.getByRole('button', {name: 'Scroll right'});
|
|
|
expect(screen.queryByRole('button', {name: 'Scroll left'})).not.toBeInTheDocument();
|
|
|
|
|
|
- // Test scroll into view, the 2nd element should have it's 'scrollIntoView' called
|
|
|
+ // Test scroll into view, the 2nd element should have its 'scrollIntoView' called
|
|
|
elements[2].scrollIntoView = jest.fn();
|
|
|
await userEvent.click(rightButton);
|
|
|
expect(elements[2].scrollIntoView).toHaveBeenCalled();
|