meta: introduce Cypress end-to-end testing (via #4827)
* `test/e2e` -> `test/e2e-selenium` * add Cypress * ESLint fixes * MOAR cypress * `integration` -> `tests` * wire Cypress up to a hot e2e server * linter fixes * don't run in CI
This commit is contained in:
32
test/e2e-selenium/specs/refs/api1.yaml
Normal file
32
test/e2e-selenium/specs/refs/api1.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
description: |
|
||||
This is a test to show how model refererence from another file are failing.
|
||||
This file references api2.yaml. If you load this file first in the browser it fails.
|
||||
However, if you load api2.yaml first, then load this one it will work.
|
||||
version: 1.0.0
|
||||
title: API1 Test
|
||||
paths:
|
||||
'/test-api-1':
|
||||
get:
|
||||
summary: Api 1
|
||||
responses:
|
||||
'200':
|
||||
description: 'api 2 response'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/TestResponse'
|
||||
components:
|
||||
schemas:
|
||||
Api1Prop:
|
||||
type: string
|
||||
example: 'api1prop-value'
|
||||
|
||||
TestResponse:
|
||||
type: object
|
||||
properties:
|
||||
api1prop:
|
||||
$ref: '#/components/schemas/Api1Prop'
|
||||
api2prop:
|
||||
$ref: 'api2.yaml#/components/schemas/Api2Prop'
|
||||
32
test/e2e-selenium/specs/refs/api2.yaml
Normal file
32
test/e2e-selenium/specs/refs/api2.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
description: |
|
||||
This is a test to show how model refererence from another file are failing.
|
||||
This file is referenced api1.yaml. If you load api1.yaml first in the browser it fails.
|
||||
However, if you load this file first, then load api1.yaml it will work.
|
||||
version: 1.0.0
|
||||
title: API2 Test
|
||||
paths:
|
||||
'/test-api-2':
|
||||
get:
|
||||
summary: Api 2
|
||||
responses:
|
||||
'200':
|
||||
description: api 2 response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/TestResponse2'
|
||||
components:
|
||||
schemas:
|
||||
Api2Prop:
|
||||
type: string
|
||||
description: this is an api2prop
|
||||
example: 'api1prop-value'
|
||||
|
||||
TestResponse2:
|
||||
type: object
|
||||
description: This is a test prop
|
||||
properties:
|
||||
api2prop:
|
||||
$ref: '#/components/schemas/Api2Prop'
|
||||
Reference in New Issue
Block a user