From 905b4f900efa157962a22a6bb19baf3b8654ca50 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 22 Aug 2024 10:49:00 +0200 Subject: [PATCH] DEV: adds tag to core fabricators (#28480) --- .../javascripts/discourse/app/lib/fabricators.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/assets/javascripts/discourse/app/lib/fabricators.js b/app/assets/javascripts/discourse/app/lib/fabricators.js index d26accabdba..0f3bcfbfb5c 100644 --- a/app/assets/javascripts/discourse/app/lib/fabricators.js +++ b/app/assets/javascripts/discourse/app/lib/fabricators.js @@ -36,6 +36,16 @@ export default class CoreFabricators { }); } + tag(args = {}) { + return this.store.createRecord("tag", { + id: args.id || incrementSequence(), + name: args.name ?? getLoadedFaker().faker.word.noun(), + description: args.description ?? getLoadedFaker().faker.lorem.sentence(), + count: args.count ?? 0, + pm_count: args.pm_count ?? 0, + }); + } + topic(args = {}) { return this.store.createRecord("topic", { id: args.id || incrementSequence(),