FIX: prevents flakey due to usernames with quotes (#26907)

Faker could generate usernames like `D'angelo` and that doesn’t work out nicely for our tests. Using domain names seems safer.
This commit is contained in:
Joffrey JAFFEUX 2024-05-07 17:41:49 +02:00 committed by GitHub
parent 342328b622
commit 69e5c9f611
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ export default class CoreFabricators {
user(args = {}) {
return this.store.createRecord("user", {
id: args.id || incrementSequence(),
username: args.username || getLoadedFaker().faker.person.firstName(),
username: args.username || getLoadedFaker().faker.internet.domainWord(),
name: args.name,
avatar_template: "/letter_avatar_proxy/v3/letter/t/41988e/{size}.png",
suspended_till: args.suspended_till,