Download react-slick/playwright-tests/regression/fix-1930/fix-1930.spec.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 934 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-slick/playwright-tests/regression/fix-1930/fix-1930.spec.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-slick/playwright-tests/regression/fix-1930/fix-1930.spec.tsx
-
curl -L -o fix-1930.spec.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-slick/playwright-tests/regression/fix-1930/fix-1930.spec.tsx
934 Bytes
| // Test fix of #1930: Extra height of slider in vertical mode when number of slides is less than or equal to slidesToShow | |
| import { test, expect } from "@playwright/experimental-ct-react"; | |
| import { VerticalModeFinite, VerticalModeInfinite } from "./fix-1930.story"; | |
| test.use({ viewport: { width: 500, height: 500 } }); | |
| test("height check in vertical mode when slides < slidesToShow and finite", async ({ | |
| mount | |
| }) => { | |
| const component = await mount(<VerticalModeFinite />); | |
| const track = component.locator(".slick-track").first(); | |
| const box = await track.boundingBox(); | |
| await expect(box.height).toEqual(200); | |
| }); | |
| test("height check in vertical mode when slides < slidesToShow and infinite", async ({ | |
| mount | |
| }) => { | |
| const component = await mount(<VerticalModeInfinite />); | |
| const track = component.locator(".slick-track").first(); | |
| const box = await track.boundingBox(); | |
| await expect(box.height).toEqual(200); | |
| }); | |