Skip to content

Commit 112c6ac

Browse files
fix: improved separator display in respect workflows (#2334)
1 parent c9f6799 commit 112c6ac

File tree

33 files changed

+933
-920
lines changed

33 files changed

+933
-920
lines changed

.changeset/ready-actors-fly.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@redocly/respect-core": patch
3+
"@redocly/openapi-core": patch
4+
"@redocly/cli": patch
5+
---
6+
7+
Fixed an issue where the Respect workflow separator did not render correctly in GitHub CI environments.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`should send in request and proceed case-insensitive headers in runtime expressions 1`] = `
4-
"────────────────────────────────────────────────────────────────────────────────
5-
6-
Running workflow case-insensitive-headers.arazzo.yaml / get-museum-hours
7-
8-
✓ GET /museum-hours - step get-museum-hours
4+
"────────────────────────────────────────────────────────────────────────────────
5+
6+
Running workflow case-insensitive-headers.arazzo.yaml / get-museum-hours
7+
8+
✓ GET /museum-hours - step get-museum-hours
99
    ✓ success criteria check - $request.header.content-type == 'third'
1010
    ✓ success criteria check - $request.header.CammelCasedHeader == 'custom-heade...
1111
    ✓ success criteria check - $response.header.X-Content-Type-Options == 'nosnif...
1212
    ✓ status code check - $statusCode in [200, 400, 404]
1313
    ✓ content-type check
1414
    ✓ schema check
15-
16-
15+
16+
1717
  Summary for case-insensitive-headers.arazzo.yaml
1818
  
1919
  Workflows: 1 passed, 1 total
2020
  Steps: 1 passed, 1 total
2121
  Checks: 6 passed, 6 total
22-
  Time: <test>ms
23-
24-
22+
  Time: <test>ms
23+
24+
2525
┌──────────────────────────────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────┐
2626
│ Filename │ Workflows │ Passed │ Failed │ Warnings │
2727
├──────────────────────────────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────┤
2828
│ ✓ case-insensitive-headers.arazzo.yaml │ 1 │ 1 │ - │ - │
2929
└──────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
30-
30+
3131
3232
"
3333
`;

__tests__/respect/cat-fact-api/__snapshots__/cat-fact-api.test.ts.snap

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`cats api test case 1`] = `
4-
"────────────────────────────────────────────────────────────────────────────────
5-
6-
Running workflow auto-cat.arazzo.yaml / get-breeds-workflow
7-
8-
✗ GET /breeds - step get-breeds-step
4+
"────────────────────────────────────────────────────────────────────────────────
5+
6+
Running workflow auto-cat.arazzo.yaml / get-breeds-workflow
7+
8+
✗ GET /breeds - step get-breeds-step
99
    ✓ status code check - $statusCode in [200]
1010
    ✓ content-type check
1111
    ✗ schema check
12-
13-
────────────────────────────────────────────────────────────────────────────────
14-
15-
Running workflow auto-cat.arazzo.yaml / get-fact-workflow
16-
17-
✓ GET /fact - step get-fact-step
12+
13+
────────────────────────────────────────────────────────────────────────────────
14+
15+
Running workflow auto-cat.arazzo.yaml / get-fact-workflow
16+
17+
✓ GET /fact - step get-fact-step
1818
    ✓ status code check - $statusCode in [200, 404]
1919
    ✓ content-type check
2020
    ✓ schema check
21-
22-
────────────────────────────────────────────────────────────────────────────────
23-
24-
Running workflow auto-cat.arazzo.yaml / get-facts-workflow
25-
26-
✗ GET /facts - step get-facts-step
21+
22+
────────────────────────────────────────────────────────────────────────────────
23+
24+
Running workflow auto-cat.arazzo.yaml / get-facts-workflow
25+
26+
✗ GET /facts - step get-facts-step
2727
    ✓ status code check - $statusCode in [200]
2828
    ✓ content-type check
2929
    ✗ schema check
30-
30+
3131
3232
  Failed tests info:
3333
3434
  Workflow name: get-breeds-workflow
35-
36-
    stepId - get-breeds-step
37-
    ✗ schema check
35+
36+
    stepId - get-breeds-step
37+
    ✗ schema check
3838
      
3939
      TYPE must be array
4040
      

__tests__/respect/consider-severity-in-next-step-execution/__snapshots__/consider-severity-in-next-step-execution.test.ts.snap

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`should not follow the default behavior to break and return if onFailure omitted with warn severity and continue execution of the next step 1`] = `
4-
"────────────────────────────────────────────────────────────────────────────────
5-
6-
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / first-workflow
7-
8-
✓ GET /museum-hours - step first-step
4+
"────────────────────────────────────────────────────────────────────────────────
5+
6+
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / first-workflow
7+
8+
✓ GET /museum-hours - step first-step
99
1010
    Request URL: https://redocly.com/_mock/demo/openapi/museum-api/museum-hours
