mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor: remove esm module (#1077)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { clickPageMoreActions } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { clickPageMoreActions } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Change page mode(Paper or Edgeless)', () => {
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const pkgPath = path.join(__dirname, '../apps/web/package.json');
|
||||
const record = fs.readFileSync(pkgPath, 'utf8');
|
||||
const temp = JSON.parse(record);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage } from './libs/page-logic';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first export page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first favorite and cancel favorite page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first favorite items ui', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('local first new page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('local first new page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first delete page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first delete page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { newPage } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first trash page', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { createWorkspace } from './libs/workspace-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { createWorkspace } from './libs/workspace-logic';
|
||||
loadPage();
|
||||
|
||||
test.describe('Local first workspace list', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { expect, type Page } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { withCtrlOrMeta } from './libs/keyboard.js';
|
||||
import { newPage } from './libs/page-logic.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
import { withCtrlOrMeta } from './libs/keyboard';
|
||||
import { newPage } from './libs/page-logic';
|
||||
loadPage();
|
||||
|
||||
const openQuickSearchByShortcut = async (page: Page) =>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from './libs/playwright.js';
|
||||
import { loadPage } from './libs/load-page.js';
|
||||
import { test } from './libs/playwright';
|
||||
import { loadPage } from './libs/load-page';
|
||||
|
||||
loadPage();
|
||||
|
||||
|
||||
8
tests/tsconfig.json
Normal file
8
tests/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["**.spec.ts", "**.test.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user