diff --git a/cypress/integration/stoplight-project.ts b/cypress/integration/stoplight-project.ts index 2b28bf13e..15464cf1d 100644 --- a/cypress/integration/stoplight-project.ts +++ b/cypress/integration/stoplight-project.ts @@ -59,11 +59,31 @@ describe('Stoplight component', () => { }); it('invokes TryIt request', () => { - loadCreateTodoPage(); + loadListTodosPage(); + + cy.intercept( + { + method: 'GET', + hostname: 'todos.stoplight.io', + pathname: '/**', + https: true, + }, + { + statusCode: 200, + headers: { + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Headers': 'content-type', + 'Content-Type': 'application/json', + }, + body: '"hello world"', + }, + ).as('todos-api'); + cy.findByRole('button', { name: /send api request/i }).click(); - // Temporarily changing response code as the requested api is unavailable - cy.findByText('500 Internal Server Error').should('exist'); + cy.waitFor('@todos-api'); + + cy.findByText('hello world').should('exist'); }); it('mocks response correctly', () => { diff --git a/packages/elements-core/package.json b/packages/elements-core/package.json index 0df9ff2ac..1d6d335b3 100644 --- a/packages/elements-core/package.json +++ b/packages/elements-core/package.json @@ -1,6 +1,6 @@ { "name": "@stoplight/elements-core", - "version": "8.0.2", + "version": "8.0.3", "sideEffects": [ "web-components.min.js", "src/web-components/**", @@ -57,7 +57,7 @@ ] }, "dependencies": { - "@stoplight/http-spec": "^7.0.1", + "@stoplight/http-spec": "^7.0.2", "@stoplight/json": "^3.18.1", "@stoplight/json-schema-ref-parser": "^9.0.5", "@stoplight/json-schema-sampler": "0.2.3", @@ -75,7 +75,7 @@ "httpsnippet-lite": "^3.0.5", "jotai": "1.3.9", "json-schema": "^0.4.0", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "nanoid": "^3.1.32", "prop-types": "^15.7.2", "react-query": "^3.34.19", @@ -98,7 +98,7 @@ "@types/enzyme": "3.x.x", "@types/enzyme-adapter-react-16": "1.x.x", "@types/json-schema": "^7.0.11", - "@types/lodash": "^4.14.181", + "@types/lodash": "^4.14.202", "@types/prop-types": "^15.7.5", "@types/react": "16.9.56", "@types/react-dom": "16.9.12", diff --git a/packages/elements-dev-portal/package.json b/packages/elements-dev-portal/package.json index ac04b69a6..303f48000 100644 --- a/packages/elements-dev-portal/package.json +++ b/packages/elements-dev-portal/package.json @@ -1,6 +1,6 @@ { "name": "@stoplight/elements-dev-portal", - "version": "2.0.1", + "version": "2.0.2", "description": "UI components for composing beautiful developer documentation.", "keywords": [], "sideEffects": [ @@ -64,13 +64,13 @@ ] }, "dependencies": { - "@stoplight/elements-core": "~8.0.1", + "@stoplight/elements-core": "~8.0.3", "@stoplight/markdown-viewer": "^5.5.0", "@stoplight/mosaic": "^1.46.1", "@stoplight/path": "^1.3.2", "@stoplight/types": "^14.0.0", "classnames": "^2.2.6", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "react-query": "^3.34.19", "react-router-dom": "^5.2.0", "use-debounce": "^6.0.1" @@ -83,7 +83,7 @@ "@testing-library/react": "^11.1.1", "@testing-library/react-hooks": "^3.4.2", "@testing-library/user-event": "^12.2.0", - "@types/lodash": "^4.14.181", + "@types/lodash": "4.14.202", "@types/react": "16.9.56", "@types/react-dom": "16.9.12", "@types/react-router-dom": "^5.3.3", diff --git a/packages/elements/package.json b/packages/elements/package.json index 17185b595..3de074fbe 100644 --- a/packages/elements/package.json +++ b/packages/elements/package.json @@ -1,6 +1,6 @@ { "name": "@stoplight/elements", - "version": "8.0.2", + "version": "8.0.3", "description": "UI components for composing beautiful developer documentation.", "keywords": [], "sideEffects": [ @@ -62,15 +62,15 @@ ] }, "dependencies": { - "@stoplight/elements-core": "~8.0.2", - "@stoplight/http-spec": "^7.0.1", + "@stoplight/elements-core": "~8.0.3", + "@stoplight/http-spec": "^7.0.2", "@stoplight/json": "^3.18.1", "@stoplight/mosaic": "^1.46.1", "@stoplight/types": "^14.1.1", "@stoplight/yaml": "^4.2.3", "classnames": "^2.2.6", "file-saver": "^2.0.5", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "react-query": "^3.34.19", "react-router-dom": "^5.2.0" }, diff --git a/yarn.lock b/yarn.lock index 9e2862036..8dfd674e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4035,10 +4035,10 @@ tslib "^2.6.2" type-is "^1.6.18" -"@stoplight/http-spec@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@stoplight/http-spec/-/http-spec-7.0.1.tgz#6802f3e426940e02d88126fc486237e73541ee81" - integrity sha512-9O34o331tDMwHEHEc0N5Mh39cvVtioono46SyMy/BWQwAhuVyVfzHZxlBHepe0grIDcTrJxsb8iARGi86luwoQ== +"@stoplight/http-spec@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@stoplight/http-spec/-/http-spec-7.0.2.tgz#010f10d1f721b0f6265ae3a851d0f41f62df0875" + integrity sha512-4DvT0w5goAhLxVbHfdzkMqGcTdi9bU4LmBrYNrZBOCFV4JPAHRERSBdI7F7n/MfgVvzxWb3Vftrh6pCgTd/+Jg== dependencies: "@stoplight/json" "^3.18.1" "@stoplight/json-schema-generator" "1.0.2" @@ -4047,9 +4047,7 @@ "@types/swagger-schema-official" "~2.0.22" "@types/type-is" "^1.6.3" fnv-plus "^1.3.1" - lodash.isequalwith "^4.4.0" - lodash.pick "^4.4.0" - lodash.pickby "^4.6.0" + lodash "^4.17.21" openapi3-ts "^2.0.2" postman-collection "^4.1.2" tslib "^2.6.2" @@ -5743,6 +5741,11 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/lodash@4.14.202", "@types/lodash@^4.14.202": + version "4.14.202" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" + integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== + "@types/lodash@^4.14.167", "@types/lodash@^4.14.181": version "4.14.185" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.185.tgz#c9843f5a40703a8f5edfd53358a58ae729816908"