refactor: remove esm module (#1077)

This commit is contained in:
Himself65
2023-02-16 20:43:52 -06:00
committed by GitHub
parent 1d0bf58109
commit 6f6921079e
61 changed files with 518 additions and 349 deletions

View File

@@ -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)', () => {

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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', () => {

View File

@@ -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();

View File

@@ -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();

View File

@@ -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) =>

View File

@@ -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();

View File

@@ -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
View File

@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"noEmit": true
},
"include": ["**.spec.ts", "**.test.ts"]
}