AFFiNE/tests/parallels/layout.spec.ts
2023-03-23 17:15:40 -05:00

24 lines
818 B
TypeScript

import { expect } from '@playwright/test';
import { openHomePage } from '../libs/load-page';
import { test } from '../libs/playwright';
test.describe('Layout ui', () => {
test('Collapse Sidebar', async ({ page }) => {
await openHomePage(page);
await page.getByTestId('sliderBar-arrowButton-collapse').click();
const sliderBarArea = page.getByTestId('sliderBar');
await expect(sliderBarArea).not.toBeVisible();
});
test('Expand Sidebar', async ({ page }) => {
await openHomePage(page);
await page.getByTestId('sliderBar-arrowButton-collapse').click();
const sliderBarArea = page.getByTestId('sliderBar');
await expect(sliderBarArea).not.toBeVisible();
await page.getByTestId('sliderBar-arrowButton-expand').click();
await expect(sliderBarArea).toBeVisible();
});
});