@ondc/automation-mock-runner 1.3.2 → 1.3.5

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.
@@ -92,6 +92,7 @@ function convertToFlowConfig(config) {
92
92
  flowStep.input = [
93
93
  {
94
94
  name: step.mock.inputs.id,
95
+ type: step.mock.inputs.id,
95
96
  schema: step.mock.inputs.jsonSchema,
96
97
  },
97
98
  ];
@@ -165,7 +166,12 @@ async function generatePlaygroundConfigFromFlowConfig(payloads, flowConfig) {
165
166
  const config = createInitialMockConfig(domain, version, `${flowConfig.id}_logs_flow_${domain}_v${version}`);
166
167
  const mockRunner = new MockRunner_1.MockRunner(config);
167
168
  for (const step of flowConfig.sequence) {
168
- const stepPayload = payloads.findIndex((p) => p.context.action === step.type); // and delete used payloads
169
+ if (step.type === "HTML_FORM" ||
170
+ step.type === "DYNAMIC_FORM" ||
171
+ step.type === "FORM") {
172
+ continue;
173
+ }
174
+ const stepPayload = payloads.findIndex((p) => p.context.action === step.type);
169
175
  if (stepPayload === -1) {
170
176
  throw new Error(`No payload found for action ${step.type} in flow ${flowConfig.id}`);
171
177
  }
@@ -558,6 +558,7 @@ describe("configHelper", () => {
558
558
  expect(stepWithInputs.input).toEqual([
559
559
  {
560
560
  name: "ExampleInputId",
561
+ type: "ExampleInputId",
561
562
  schema: {
562
563
  $schema: "http://json-schema.org/draft-07/schema#",
563
564
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondc/automation-mock-runner",
3
- "version": "1.3.2",
3
+ "version": "1.3.5",
4
4
  "description": "A TypeScript library for ONDC automation mock runner",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",