Skip to content

Commit 8d3bbd5

Browse files
committed
chore: update e2e test usage
1 parent a47989c commit 8d3bbd5

64 files changed

Lines changed: 2893 additions & 4577 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/e2e/respect/cafe-api-with-errors.yaml

Lines changed: 1360 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
arazzo: 1.0.1
2+
info:
3+
title: Redocly Cafe API Menu Search
4+
description: >-
5+
A part of the Redocly Cafe API test fixtures.
6+
Searches the cafe menu and exposes the search result as workflow outputs.
7+
version: 1.0.0
8+
9+
sourceDescriptions:
10+
- name: cafe-api
11+
type: openapi
12+
url: cafe-api.yaml
13+
14+
workflows:
15+
- workflowId: search-menu-items
16+
description: >-
17+
This workflow demonstrates how to search menu items in the cafe menu.
18+
steps:
19+
- stepId: search-menu
20+
description: >-
21+
Search menu items resolving request details with listMenuItems operationId from cafe-api.yaml description.
22+
operationId: listMenuItems
23+
parameters:
24+
- in: query
25+
name: search
26+
value: mermaid-treasure-latte
27+
successCriteria:
28+
- condition: $statusCode == 200
29+
outputs:
30+
total: $response.body#/page/total
31+
fullBody: $response.body
32+
outputs:
33+
total: $steps.search-menu.outputs.total
34+
stepFullBody: $steps.search-menu.outputs.fullBody

tests/e2e/respect/case-insensitive-headers/__snapshots__/case-insensitive-headers.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
exports[`should send in request and proceed case-insensitive headers in runtime expressions 1`] = `
44
"────────────────────────────────────────────────────────────────────────────────
55
6-
Running workflow case-insensitive-headers.arazzo.yaml / get-museum-hours
6+
Running workflow case-insensitive-headers.arazzo.yaml / get-menu-items
77
8-
✓ GET /museum-hours - step get-museum-hours
8+
✓ GET /menu - step get-menu-items
99
    ✓ success criteria check - $request.header.content-type == 'third'
1010
    ✓ success criteria check - $request.header.CammelCasedHeader == 'custom-heade...
11-
    ✓ success criteria check - $response.header.X-Content-Type-Options == 'nosnif...
12-
    ✓ status code check - $statusCode in [200, 400, 404]
11+
    ✓ success criteria check - $response.header.Content-TYPE == 'application/json...
12+
    ✓ status code check - $statusCode in [200, 400, 500]
1313
    ✓ content-type check
1414
    ✓ schema check
1515
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
arazzo: 1.0.1
22
info:
3-
title: Redocly Museum API
3+
title: Redocly Cafe API
44
description: >-
55
Testing case insensitive headers in workflows
66
version: 1.0.0
77

88
sourceDescriptions:
9-
- name: museum-api
9+
- name: cafe-api
1010
type: openapi
11-
url: ../museum-api.yaml
11+
url: ../cafe-api.yaml
1212

1313
workflows:
14-
- workflowId: get-museum-hours
14+
- workflowId: get-menu-items
1515
description: >-
16-
This workflow demonstrates how to get the museum opening hours and buy tickets.
17-
parameters:
18-
- in: header
19-
name: Authorization
20-
value: Basic Og==
16+
This workflow demonstrates how to list the cafe menu items.
2117
steps:
22-
- stepId: get-museum-hours
18+
- stepId: get-menu-items
2319
description: >-
24-
Get museum hours by resolving request details with getMuseumHours operationId from museum-api.yaml description.
20+
List menu items by resolving request details with listMenuItems operationId from cafe-api.yaml description.
2521
parameters:
2622
- in: header
2723
name: CammelCasedHeader
@@ -35,8 +31,8 @@ workflows:
3531
- in: header
3632
name: ContenT-TypE
3733
value: third
38-
operationId: museum-api.getMuseumHours
34+
operationId: cafe-api.listMenuItems
3935
successCriteria:
4036
- condition: $request.header.content-type == 'third'
41-
- condition: $request.header.CammelCasedHeader == 'custom-header' && $response.header.X-Frame-Options == 'deny'
42-
- condition: $response.header.X-Content-Type-Options == 'nosniff'
37+
- condition: $request.header.CammelCasedHeader == 'custom-header' && $response.header.X-Powered-By == 'Express'
38+
- condition: $response.header.Content-TYPE == 'application/json; charset=utf-8'

0 commit comments

Comments
 (0)