From c3fa473dae51d22b4bf053516d03f83ba96350d5 Mon Sep 17 00:00:00 2001 From: depa panjie purnama Date: Fri, 28 Oct 2022 00:53:04 +0700 Subject: [PATCH] use fakerjs as random test data (#51) --- package.json | 1 + tests/home.spec.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 72dc159ec..f5bb4ccfe 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/tests/home.spec.js b/tests/home.spec.js index de85ae11a..b26f33587 100644 --- a/tests/home.spec.js +++ b/tests/home.spec.js @@ -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(); })