1.0.6 • Published 10 months ago
nt-e2e-quickstart-testing v1.0.6
End to end testing
The e2e-quickstart-testing
package includes pre-written test cases.
It's commonly used in many projects to streamline code sections that are repeated in multiple places with minimal variation.
Installing
Package manager
Using npm:
npm i playwright@latest nt-e2e-quickstart-testing --save-dev
Once the package is installed, you can import the library using import or require approach:
import { login } from 'nt-e2e-quickstart-testing';
Example:
import { test } from '@playwright/test';
import { login } from 'nt-e2e-quickstart-testing';
const data = {
email: 'test@test.com',
password: 'password',
placeHolder: {
email: 'username',
password: 'password'
},
submitBtnText: 'Submit',
baseUrl: 'http://localhost:3000/login'
}
test('Can login', async ({ page }) => {
await login(page, data);
});