diff --git a/package.json b/package.json index fc27f71b..6adca730 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "e2e": "npx playwright test --project=chromium", "fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix", "format": "npx @biomejs/biome format src/. --write", - "hygen": "HYGEN_TMPLS=gen hygen", "postinstall": "npm run codegen && npx patch-package", "check:code": "npx @biomejs/biome check src --log-kind=compact --verbose", "check:code:fix": "npx @biomejs/biome check . --apply", @@ -137,5 +136,7 @@ "y-prosemirror": "1.2.5", "yjs": "13.6.15" }, - "trustedDependencies": ["@biomejs/biome"] -} + "trustedDependencies": [ + "@biomejs/biome" + ] +} \ No newline at end of file diff --git a/playwright.config.ts b/playwright.config.ts index 250c22cb..e60cb40e 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -37,6 +37,7 @@ export default defineConfig({ use: { ...devices['Desktop Chrome'] }, }, + /* Test against many viewports. { name: 'firefox', use: { ...devices['Desktop Firefox'] }, @@ -46,8 +47,7 @@ export default defineConfig({ name: 'webkit', use: { ...devices['Desktop Safari'] }, }, - - /* Test against mobile viewports. */ + */ // { // name: 'Mobile Chrome', // use: { ...devices['Pixel 5'] }, @@ -68,10 +68,10 @@ export default defineConfig({ // }, ], - /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, + /* Run local dev server before starting the tests */ + //webServer: { + // command: 'npm run dev', + // url: 'https://localhost:3000', + // reuseExistingServer: !process.env.CI, + //}, }) diff --git a/tests/basic-routes.spec.ts b/tests/basic-routes.spec.ts index 3b581ef5..da1b2652 100644 --- a/tests/basic-routes.spec.ts +++ b/tests/basic-routes.spec.ts @@ -1,15 +1,15 @@ import { expect, test } from '@playwright/test' -const baseHost = process.env.BASE_URL +const baseHost = process.env.BASE_HOST || 'https://localhost:3000'; const pagesTitles = { '/': /Дискурс/, - '/feed': /Дискурс/, - '/create': /Дискурс/, - '/about/donate': /Дискурс/, - '/authors': /Дискурс/, - '/topics': /Дискурс/, - '/inbox': /Дискурс/, + '/feed': /Лента/, + '/create': /Выберите тип публикации/, + '/about/help': /Поддержите Дискурс/, + '/authors': /Авторы/, + '/topics': /Темы и сюжеты/, + '/inbox': /Входящие/, } Object.keys(pagesTitles).forEach((res: string) => { diff --git a/tests/basic-routes.test.js b/tests/basic-routes.test.js index 589b5ae0..a3ffcf78 100644 --- a/tests/basic-routes.test.js +++ b/tests/basic-routes.test.js @@ -5,13 +5,13 @@ import { chromium } from 'playwright' // Define the URLs to visit const pagesToVisit = [ - 'http://localhost:3000/', - 'http://localhost:3000/feed', - 'http://localhost:3000/create', - 'http://localhost:3000/about/donate', - 'http://localhost:3000/authors', - 'http://localhost:3000/topics', - 'http://localhost:3000/inbox', + 'https://localhost:3000/', + 'https://localhost:3000/feed', + 'https://localhost:3000/create', + 'https://localhost:3000/about/donate', + 'https://localhost:3000/authors', + 'https://localhost:3000/topics', + 'https://localhost:3000/inbox', ] // Loop through the pages and visit each one