@rimori/playwright-testing 0.3.4 → 0.3.5-next.1
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:
|
|
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
|
-
|
|
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.
|
|
@@ -578,6 +589,9 @@ class RimoriTestEnvironment {
|
|
|
578
589
|
this.messageChannelSimulator.on(`${this.pluginId}.session.triggerUrlChange`, () => {
|
|
579
590
|
// No-op handler - does nothing
|
|
580
591
|
});
|
|
592
|
+
this.messageChannelSimulator.on(`${this.pluginId}.session.triggerScrollbarChange`, () => {
|
|
593
|
+
// No-op handler - does nothing
|
|
594
|
+
});
|
|
581
595
|
this.messageChannelSimulator.on('global.accomplishment.triggerMicro', () => {
|
|
582
596
|
// No-op handler - does nothing
|
|
583
597
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimori/playwright-testing",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5-next.1",
|
|
4
4
|
"description": "Playwright testing utilities for Rimori plugins and workers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@playwright/test": "^1.40.0",
|
|
26
|
-
"@rimori/client": "
|
|
26
|
+
"@rimori/client": "2.5.10-next.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@playwright/test": "^1.40.0",
|
|
30
|
-
"@rimori/client": "
|
|
30
|
+
"@rimori/client": "2.5.10-next.0",
|
|
31
31
|
"@types/node": "^20.12.7",
|
|
32
32
|
"rimraf": "^5.0.7",
|
|
33
33
|
"typescript": "^5.7.2"
|