From fea8e2406a953619f8743e800257514cd254a979 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Wed, 26 May 2021 19:33:47 +0300 Subject: [PATCH] chore: improve demo --- demo/openapi.yaml | 13 ++++++++----- e2e/integration/menu.e2e.ts | 2 +- .../__snapshots__/loadAndBundleSpec.test.ts.snap | 15 ++++++++++----- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/demo/openapi.yaml b/demo/openapi.yaml index e4861890..1b363c55 100644 --- a/demo/openapi.yaml +++ b/demo/openapi.yaml @@ -61,6 +61,8 @@ externalDocs: tags: - name: pet description: Everything about your Pets + - name: webhooks + description: Everything about your Webhooks - name: store description: Access to Petstore orders - name: user @@ -78,6 +80,7 @@ x-tagGroups: tags: - pet - store + - webhooks - name: User Management tags: - user @@ -896,13 +899,13 @@ paths: description: successful operation components: pathItems: - catsWebhook: + webhooks: put: summary: Get a cat details after update description: Get a cat details after update operationId: updatedCat tags: - - pet + - webhooks requestBody: description: Information about cat in the system content: @@ -917,7 +920,7 @@ components: description: Info about new cat operationId: createdCat tags: - - pet + - webhooks requestBody: description: Information about cat in the system content: @@ -1231,7 +1234,7 @@ webhooks: description: Information about a new pet in the systems operationId: newPet tags: - - pet + - webhooks requestBody: content: application/json: @@ -1241,6 +1244,6 @@ webhooks: "200": description: Return a 200 status to indicate that the data was received successfully myWebhook: - $ref: '#/components/pathItems/catsWebhook' + $ref: '#/components/pathItems/webhooks' description: Overriding description summary: Overriding summary \ No newline at end of file diff --git a/e2e/integration/menu.e2e.ts b/e2e/integration/menu.e2e.ts index 41ecd79c..89ac53d9 100644 --- a/e2e/integration/menu.e2e.ts +++ b/e2e/integration/menu.e2e.ts @@ -6,7 +6,7 @@ describe('Menu', () => { it('should have valid items count', () => { cy.get('.menu-content') .find('li') - .should('have.length', 36); + .should('have.length', 37); }); it('should sync active menu items while scroll', () => { diff --git a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap index c9c28b5c..3feca57e 100644 --- a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap +++ b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap @@ -14,7 +14,7 @@ Object { }, }, "pathItems": Object { - "catsWebhook": Object { + "webhooks": Object { "post": Object { "description": "Info about new cat", "operationId": "createdCat", @@ -35,7 +35,7 @@ Object { }, "summary": "Create new cat", "tags": Array [ - "pet", + "webhooks", ], }, "put": Object { @@ -58,7 +58,7 @@ Object { }, "summary": "Get a cat details after update", "tags": Array [ - "pet", + "webhooks", ], }, }, @@ -1784,6 +1784,10 @@ culpa qui officia deserunt mollit anim id est laborum. "description": "Everything about your Pets", "name": "pet", }, + Object { + "description": "Everything about your Webhooks", + "name": "webhooks", + }, Object { "description": "Access to Petstore orders", "name": "store", @@ -1807,7 +1811,7 @@ culpa qui officia deserunt mollit anim id est laborum. ], "webhooks": Object { "myWebhook": Object { - "$ref": "#/components/pathItems/catsWebhook", + "$ref": "#/components/pathItems/webhooks", "description": "Overriding description", "summary": "Overriding summary", }, @@ -1831,7 +1835,7 @@ culpa qui officia deserunt mollit anim id est laborum. }, "summary": "New pet", "tags": Array [ - "pet", + "webhooks", ], }, }, @@ -1842,6 +1846,7 @@ culpa qui officia deserunt mollit anim id est laborum. "tags": Array [ "pet", "store", + "webhooks", ], }, Object {