Skip to content

Commit

Permalink
avoid duplicated expectation names from catalog factories (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonkopliku authored Jun 16, 2023
1 parent b66561d commit 7736409
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions assets/js/lib/test-utils/factories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,21 @@ export const healthSummaryFactory = Factory.define(() => ({
}),
}));

export const catalogExpectExpectationFactory = Factory.define(() => ({
name: faker.animal.cat(),
type: 'expect',
expression: faker.lorem.sentence(),
}));
export const catalogExpectExpectationFactory = Factory.define(
({ sequence }) => ({
name: `${faker.lorem.word()}_${sequence}`,
type: 'expect',
expression: faker.lorem.sentence(),
})
);

export const catalogExpectSameExpectationFactory = Factory.define(() => ({
name: faker.animal.cat(),
type: 'expect_same',
expression: faker.lorem.sentence(),
}));
export const catalogExpectSameExpectationFactory = Factory.define(
({ sequence }) => ({
name: `${faker.lorem.word()}_${sequence}`,
type: 'expect_same',
expression: faker.lorem.sentence(),
})
);

export const catalogCheckFactory = Factory.define(() => ({
id: faker.datatype.uuid(),
Expand Down

0 comments on commit 7736409

Please sign in to comment.