e2e tests fine
This commit is contained in:
parent
cada98f135
commit
d249cb050d
|
@ -13,7 +13,6 @@
|
||||||
"e2e": "npx playwright test --project=chromium",
|
"e2e": "npx playwright test --project=chromium",
|
||||||
"fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix",
|
"fix": "npm run check:code:fix && stylelint **/*.{scss,css} --fix",
|
||||||
"format": "npx @biomejs/biome format src/. --write",
|
"format": "npx @biomejs/biome format src/. --write",
|
||||||
"hygen": "HYGEN_TMPLS=gen hygen",
|
|
||||||
"postinstall": "npm run codegen && npx patch-package",
|
"postinstall": "npm run codegen && npx patch-package",
|
||||||
"check:code": "npx @biomejs/biome check src --log-kind=compact --verbose",
|
"check:code": "npx @biomejs/biome check src --log-kind=compact --verbose",
|
||||||
"check:code:fix": "npx @biomejs/biome check . --apply",
|
"check:code:fix": "npx @biomejs/biome check . --apply",
|
||||||
|
@ -137,5 +136,7 @@
|
||||||
"y-prosemirror": "1.2.5",
|
"y-prosemirror": "1.2.5",
|
||||||
"yjs": "13.6.15"
|
"yjs": "13.6.15"
|
||||||
},
|
},
|
||||||
"trustedDependencies": ["@biomejs/biome"]
|
"trustedDependencies": [
|
||||||
|
"@biomejs/biome"
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -37,6 +37,7 @@ export default defineConfig({
|
||||||
use: { ...devices['Desktop Chrome'] },
|
use: { ...devices['Desktop Chrome'] },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* Test against many viewports.
|
||||||
{
|
{
|
||||||
name: 'firefox',
|
name: 'firefox',
|
||||||
use: { ...devices['Desktop Firefox'] },
|
use: { ...devices['Desktop Firefox'] },
|
||||||
|
@ -46,8 +47,7 @@ export default defineConfig({
|
||||||
name: 'webkit',
|
name: 'webkit',
|
||||||
use: { ...devices['Desktop Safari'] },
|
use: { ...devices['Desktop Safari'] },
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
/* Test against mobile viewports. */
|
|
||||||
// {
|
// {
|
||||||
// name: 'Mobile Chrome',
|
// name: 'Mobile Chrome',
|
||||||
// use: { ...devices['Pixel 5'] },
|
// use: { ...devices['Pixel 5'] },
|
||||||
|
@ -68,10 +68,10 @@ export default defineConfig({
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
|
|
||||||
/* Run your local dev server before starting the tests */
|
/* Run local dev server before starting the tests */
|
||||||
// webServer: {
|
//webServer: {
|
||||||
// command: 'npm run start',
|
// command: 'npm run dev',
|
||||||
// url: 'http://127.0.0.1:3000',
|
// url: 'https://localhost:3000',
|
||||||
// reuseExistingServer: !process.env.CI,
|
// reuseExistingServer: !process.env.CI,
|
||||||
// },
|
//},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import { expect, test } from '@playwright/test'
|
import { expect, test } from '@playwright/test'
|
||||||
|
|
||||||
const baseHost = process.env.BASE_URL
|
const baseHost = process.env.BASE_HOST || 'https://localhost:3000';
|
||||||
|
|
||||||
const pagesTitles = {
|
const pagesTitles = {
|
||||||
'/': /Дискурс/,
|
'/': /Дискурс/,
|
||||||
'/feed': /Дискурс/,
|
'/feed': /Лента/,
|
||||||
'/create': /Дискурс/,
|
'/create': /Выберите тип публикации/,
|
||||||
'/about/donate': /Дискурс/,
|
'/about/help': /Поддержите Дискурс/,
|
||||||
'/authors': /Дискурс/,
|
'/authors': /Авторы/,
|
||||||
'/topics': /Дискурс/,
|
'/topics': /Темы и сюжеты/,
|
||||||
'/inbox': /Дискурс/,
|
'/inbox': /Входящие/,
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(pagesTitles).forEach((res: string) => {
|
Object.keys(pagesTitles).forEach((res: string) => {
|
||||||
|
|
|
@ -5,13 +5,13 @@ import { chromium } from 'playwright'
|
||||||
|
|
||||||
// Define the URLs to visit
|
// Define the URLs to visit
|
||||||
const pagesToVisit = [
|
const pagesToVisit = [
|
||||||
'http://localhost:3000/',
|
'https://localhost:3000/',
|
||||||
'http://localhost:3000/feed',
|
'https://localhost:3000/feed',
|
||||||
'http://localhost:3000/create',
|
'https://localhost:3000/create',
|
||||||
'http://localhost:3000/about/donate',
|
'https://localhost:3000/about/donate',
|
||||||
'http://localhost:3000/authors',
|
'https://localhost:3000/authors',
|
||||||
'http://localhost:3000/topics',
|
'https://localhost:3000/topics',
|
||||||
'http://localhost:3000/inbox',
|
'https://localhost:3000/inbox',
|
||||||
]
|
]
|
||||||
|
|
||||||
// Loop through the pages and visit each one
|
// Loop through the pages and visit each one
|
||||||
|
|
Loading…
Reference in New Issue
Block a user