mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 21:09:03 +08:00
feat: playwright is configured
This commit is contained in:
parent
dd0047da07
commit
b2fc4776b7
@ -15,7 +15,7 @@
|
||||
"postinstall": "yarn husky:configure",
|
||||
"husky:configure": "cd .. && husky install frontend/.husky",
|
||||
"playwright": "playwright test --config=./playwright.config.ts",
|
||||
"playwright:local:debug": "PWDEBUG=1 yarn playwright"
|
||||
"playwright:local:debug": "PWDEBUG=console yarn playwright"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { devices, PlaywrightTestConfig } from '@playwright/test';
|
||||
import { PlaywrightTestConfig } from '@playwright/test';
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
forbidOnly: !!process.env.CI,
|
||||
@ -7,24 +7,12 @@ const config: PlaywrightTestConfig = {
|
||||
name: 'Signoz',
|
||||
testDir: './tests',
|
||||
use: {
|
||||
trace: 'on-first-retry',
|
||||
trace: 'retain-on-failure',
|
||||
baseURL: process.env.FRONTEND_API_ENDPOINT,
|
||||
},
|
||||
updateSnapshots: 'all',
|
||||
fullyParallel: false,
|
||||
quiet: true,
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
use: { ...devices['Desktop Firefox'] },
|
||||
},
|
||||
{
|
||||
name: 'webkit',
|
||||
use: { ...devices['Desktop Safari'] },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
17
frontend/tests/signup/index.spec.ts
Normal file
17
frontend/tests/signup/index.spec.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import ROUTES from 'constants/routes';
|
||||
|
||||
test('Login Page', async ({ page, baseURL }) => {
|
||||
const loginPage = `${baseURL}${ROUTES.LOGIN}`;
|
||||
|
||||
await page.goto(loginPage, {
|
||||
waitUntil: 'networkidle',
|
||||
});
|
||||
|
||||
const signup = 'Monitor your applications. Find what is causing issues.';
|
||||
|
||||
// Click text=Monitor your applications. Find what is causing issues.
|
||||
const el = page.locator(`text=${signup}`);
|
||||
|
||||
expect(el).toBeVisible();
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user