feat(core): use contain strict optimizing performance (#8553)

This commit is contained in:
EYHN
2024-10-21 06:42:07 +00:00
parent a25bb0d80f
commit 42b3e069f9
9 changed files with 17 additions and 17 deletions

View File

@@ -57,7 +57,7 @@ test('Drag resizer can resize sidebar', async ({ page }) => {
});
await page.mouse.up();
const boundingBox = await page.getByTestId('app-sidebar').boundingBox();
expect(boundingBox?.width).toBe(399);
expect(Math.floor(boundingBox?.width ?? 0)).toBe(399);
});
test('Sidebar in between sm & md breakpoint', async ({ page }) => {

View File

@@ -1,14 +0,0 @@
import { test } from '@affine-test/kit/playwright';
import { openHomePage } from '@affine-test/kit/utils/load-page';
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
import { expect } from '@playwright/test';
test('Create subpage', async ({ page }) => {
await openHomePage(page);
await waitForEditorLoad(page);
await page
.locator('[data-testid=app-sidebar-arrow-button-collapse][data-show=true]')
.click();
const sliderBarArea = page.getByTestId('sliderBar-inner');
await expect(sliderBarArea).not.toBeInViewport();
});