forked from mate-academy/qa_cypress_e2e_intro_adv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9906f15
commit 1fb83b9
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,10 @@ App for testing: `https://react-redux.realworld.io` | |
1. Click on [Sign up] button. | ||
1. Assert your username appeared in site navigation (header) menu. | ||
|
||
To install `faker` plugin, run the command: `npm install [email protected]`. | ||
To use `faker` in your tests, go to `support`/`generate.js` file and write the next code: | ||
|
||
```js | ||
const faker = require('faker'); | ||
import { faker } from '@faker-js/faker'; | ||
|
||
function generateUser() { | ||
const randomNumber = Math.random().toString().slice(2, 6); | ||
|
@@ -43,7 +42,7 @@ module.exports = { generateUser }; | |
Now, you can generate a new user in your tests: | ||
|
||
```js | ||
const { generateUser } = require('../support/generate'); | ||
import { generateUser } from '../support/generate'; | ||
|
||
describe('Sign Up page', () => { | ||
it('should provide an ability to register new account', () => { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters