-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui-v2] Remove faker in favor of falso (#17403)
- Loading branch information
Showing
25 changed files
with
391 additions
and
237 deletions.
There are no files selected for viewing
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
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
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
13 changes: 6 additions & 7 deletions
13
ui-v2/src/components/deployments/deployment-schedules/schedule-action-menu.test.tsx
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
12 changes: 6 additions & 6 deletions
12
ui-v2/src/components/deployments/deployment-schedules/schedule-toggle-switch.test.tsx
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,25 +1,31 @@ | ||
import type { components } from "@/api/prefect"; | ||
import { faker } from "@faker-js/faker"; | ||
import { | ||
randAlphaNumeric, | ||
randPastDate, | ||
randSentence, | ||
randUuid, | ||
randWord, | ||
} from "@ngneat/falso"; | ||
|
||
export const createFakeArtifact = ( | ||
overrides?: Partial<components["schemas"]["Artifact"]>, | ||
): components["schemas"]["Artifact"] => { | ||
return { | ||
id: faker.string.uuid(), | ||
created: faker.date.past().toISOString(), | ||
updated: faker.date.past().toISOString(), | ||
key: `key-${faker.string.alphanumeric({ length: 10 })}`, | ||
id: randUuid(), | ||
created: randPastDate().toISOString(), | ||
updated: randPastDate().toISOString(), | ||
key: `key-${randAlphaNumeric({ length: 10 }).join()}`, | ||
type: "result", | ||
description: faker.lorem.sentence(), | ||
description: randSentence(), | ||
data: { | ||
arr: faker.helpers.uniqueArray([faker.word.sample()], 5), | ||
arr: randWord({ length: 5 }), | ||
}, | ||
metadata_: { | ||
key: faker.lorem.word(), | ||
[faker.lorem.word()]: faker.lorem.word(), | ||
key: randWord(), | ||
[randWord()]: randWord(), | ||
}, | ||
flow_run_id: faker.string.uuid(), | ||
task_run_id: faker.string.uuid(), | ||
flow_run_id: randUuid(), | ||
task_run_id: randUuid(), | ||
...overrides, | ||
}; | ||
}; |
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
Oops, something went wrong.