chore: standardize tsconfig (#9568)

This commit is contained in:
forehalo
2025-01-08 04:07:56 +00:00
parent 39f4b17315
commit c0ed74dfed
151 changed files with 1041 additions and 1566 deletions

View File

@@ -1,6 +1,4 @@
import path from 'node:path';
import { test } from '@affine-test/kit/playwright';
import { Path, test } from '@affine-test/kit/playwright';
import { openHomePage } from '@affine-test/kit/utils/load-page';
import {
clickNewPageButton,
@@ -16,6 +14,8 @@ import {
import type { Page } from '@playwright/test';
import { expect } from '@playwright/test';
const fixturesDir = Path.dir(import.meta.url).join('../../fixtures');
async function clickPeekViewControl(page: Page, n = 0) {
await page.getByTestId('peek-view-control').nth(n).click();
await page.waitForTimeout(500);
@@ -66,10 +66,7 @@ test('attachment preview should be shown', async ({ page }) => {
await title.click();
await page.keyboard.press('Enter');
await insertAttachment(
page,
path.join(__dirname, '../../fixtures/lorem-ipsum.pdf')
);
await insertAttachment(page, fixturesDir.join('lorem-ipsum.pdf').value);
await page.locator('affine-attachment').first().dblclick();
@@ -107,10 +104,7 @@ test('attachment preview can be expanded', async ({ page }) => {
await title.click();
await page.keyboard.press('Enter');
await insertAttachment(
page,
path.join(__dirname, '../../fixtures/lorem-ipsum.pdf')
);
await insertAttachment(page, fixturesDir.join('lorem-ipsum.pdf').value);
await page.locator('affine-attachment').first().dblclick();
@@ -161,10 +155,7 @@ test('should preview PDF in embed view', async ({ page }) => {
await page.keyboard.press('Enter');
await insertAttachment(
page,
path.join(__dirname, '../../fixtures/lorem-ipsum.pdf')
);
await insertAttachment(page, fixturesDir.join('lorem-ipsum.pdf').value);
const attachment = page.locator('affine-attachment');
await attachment.hover();
@@ -271,10 +262,7 @@ test('should sync name in pdf embed view', async ({ page }) => {
await title.click();
await page.keyboard.press('Enter');
await insertAttachment(
page,
path.join(__dirname, '../../fixtures/lorem-ipsum.pdf')
);
await insertAttachment(page, fixturesDir.join('lorem-ipsum.pdf').value);
const attachment = page.locator('affine-attachment');
await attachment.hover();