@rimori/playwright-testing 0.3.4-next.1 → 0.3.4-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { UserInfo } from '@rimori/client/dist/controller/SettingsController';
3
3
  import { MainPanelAction, Plugin } from '@rimori/client/dist/fromRimori/PluginTypes';
4
4
  import { PluginSettings } from './SettingsStateManager';
5
5
  import { EventPayload } from '@rimori/client/dist/fromRimori/EventBus';
6
+ import { LanguageLevel } from '@rimori/client';
6
7
  interface RimoriTestEnvironmentOptions {
7
8
  page: Page;
8
9
  pluginId: string;
@@ -296,7 +297,17 @@ export declare class RimoriTestEnvironment {
296
297
  * @param value - The generated content to return
297
298
  * @param options - Optional mock options
298
299
  */
299
- mockGenerate: (value: unknown, options?: MockOptions) => void;
300
+ mockGenerate: <T>(value: T & {
301
+ id?: string;
302
+ created_at?: string;
303
+ created_by?: string;
304
+ lang_id?: string;
305
+ guild_id?: string;
306
+ title?: string;
307
+ keywords?: string[];
308
+ verified?: boolean;
309
+ skill_level?: LanguageLevel;
310
+ }, options?: MockOptions) => void;
300
311
  /**
301
312
  * Mock embedding generation endpoint for RAG search.
302
313
  * Used by SharedContentController.searchByTopic() to generate query embedding.
@@ -349,7 +349,18 @@ class RimoriTestEnvironment {
349
349
  * @param options - Optional mock options
350
350
  */
351
351
  mockGenerate: (value, options) => {
352
- this.addBackendRoute('/shared-content/generate', value, { ...options, method: 'POST' });
352
+ const basicValues = {
353
+ id: '6284adca-3e74-4634-8ea6-85ff867bb5e5',
354
+ created_at: '2026-01-12T14:48:44.136Z',
355
+ created_by: 'd9f231f4-a942-4bb6-bc41-1db185969b74',
356
+ lang_id: 'sv',
357
+ guild_id: '54235057-f0d8-45cf-99aa-787b10de3eba',
358
+ title: 'Mitt husdjur',
359
+ keywords: ['husdjur', 'katt', 'hund', 'fågel', 'namn', 'färg', 'ljud', 'äta', 'gammal', 'säg'],
360
+ verified: true,
361
+ skill_level: 'Pre-A1',
362
+ };
363
+ this.addBackendRoute('/shared-content/generate', { ...basicValues, ...value }, { ...options, method: 'POST' });
353
364
  },
354
365
  /**
355
366
  * Mock embedding generation endpoint for RAG search.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/playwright-testing",
3
- "version": "0.3.4-next.1",
3
+ "version": "0.3.4-next.2",
4
4
  "description": "Playwright testing utilities for Rimori plugins and workers",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {