@skyramp/skyramp 1.3.14 → 1.3.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/skyramp",
3
- "version": "1.3.14",
3
+ "version": "1.3.16",
4
4
  "description": "module for leveraging skyramp cli functionality",
5
5
  "scripts": {
6
6
  "lint": "eslint 'src/**/*.js' 'src/**/*.ts' --fix",
@@ -0,0 +1,66 @@
1
+ import { Page } from '@playwright/test';
2
+
3
+ export interface AddNodeOptions {
4
+ /** Key to assign to the new node in the GoJS model. */
5
+ key: string;
6
+ /** GoJS node category — used to look up the palette template. */
7
+ category: string;
8
+ /** CSS selector for the div that hosts the target GoJS diagram. */
9
+ diagramSelector: string;
10
+ /** CSS selector for the palette div to copy app-specific properties from. Optional. */
11
+ paletteSelector?: string;
12
+ /** Key of the pre-existing diagram node to use as placement anchor. */
13
+ anchorKey?: string;
14
+ /** X offset from the anchor node's document-space location. */
15
+ anchorOffsetX?: number;
16
+ /** Y offset from the anchor node's document-space location. */
17
+ anchorOffsetY?: number;
18
+ }
19
+
20
+ export interface NodeRef {
21
+ panelSelector: string;
22
+ key: string | number;
23
+ port?: string;
24
+ }
25
+
26
+ export interface PaletteSource {
27
+ panelSelector: string;
28
+ category: string;
29
+ }
30
+
31
+ export interface DocTarget {
32
+ panelSelector: string;
33
+ docX: number;
34
+ docY: number;
35
+ }
36
+
37
+ export interface NodeSource {
38
+ panelSelector: string;
39
+ key: string | number;
40
+ }
41
+
42
+ export declare class GoJSDiagram {
43
+ constructor(page: Page, framePath?: string[]);
44
+
45
+ /**
46
+ * Add a new node to a GoJS diagram at a position relative to an anchor node.
47
+ * App-specific properties are copied from the palette template for the given
48
+ * category, skipping GoJS internals and loc to avoid palette mutation.
49
+ */
50
+ addNode(opts: AddNodeOptions): Promise<void>;
51
+
52
+ /**
53
+ * Create a directed link between two GoJS nodes via the model API.
54
+ */
55
+ linkNodes(source: NodeRef, target: NodeRef): Promise<void>;
56
+
57
+ /**
58
+ * Drag a node from a GoJS Palette into a GoJS Diagram.
59
+ */
60
+ dragFromPalette(source: PaletteSource, target: DocTarget): Promise<void>;
61
+
62
+ /**
63
+ * Move an existing node within a GoJS Diagram.
64
+ */
65
+ moveNode(source: NodeSource, target: DocTarget): Promise<void>;
66
+ }
@@ -0,0 +1,368 @@
1
+ /**
2
+ * Copyright (c) Skyramp Corporation.
3
+ *
4
+ * GoJSDiagram — a Playwright helper for driving GoJS canvases.
5
+ *
6
+ * GoJS renders entirely into a <canvas> element so there are no DOM nodes for
7
+ * individual diagram items. This class handles the three-step coordinate
8
+ * resolution that is required for any reliable interaction:
9
+ *
10
+ * 1. Ask the GoJS model for the viewport-space offset of the element
11
+ * (via go.Diagram.fromDiv().transformDocToView() or findNodeForKey()).
12
+ * 2. Ask Playwright for the page-level bounding box of the <canvas> element
13
+ * (via locator.boundingBox() which correctly traverses the iframe chain).
14
+ * 3. Add the two together → final page coordinate for page.mouse.*.
15
+ *
16
+ * The class is generic: it locates GoJS containers via the standard
17
+ * go.Diagram.fromDiv() API and does NOT rely on application-specific CSS IDs.
18
+ *
19
+ * Usage (TypeScript):
20
+ *
21
+ * import { GoJSDiagram } from '@skyramp/skyramp';
22
+ *
23
+ * const gojs = new GoJSDiagram(page, ['iframe[title="main menu"]', 'iframe[title="iframe process"]']);
24
+ *
25
+ * // Drag a node from a palette to a diagram
26
+ * await gojs.dragFromPalette(
27
+ * { panelSelector: '#myPalette', category: 'Task' },
28
+ * { panelSelector: '#myDiagram', docX: 350, docY: 285 },
29
+ * );
30
+ *
31
+ * // Move an existing node within a diagram
32
+ * await gojs.moveNode(
33
+ * { panelSelector: '#myDiagram', key: '3' },
34
+ * { panelSelector: '#myDiagram', docX: 250, docY: 300 },
35
+ * );
36
+ */
37
+
38
+ /* global document, window */
39
+
40
+ const GOJS_DRAG_STEPS = 50; // Minimum steps for GoJS to register a drag
41
+
42
+ class GoJSDiagram {
43
+ /**
44
+ * @param {import('@playwright/test').Page} page The Playwright Page object.
45
+ * @param {string[]} framePath Ordered list of iframe selectors to reach the
46
+ * frame that contains the GoJS diagram (e.g. ['iframe[title="menu"]',
47
+ * 'iframe[title="process"]']). Empty array means the diagram is in the
48
+ * top-level page.
49
+ */
50
+ constructor(page, framePath = []) {
51
+ this._page = page;
52
+ this._framePath = framePath;
53
+ }
54
+
55
+ /**
56
+ * Returns a FrameLocator scoped to the innermost frame in framePath,
57
+ * or the page itself when framePath is empty.
58
+ *
59
+ * @returns {import('@playwright/test').Page | import('@playwright/test').FrameLocator}
60
+ */
61
+ _frameLocator() {
62
+ let scope = this._page;
63
+ for (const sel of this._framePath) {
64
+ scope = scope.frameLocator(sel);
65
+ }
66
+ return scope;
67
+ }
68
+
69
+ /**
70
+ * Resolve the page-level {x, y} of a point expressed in GoJS document
71
+ * coordinates within the specified panel container.
72
+ *
73
+ * @param {string} panelSelector CSS selector for the div that hosts the GoJS
74
+ * diagram or palette (e.g. '#myPalette', '[data-testid="diagram"]').
75
+ * @param {number} docX X coordinate in GoJS document space.
76
+ * @param {number} docY Y coordinate in GoJS document space.
77
+ * @returns {Promise<{x: number, y: number}>}
78
+ */
79
+ async _resolveDocPoint(panelSelector, docX, docY) {
80
+ const fl = this._frameLocator();
81
+ const canvasLocator = fl.locator(`${panelSelector} canvas`).first();
82
+
83
+ // Page-level bounding box of the canvas element
84
+ const box = await canvasLocator.boundingBox();
85
+ if (!box) {
86
+ throw new Error(`GoJSDiagram: canvas not found for panel "${panelSelector}"`);
87
+ }
88
+
89
+ // Viewport-space point inside the canvas, obtained via GoJS API in the frame
90
+ const vpPt = await this._evaluateInFrame(([sel, dx, dy]) => {
91
+ const container = document.querySelector(sel);
92
+ if (!container) return null;
93
+ const diagram = window.go?.Diagram?.fromDiv?.(container);
94
+ if (!diagram) return null;
95
+ const vp = diagram.transformDocToView(new window.go.Point(dx, dy));
96
+ return { x: vp.x, y: vp.y };
97
+ }, [panelSelector, docX, docY]);
98
+
99
+ if (!vpPt) {
100
+ throw new Error(`GoJSDiagram: could not resolve document point via GoJS for panel "${panelSelector}"`);
101
+ }
102
+
103
+ return { x: box.x + vpPt.x, y: box.y + vpPt.y };
104
+ }
105
+
106
+ /**
107
+ * Resolve the page-level {x, y} of a palette node identified by category.
108
+ * Picks the first node in the palette whose data.category matches.
109
+ *
110
+ * @param {string} panelSelector CSS selector for the palette container div.
111
+ * @param {string} category The GoJS node category to look for.
112
+ * @returns {Promise<{x: number, y: number}>}
113
+ */
114
+ async _resolvePaletteNode(panelSelector, category) {
115
+ const fl = this._frameLocator();
116
+ const canvasLocator = fl.locator(`${panelSelector} canvas`).first();
117
+
118
+ const box = await canvasLocator.boundingBox();
119
+ if (!box) {
120
+ throw new Error(`GoJSDiagram: palette canvas not found for panel "${panelSelector}"`);
121
+ }
122
+
123
+ const vpPt = await this._evaluateInFrame(([sel, cat]) => {
124
+ const container = document.querySelector(sel);
125
+ if (!container) return null;
126
+ const diagram = window.go?.Diagram?.fromDiv?.(container);
127
+ if (!diagram) return null;
128
+ let found = null;
129
+ diagram.nodes.each(n => {
130
+ if (!found && n.data?.category === cat) found = n;
131
+ });
132
+ if (!found) return null;
133
+ const center = found.getDocumentPoint(window.go.Spot.Center);
134
+ const vp = diagram.transformDocToView(center);
135
+ return { x: vp.x, y: vp.y };
136
+ }, [panelSelector, category]);
137
+
138
+ if (!vpPt) {
139
+ throw new Error(`GoJSDiagram: no node with category "${category}" found in palette "${panelSelector}"`);
140
+ }
141
+
142
+ return { x: box.x + vpPt.x, y: box.y + vpPt.y };
143
+ }
144
+
145
+ /**
146
+ * Resolve the page-level {x, y} of a diagram node identified by key.
147
+ *
148
+ * @param {string} panelSelector CSS selector for the diagram container div.
149
+ * @param {string|number} key The GoJS node key.
150
+ * @returns {Promise<{x: number, y: number}>}
151
+ */
152
+ async _resolveDiagramNode(panelSelector, key) {
153
+ const fl = this._frameLocator();
154
+ const canvasLocator = fl.locator(`${panelSelector} canvas`).first();
155
+
156
+ const box = await canvasLocator.boundingBox();
157
+ if (!box) {
158
+ throw new Error(`GoJSDiagram: diagram canvas not found for panel "${panelSelector}"`);
159
+ }
160
+
161
+ const vpPt = await this._evaluateInFrame(([sel, k]) => {
162
+ const container = document.querySelector(sel);
163
+ if (!container) return null;
164
+ const diagram = window.go?.Diagram?.fromDiv?.(container);
165
+ if (!diagram) return null;
166
+ const node = diagram.findNodeForKey(k);
167
+ if (!node) return null;
168
+ const center = node.getDocumentPoint(window.go.Spot.Center);
169
+ const vp = diagram.transformDocToView(center);
170
+ return { x: vp.x, y: vp.y };
171
+ }, [panelSelector, key]);
172
+
173
+ if (!vpPt) {
174
+ throw new Error(`GoJSDiagram: no node with key "${key}" found in diagram "${panelSelector}"`);
175
+ }
176
+
177
+ return { x: box.x + vpPt.x, y: box.y + vpPt.y };
178
+ }
179
+
180
+ /**
181
+ * Execute a function inside the correct frame context.
182
+ * Uses page.evaluate() when there are no iframes, otherwise uses
183
+ * page.frames().find() to reach the correct nested frame.
184
+ *
185
+ * @param {Function} fn Function to evaluate in the frame.
186
+ * @param {...any} args Arguments forwarded to fn.
187
+ * @returns {Promise<any>}
188
+ */
189
+ async _evaluateInFrame(fn, ...args) {
190
+ if (this._framePath.length === 0) {
191
+ return this._page.evaluate(fn, ...args);
192
+ }
193
+
194
+ // Locate the target frame by walking the frame tree
195
+ const targetUrl = await this._frameLocator()
196
+ .locator('html')
197
+ .evaluate(el => el.ownerDocument.defaultView?.location?.href ?? '');
198
+
199
+ const frame = this._page.frames().find(f => f.url() === targetUrl);
200
+ if (!frame) {
201
+ throw new Error(`GoJSDiagram: could not find frame for path [${this._framePath.join(', ')}]`);
202
+ }
203
+
204
+ return frame.evaluate(fn, args[0]);
205
+ }
206
+
207
+ /**
208
+ * Execute the mouse drag sequence that GoJS responds to.
209
+ * Requires ≥50 intermediate mousemove steps.
210
+ *
211
+ * @param {{x: number, y: number}} src Page-level source coordinates.
212
+ * @param {{x: number, y: number}} dest Page-level destination coordinates.
213
+ */
214
+ async _drag(src, dest) {
215
+ // Move to source first (hover to let GoJS know where we start)
216
+ await this._page.mouse.move(src.x, src.y);
217
+ await this._page.waitForTimeout(200);
218
+ await this._page.mouse.down();
219
+ await this._page.waitForTimeout(600);
220
+ await this._page.mouse.move(dest.x, dest.y, { steps: GOJS_DRAG_STEPS });
221
+ await this._page.waitForTimeout(800);
222
+ await this._page.mouse.up();
223
+ await this._page.waitForTimeout(500);
224
+ }
225
+
226
+ /**
227
+ * Drag a node from a GoJS Palette into a GoJS Diagram.
228
+ *
229
+ * @param {{ panelSelector: string, category: string }} source
230
+ * @param {{ panelSelector: string, docX: number, docY: number }} target
231
+ */
232
+ async dragFromPalette(source, target) {
233
+ const src = await this._resolvePaletteNode(source.panelSelector, source.category);
234
+ const dest = await this._resolveDocPoint(target.panelSelector, target.docX, target.docY);
235
+ await this._drag(src, dest);
236
+ }
237
+
238
+ /**
239
+ * Move an existing node within a GoJS Diagram.
240
+ *
241
+ * @param {{ panelSelector: string, key: string|number }} source
242
+ * @param {{ panelSelector: string, docX: number, docY: number }} target
243
+ */
244
+ async moveNode(source, target) {
245
+ const src = await this._resolveDiagramNode(source.panelSelector, source.key);
246
+ const dest = await this._resolveDocPoint(target.panelSelector, target.docX, target.docY);
247
+ await this._drag(src, dest);
248
+ }
249
+
250
+ /**
251
+ * Create a directed link between two GoJS nodes via the model API.
252
+ *
253
+ * This method uses diagram.model.addLinkData() which bypasses the invisible
254
+ * overlay div that intercepts all coordinate-based pointer events on the GoJS
255
+ * canvas. Raw mouse drag approaches (including _drag()) are unreliable for
256
+ * link creation because the port hit areas are small and position-dependent.
257
+ *
258
+ * Usage (TypeScript):
259
+ *
260
+ * await gojs.linkNodes(
261
+ * { panelSelector: '#myDiagram', key: 'TaskA' },
262
+ * { panelSelector: '#myDiagram', key: 'TaskB' },
263
+ * );
264
+ *
265
+ * @param {{ panelSelector: string, key: string|number, port?: string }} source
266
+ * @param {{ panelSelector: string, key: string|number, port?: string }} target
267
+ */
268
+ async linkNodes(source, target) {
269
+ await this._evaluateInFrame(([sel, fromKey, toKey, fromPort, toPort]) => {
270
+ const container = document.querySelector(sel);
271
+ if (!container) return;
272
+ const diagram = window.go?.Diagram?.fromDiv?.(container);
273
+ if (!diagram) return;
274
+ const linkData = { from: fromKey, to: toKey };
275
+ if (fromPort) linkData.fromPort = fromPort;
276
+ if (toPort) linkData.toPort = toPort;
277
+ const txName = `link ${fromKey} -> ${toKey}`;
278
+ diagram.startTransaction(txName);
279
+ diagram.model.addLinkData(linkData);
280
+ diagram.commitTransaction(txName);
281
+ }, [source.panelSelector, source.key, target.key, source.port ?? '', target.port ?? '']);
282
+ }
283
+
284
+ /**
285
+ * Add a new node to a GoJS diagram, placing it at a position relative to an
286
+ * existing anchor node. App-specific properties are copied from the palette
287
+ * template for the given category, skipping GoJS internal fields and the loc
288
+ * property to prevent palette mutation from corrupting subsequent placements.
289
+ *
290
+ * Usage (TypeScript):
291
+ *
292
+ * await _canvas.addNode({
293
+ * key: 'Conditional-0001',
294
+ * category: 'Conditional',
295
+ * diagramSelector: '#divCenter',
296
+ * paletteSelector: '#divLeft',
297
+ * anchorKey: 'InputTask-0001',
298
+ * anchorOffsetX: -9,
299
+ * anchorOffsetY: 137,
300
+ * });
301
+ *
302
+ * @param {{
303
+ * key: string,
304
+ * category: string,
305
+ * diagramSelector: string,
306
+ * paletteSelector?: string,
307
+ * anchorKey?: string,
308
+ * anchorOffsetX?: number,
309
+ * anchorOffsetY?: number,
310
+ * }} opts
311
+ */
312
+ async addNode(opts) {
313
+ const {
314
+ key,
315
+ category,
316
+ diagramSelector,
317
+ paletteSelector,
318
+ anchorKey,
319
+ anchorOffsetX = 0,
320
+ anchorOffsetY = 0,
321
+ } = opts;
322
+
323
+ await this._evaluateInFrame(([diagSel, palSel, nodeKey, nodeCat, anKey, offX, offY]) => {
324
+ const go = window.go;
325
+ if (!go) throw new Error('GoJSDiagram: GoJS not found on window');
326
+ const diagramDiv = document.querySelector(diagSel);
327
+ if (!diagramDiv) throw new Error(`GoJSDiagram: panel not found for "${diagSel}"`);
328
+ const diagram = go.Diagram.fromDiv(diagramDiv);
329
+ if (!diagram) throw new Error(`GoJSDiagram: no GoJS diagram found for "${diagSel}"`);
330
+
331
+ const nodeData = { key: nodeKey, category: nodeCat };
332
+
333
+ // Copy app-specific properties from the palette template, skipping GoJS
334
+ // internals and loc to prevent palette mutation across multiple addNode calls.
335
+ if (palSel) {
336
+ const paletteDiv = document.querySelector(palSel);
337
+ const palette = paletteDiv ? go.Diagram.fromDiv(paletteDiv) : null;
338
+ if (palette) {
339
+ const skip = new Set(['__gohashid', '__gohash', 'loc', 'key']);
340
+ palette.nodes.each((n) => {
341
+ if (n.data?.category === nodeCat) {
342
+ for (const prop in n.data) {
343
+ if (!skip.has(prop)) nodeData[prop] = n.data[prop];
344
+ }
345
+ }
346
+ });
347
+ }
348
+ }
349
+
350
+ const txName = `add ${nodeCat} node`;
351
+ diagram.startTransaction(txName);
352
+ try {
353
+ diagram.model.addNodeData(nodeData);
354
+ const node = diagram.findNodeForKey(nodeKey);
355
+ if (node && anKey) {
356
+ const anchor = diagram.findNodeForKey(anKey);
357
+ if (!anchor) throw new Error(`GoJSDiagram: anchor node "${anKey}" not found`);
358
+ node.location = new go.Point(anchor.location.x + offX, anchor.location.y + offY);
359
+ }
360
+ } finally {
361
+ diagram.commitTransaction(txName);
362
+ }
363
+ }, [diagramSelector, paletteSelector ?? '', key, category, anchorKey ?? '', anchorOffsetX, anchorOffsetY]);
364
+ }
365
+ }
366
+
367
+ module.exports = GoJSDiagram;
368
+
@@ -36,6 +36,11 @@ export class MockV2 {
36
36
  */
37
37
  requestBody?: string | null;
38
38
 
39
+ /**
40
+ * Optional request form params for request-aware matching
41
+ */
42
+ requestFormParams?: Record<string, unknown> | null;
43
+
39
44
  /**
40
45
  * Optional data override object
41
46
  */
@@ -83,6 +88,7 @@ export class MockV2 {
83
88
  status_code: number;
84
89
  response_body: string;
85
90
  request_body?: string;
91
+ request_form_params?: Record<string, unknown>;
86
92
  data_override?: Record<string, unknown>;
87
93
  client_id?: string;
88
94
  };
@@ -38,6 +38,7 @@ class MockV2 {
38
38
  this.statusCode = options.statusCode || 201;
39
39
  this.responseBody = (options.body !== undefined ? options.body : options.responseBody) || '';
40
40
  this.requestBody = options.requestBody || null;
41
+ this.requestFormParams = options.requestFormParams || null;
41
42
  this.dataOverride = options.dataOverride || null;
42
43
  this.clientID = options.clientID || null;
43
44
  } else {
@@ -48,6 +49,7 @@ class MockV2 {
48
49
  this.statusCode = statusCode;
49
50
  this.responseBody = responseBody;
50
51
  this.requestBody = requestBody;
52
+ this.requestFormParams = null;
51
53
  this.dataOverride = dataOverride;
52
54
  this.clientID = null;
53
55
  }
@@ -70,6 +72,10 @@ class MockV2 {
70
72
  result.request_body = this.requestBody;
71
73
  }
72
74
 
75
+ if (this.requestFormParams !== null) {
76
+ result.request_form_params = this.requestFormParams;
77
+ }
78
+
73
79
  if (this.dataOverride !== null) {
74
80
  result.data_override = this.dataOverride;
75
81
  }
@@ -1,3 +1,6 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
1
4
  /**
2
5
  * The `MultipartParam` class represents a multipart/form-data parameter for file uploads or value-based content.
3
6
  * @class
@@ -8,21 +11,22 @@ class MultipartParam {
8
11
  * @constructor
9
12
  * @param {Object} options - An options object containing all parameters.
10
13
  * @param {string} options.name - The name of the multipart parameter (required).
11
- * @param {string} [options.filename=""] - The filename for file uploads.
14
+ * @param {string} [options.filename=""] - Filename for file uploads. When this is a path to an
15
+ * existing file on disk, the file is read and base64-encoded automatically and the basename
16
+ * is used as the Content-Disposition filename sent to the server.
12
17
  * @param {boolean} [options.decoded=false] - Whether the content should be decoded.
13
18
  * @param {string} [options.value=null] - The value for value-based parameters.
14
- *
19
+ *
15
20
  * @example
16
- * // File upload parameter
17
- * new MultipartParam({
21
+ * // File upload — filename is a local path, content is read automatically
22
+ * new MultipartParam({
18
23
  * name: 'file',
19
- * filename: 'document.pdf',
20
- * decoded: true
24
+ * filename: '/path/to/document.pdf'
21
25
  * })
22
- *
26
+ *
23
27
  * @example
24
28
  * // Value-based parameter
25
- * new MultipartParam({
29
+ * new MultipartParam({
26
30
  * name: 'attributes',
27
31
  * value: '{"product_id": 3}',
28
32
  * filename: '',
@@ -33,11 +37,21 @@ class MultipartParam {
33
37
  if (typeof options !== 'object' || options === null || !('name' in options)) {
34
38
  throw new Error('MultipartParam requires an options object with a name property')
35
39
  }
36
-
37
- this.name = options.name
38
- this.value = options.value || null
39
- this.filename = options.filename || ""
40
+
41
+ this.name = options.name
40
42
  this.decoded = options.decoded || false
43
+
44
+ const filenameOpt = options.filename || ""
45
+
46
+ if (filenameOpt && fs.existsSync(filenameOpt)) {
47
+ // filename is a local filesystem path — read content and use basename as display name
48
+ this.value = fs.readFileSync(filenameOpt).toString('base64')
49
+ this.decoded = false
50
+ this.filename = path.basename(filenameOpt)
51
+ } else {
52
+ this.filename = filenameOpt
53
+ this.value = options.value || null
54
+ }
41
55
  }
42
56
 
43
57
  toJson() {
@@ -36,7 +36,7 @@ class RequestV2 {
36
36
  this.pathParams = options.pathParams || {};
37
37
  this.queryParams = options.queryParams || {};
38
38
  this.formParams = options.formParams || {};
39
- this.multipartParams = options.multipartParams || [];
39
+ this.multipartParams = options.multipartParams || options.multipart_params || [];
40
40
  this.expectedCode = options.expectedCode || '';
41
41
  this.description = options.description || '';
42
42
  this.insecure = options.insecure || false;
@@ -140,6 +140,7 @@ interface GenerateRestTestOptions {
140
140
  chainingKey?: string;
141
141
  parentRequestData?: Record<string, string> | string;
142
142
  parentStatusCode?: Record<string, string> | string;
143
+ parentFormParams?: Record<string, string> | string;
143
144
  requestAware?: boolean;
144
145
  providerMode?: boolean;
145
146
  consumerMode?: boolean;
@@ -104,6 +104,7 @@ const generateRestTestWrapper = lib.func('generateRestTestWrapper', 'string', [
104
104
  'string', // chainingKey
105
105
  'string', // parentRequestData
106
106
  'string', // parentStatusCode
107
+ 'string', // parentFormParams
107
108
  'bool', // requestAware
108
109
  'bool', // providerMode
109
110
  'bool', // consumerMode
@@ -896,6 +897,9 @@ class SkyrampClient {
896
897
  const parentStatusCode = typeof options.parentStatusCode === 'string'
897
898
  ? options.parentStatusCode
898
899
  : JSON.stringify(options.parentStatusCode || {});
900
+ const parentFormParams = typeof options.parentFormParams === 'string'
901
+ ? options.parentFormParams
902
+ : JSON.stringify(options.parentFormParams || {});
899
903
 
900
904
  generateRestTestWrapper.async(
901
905
  options.testType || "",
@@ -948,6 +952,7 @@ class SkyrampClient {
948
952
  options.chainingKey || "",
949
953
  parentRequestData || "",
950
954
  parentStatusCode || "",
955
+ parentFormParams || "",
951
956
  options.requestAware || false,
952
957
  options.providerMode || false,
953
958
  options.consumerMode || false,
package/src/index.d.ts CHANGED
@@ -19,4 +19,5 @@ export * from "./classes/AsyncTestStatus";
19
19
  export * from "./utils";
20
20
  export * from "./function";
21
21
  export * from "./classes/SmartPlaywright";
22
+ export * from "./classes/GoJSDiagram";
22
23
  export * from "./workspace";
package/src/index.js CHANGED
@@ -20,6 +20,7 @@ const MockV2 = require('./classes/MockV2');
20
20
  const { getValue, getResponseValue, checkSchema, iterate, pushToolEvent, getBaseUrl } = require('./utils');
21
21
  const { checkStatusCode, checkRequestPayload } = require('./function');
22
22
  const { newSkyrampPlaywrightPage, expect } = require('./classes/SmartPlaywright');
23
+ const GoJSDiagram = require('./classes/GoJSDiagram');
23
24
  const {
24
25
  workspaceConfigSchema,
25
26
  serviceSchema,
@@ -60,6 +61,7 @@ module.exports = {
60
61
  pushToolEvent,
61
62
  getBaseUrl,
62
63
  newSkyrampPlaywrightPage,
64
+ GoJSDiagram,
63
65
  expect,
64
66
  workspaceConfigSchema,
65
67
  serviceSchema,