use fakerjs as random test data (#51)

This commit is contained in:
depa panjie purnama 2022-10-28 00:53:04 +07:00 committed by GitHub
parent 90a29918d0
commit c3fa473dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@
"packages/bruno-testbench"
],
"devDependencies": {
"@faker-js/faker": "^7.6.0",
"@playwright/test": "^1.27.1",
"jest": "^29.2.0",
"randomstring": "^1.2.2"

View File

@ -1,4 +1,5 @@
const { test, expect } = require('@playwright/test');
const { faker } = require('@faker-js/faker');
const { HomePage } = require('../tests/pages/home.page');
test.describe('bruno e2e test', () => {
@ -33,7 +34,7 @@ test.describe('bruno e2e test', () => {
});
test('user should be able to create new collection', async () => {
await homePage.createCollection('test');
await homePage.createCollection(faker.random.words());
await expect(homePage.createCollectionToastSuccess).toBeVisible();
})