1111
    Request Headers:
1212
      accept: application/json, application/problem+json
13-
      authorization: Basic Og==
14-
13+
      authorization: Basic Og==
14+
1515
1616
    Response status code: 200
1717
    Response time: <test> ms
@@ -68,24 +68,24 @@ exports[`should not follow the default behavior to break and return if onFailure
6868
       "timeOpen": "10:00",
6969
       "timeClose": "16:00"
7070
       }
71-
      ]
72-
71+
      ]
72+
7373
    ✓ success criteria check - $statusCode == 200
7474
    ✓ status code check - $statusCode in [200, 400, 404]
7575
    ✓ content-type check
7676
    ✓ schema check
77-
78-
────────────────────────────────────────────────────────────────────────────────
79-
80-
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / second-workflow
81-
82-
✗ GET /special-events - step list-events
77+
78+
────────────────────────────────────────────────────────────────────────────────
79+
80+
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / second-workflow
81+
82+
✗ GET /special-events - step list-events
8383
8484
    Request URL: https://redocly.com/_mock/demo/openapi/museum-api/special-events
8585
    Request Headers:
8686
      accept: application/json, application/problem+json
87-
      authorization: Basic Og==
88-
87+
      authorization: Basic Og==
88+
8989
9090
    Response status code: 200
9191
    Response time: <test> ms
@@ -207,23 +207,23 @@ exports[`should not follow the default behavior to break and return if onFailure
207207
       ],
208208
       "price": 5
209209
       }
210-
      ]
211-
210+
      ]
211+
212212
    ⚠ success criteria check - $statusCode == 201
213213
    ✓ status code check - $statusCode in [200, 400, 404]
214214
    ✓ content-type check
215215
    ✓ schema check
216-
217-
Running child workflow for the step call-first-workflow
218-
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / first-workflow
219-
220-
✓ GET /museum-hours - step first-step
216+
217+
Running child workflow for the step call-first-workflow
218+
Running workflow consider-severity-in-next-step-execution.arazzo.yaml / first-workflow
219+
220+
✓ GET /museum-hours - step first-step
221221
222222
    Request URL: https://redocly.com/_mock/demo/openapi/museum-api/museum-hours
223223
    Request Headers:
224224
      accept: application/json, application/problem+json
225-
      authorization: Basic Og==
226-
225+
      authorization: Basic Og==
226+
227227
228228
    Response status code: 200
229229
    Response time: <test> ms
