1.37.3 • Published 2 years ago
testing_example_playwright v1.37.3
@nstmrt/testing
Sbermarket's testing config.
Install
npm i -D @nstmrt/testing
# or
yarn add -D @nstmrt/testing
Configure
Create playwright.config.ts
with next content:
import defaultConfig from "@nstmrt/testing";
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
...defaultConfig.playwrightConfig,
};
// final config
config.use = {
...defaultConfig.use,
/*
here you can configure test base URL
and http credentials for auth
*/
baseURL: process.env.BASE_URL,
httpCredentials: {
username: `${process.env.AUTH_USERNAME}`,
password: `${process.env.AUTH_PASSWORD}`,
},
}
export default config;
Create jest.config.js
with next content:
import defaultConfig from "@nstmrt/testing";
module.exports = {
...defaultConfig.jestConfig
}
Create spec
folder in the project's root where will be your test files.
Use *.e2e.ts
extensions for e2e tests, *.(spec|test).tsx
for units.
project
|
│ playwright.config.ts
| jest.config.js
│ README.md
│ ...
└── spec
│ reports (autogenerated)
└── tests
│ components
└── pages
│ index.e2e.ts
└──
1.37.3
2 years ago
1.37.2
2 years ago
1.36.2
2 years ago
1.35.2
2 years ago
1.34.2
2 years ago
1.33.3
2 years ago
1.32.3
2 years ago
1.31.3
2 years ago
1.30.3
2 years ago
1.29.3
2 years ago
1.28.3
2 years ago
1.27.3
2 years ago
1.26.3
2 years ago
1.25.3
2 years ago
1.24.3
2 years ago
1.23.3
2 years ago
1.23.2
2 years ago
1.22.2
2 years ago
1.21.2
2 years ago
1.20.2
2 years ago
1.19.2
2 years ago
1.18.2
2 years ago
1.17.2
2 years ago
1.16.2
2 years ago
1.15.2
2 years ago
1.14.2
2 years ago
1.12.2
2 years ago
1.11.2
2 years ago
1.10.2
2 years ago
1.9.2
2 years ago
1.8.2
2 years ago
1.7.2
2 years ago
1.6.2
2 years ago
1.5.2
2 years ago
1.4.2
2 years ago
1.3.2
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.0
2 years ago