Skip to content

Commit

Permalink
Fix selectors in test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-medvedev-vk committed Oct 29, 2024
1 parent d1da0e4 commit 95c25a4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/vkui/src/components/Gallery/Gallery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@ describe('Gallery', () => {
} = mockedData;

checkActiveSlide(container, 1);
expect(Array.from(container.getElementsByClassName(styles.arrow))).toHaveLength(1);
mockedData.component.debug();
expect(Array.from(container.getElementsByClassName(styles['BaseGallery__arrow']))).toHaveLength(
1,
);

simulateDrag(mockedData.viewPort, [150, 0]);

Expand All @@ -684,7 +687,9 @@ describe('Gallery', () => {

rerender({ slideIndex: 2 });

expect(Array.from(container.getElementsByClassName(styles.arrow))).toHaveLength(1);
expect(Array.from(container.getElementsByClassName(styles['BaseGallery__arrow']))).toHaveLength(
1,
);

simulateDrag(mockedData.viewPort, [150, 0]);

Expand All @@ -699,7 +704,9 @@ describe('Gallery', () => {

rerender({ slideIndex: 2 });

expect(Array.from(container.getElementsByClassName(styles.arrow))).toHaveLength(0);
expect(Array.from(container.getElementsByClassName(styles['BaseGallery__arrow']))).toHaveLength(
0,
);

simulateDrag(mockedData.viewPort, [150, 0]);

Expand Down

0 comments on commit 95c25a4

Please sign in to comment.