@@ -280,37 +280,37 @@ exports[`should not follow the default behavior to break and return if onFailure
280280
       "timeOpen": "10:00",
281281
       "timeClose": "16:00"
282282
       }
283-
      ]
284-
283+
      ]
284+
285285
    ✓ success criteria check - $statusCode == 200
286286
    ✓ status code check - $statusCode in [200, 400, 404]
287287
    ✓ content-type check
288288
    ✓ schema check
289-
290-
289+
290+
291291
292292
  Failed tests info:
293293
294294
  Workflow name: second-workflow
295-
296-
    stepId - list-events
297-
    ⚠ success criteria check
295+
296+
    stepId - list-events
297+
    ⚠ success criteria check
298298
      Checking simple criteria: {"condition":"$statusCode == 201"}
299-
      
299+
      
300300
  Summary for consider-severity-in-next-step-execution.arazzo.yaml
301301
  
302302
  Workflows: 2 passed, 2 total
303303
  Steps: 3 passed, 1 warnings, 3 total
304304
  Checks: 12 passed, 1 warnings, 12 total
305-
  Time: <test>ms
306-
307-
305+
  Time: <test>ms
306+
307+
308308
┌──────────────────────────────────────────────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────┐
309309
│ Filename │ Workflows │ Passed │ Failed │ Warnings │
310310
├──────────────────────────────────────────────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────┤
311311
│ ✓ consider-severity-in-next-step-execution.arazzo.yaml │ 2 │ 2 │ - │ 1 │
312312
└──────────────────────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
313-
313+
314314
315315
"
316316
`;

__tests__/respect/implicit/__snapshots__/implicit.test.ts.snap

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`should implicitly add content type header based on requestBody.content field (the first one) if such does not specified 1`] = `
4-
"────────────────────────────────────────────────────────────────────────────────
5-
6-
Running workflow implicit.arazzo.yaml / implicit-content-type
7-
8-
✓ POST /activities - step post-activities
4+
"────────────────────────────────────────────────────────────────────────────────
5+
6+
Running workflow implicit.arazzo.yaml / implicit-content-type
7+
8+
✓ POST /activities - step post-activities
99
1010
    Request URL: https://api.impossiblemissionsforce.com/activities
1111
    Request Headers:
@@ -26,18 +26,18 @@ exports[`should implicitly add content type header based on requestBody.content
2626
       "path": "/security/network-security/",
2727
       "timestamp": "2023-02-19T09:31:27Z"
2828
       }
29-
      }
30-
29+
      }
30+
3131
3232
    Response status code: 204
3333
    Response time: <test> ms
3434
    Response Headers: <response headers test>
3535
    Response Body:
36-
      {}
37-
36+
      {}
37+
3838
    ✓ status code check - $statusCode in [204, 400]
39-
40-
✓ POST /quizzes - step post-quizzes
39+
40+
✓ POST /quizzes - step post-quizzes
4141
4242
    Request URL: https://api.impossiblemissionsforce.com/quizzes
4343
    Request Headers:
@@ -61,8 +61,8 @@ exports[`should implicitly add content type header based on requestBody.content
6161
       "correctAnswer": "b"
6262
       }
6363
       ]
64-
      }
65-
64+
      }
65+
6666
6767
    Response status code: 400
6868
    Response time: <test> ms
@@ -74,28 +74,28 @@ exports[`should implicitly add content type header based on requestBody.content
7474
       "status": 400,
7575
       "detail": "string",
7676
       "instance": "string"
77-
      }
78-
77+
      }
78+
7979
    ✓ success criteria check - $request.header.content-type == 'application/origi...
8080
    ✓ status code check - $statusCode in [201, 400]
8181
    ✓ content-type check
8282
    ✓ schema check
83-
84-
83+
84+
8585
  Summary for implicit.arazzo.yaml
8686
  
8787
  Workflows: 1 passed, 1 total
8888
  Steps: 2 passed, 2 total
8989
  Checks: 5 passed, 5 total
90-
  Time: <test>ms
91-
92-
90+
  Time: <test>ms
91+
92+
9393
┌──────────────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────┐
9494
│ Filename │ Workflows │ Passed │ Failed │ Warnings │
9595
├──────────────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────┤
9696
│ ✓ implicit.arazzo.yaml │ 1 │ 1 │ - │ - │
9797
└──────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
98-
98+
9999
100100
"
101101
`;

0 commit comments

Comments
 (0)