Skip to content

Commit

Permalink
Upgrade faker-js and adjust tests due to breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wlsf82 committed Sep 14, 2024
1 parent 010d855 commit 33d2e6d
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/gui/group/createGroup.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Group', () => {
it('creates a group', () => {
const group = {
name: `group-${faker.string.uuid()}`,
description: faker.random.words(5)
description: faker.word.words(5)
}

cy.gui_createPublicGroup(group)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/group/createGroupLabel.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Group Label', () => {
name: `group-${randomUuid}`,
path: randomUuid,
label: {
title: `label-${faker.random.word()}`
title: `label-${faker.word.sample()}`
}
}

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/project/commentOnIssue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Issue', () => {
})

it('comments on an issue', function () {
const comment = faker.random.words(3)
const comment = faker.word.words(3)
const { name: projectName } = this.projectsBody[0]
const { iid: issueIid } = this.issue.body

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/gui/project/createIssue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { faker } from '@faker-js/faker/locale/en'
describe('Issue', () => {
const project = {
name: `project-${faker.string.uuid()}`,
description: faker.random.words(5),
description: faker.word.words(5),
issue: {
title: `issue-${faker.string.uuid()}`,
description: faker.random.words(3)
description: faker.word.words(3)
}
}

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/gui/project/createNewFile.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ describe('File', () => {
const project = {
name: `project-${faker.string.uuid()}`,
file: {
name: `${faker.random.word()}.txt`,
content: faker.random.words(10)
name: `${faker.word.sample()}.txt`,
content: faker.word.words(10)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/project/createProject.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Project', () => {
it('creates a project', () => {
const project = {
name: `project-${faker.string.uuid()}`,
description: faker.random.words(5)
description: faker.word.words(5)
}

cy.gui_createProject(project)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/project/createWiki.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Wiki', () => {
})

it('creates a wiki', () => {
const wikiContent = faker.random.words(4)
const wikiContent = faker.word.words(4)

cy.visit(`${Cypress.env('user_name')}/${project.name}/wikis/home?view=create`)

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/project/issueMilestone.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { faker } from '@faker-js/faker/locale/en'

describe('Issue milestone', () => {
const milestone = { title: `milestone-${faker.random.word()}` }
const milestone = { title: `milestone-${faker.word.sample()}` }

beforeEach(() => {
cy.api_deleteProjects()
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/gui/project/labelAnIssue.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker/locale/en'

describe('Issue label', () => {
const label = {
name: `label-${faker.random.word()}`,
name: `label-${faker.word.sample()}`,
color: '#ffaabb'
}

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/gui/project/starProject.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { faker } from '@faker-js/faker/locale/en'
describe('Star project', () => {
const project = {
name: `project-${faker.string.uuid()}`,
description: faker.random.words(5),
description: faker.word.words(5),
issue: {
title: `issue-${faker.string.uuid()}`,
description: faker.random.words(3)
description: faker.word.words(3)
}
}

Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.3",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@faker-js/faker": "^8.4.1",
"@faker-js/faker": "^9.0.1",
"cypress": "^13.14.2",
"esbuild": "^0.23.1",
"eslint": "^8.57.0",
Expand Down

0 comments on commit 33d2e6d

Please sign in to comment.