mirror of
https://github.com/hanzoai/react-drawer.git
synced 2026-10-30 18:23:24 +00:00
* Revert back to initial height after visual viewport has been changed * Update tests * Tweak types * Tweak * updat * Fix types * TesT * Revert * Ts * Update ts version again * Revert type updates * Remove workflow temp
21 lines
780 B
TypeScript
21 lines
780 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { ANIMATION_DURATION } from './constants';
|
|
import { openDrawer } from './helpers';
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/nested-drawers');
|
|
});
|
|
|
|
test.describe('Nested tests', () => {
|
|
test('should open and close nested drawer', async ({ page }) => {
|
|
await openDrawer(page);
|
|
await page.getByTestId('nested-trigger').click();
|
|
await page.waitForTimeout(ANIMATION_DURATION);
|
|
await expect(page.getByTestId('nested-content')).toBeVisible();
|
|
await page.getByTestId('nested-close').click();
|
|
await page.waitForTimeout(ANIMATION_DURATION);
|
|
await expect(page.getByTestId('nested-content')).not.toBeVisible();
|
|
await await expect(page.getByTestId('content')).toBeVisible();
|
|
});
|
|
});
|