feat: expose plugins and presets on SwaggerUI global symbol (#9189)
Part of this commit is also: - complete plugins consolidation - complete presets consolidation - build system consolidation Refs #9188
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
|
||||
describe("UI-3199: Sanitized Markdown causing code examples to be double escaped", function(){
|
||||
it("should single-escape quotes", function(){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
|
||||
describe("UI-3279: Empty Markdown inputs causing bare `undefined` in output", function(){
|
||||
it("should return no text for `null` as source input", function(){
|
||||
|
||||
@@ -5,7 +5,7 @@ import React from "react"
|
||||
import { List, fromJS } from "immutable"
|
||||
import { render } from "enzyme"
|
||||
|
||||
import ParameterRow from "components/parameter-row"
|
||||
import ParameterRow from "core/components/parameter-row"
|
||||
import {
|
||||
memoizedSampleFromSchema,
|
||||
memoizedCreateXMLExample,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import FilterContainer from "containers/filter"
|
||||
import { Col } from "components/layout-utils"
|
||||
import FilterContainer from "core/containers/filter"
|
||||
import { Col } from "core/components/layout-utils"
|
||||
|
||||
describe("<FilterContainer/>", function(){
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import InfoContainer from "containers/info"
|
||||
import InfoContainer from "core/containers/info"
|
||||
|
||||
describe("<InfoContainer/>", function () {
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import React from "react"
|
||||
import Immutable, { List } from "immutable"
|
||||
import { Select, Input, TextArea } from "components/layout-utils"
|
||||
import { Select, Input, TextArea } from "core/components/layout-utils"
|
||||
import { mount, render } from "enzyme"
|
||||
import * as JsonSchemaComponents from "core/json-schema-components"
|
||||
import { JsonSchemaForm } from "core/json-schema-components"
|
||||
import * as JsonSchemaComponents from "core/components/json-schema-components"
|
||||
|
||||
const components = {...JsonSchemaComponents, Select, Input, TextArea}
|
||||
|
||||
@@ -13,7 +12,7 @@ const getComponentStub = (name) => {
|
||||
return null
|
||||
}
|
||||
|
||||
describe("<JsonSchemaForm/>", function(){
|
||||
describe("<JsonSchemaComponents.JsonSchemaForm/>", function(){
|
||||
describe("strings", function() {
|
||||
it("should render the correct options for a string enum parameter", function(){
|
||||
|
||||
@@ -29,7 +28,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("option").length).toEqual(3)
|
||||
@@ -53,7 +52,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
disabled: true
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.attr("disabled")).toEqual("disabled")
|
||||
})
|
||||
@@ -74,7 +73,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("select option").length).toEqual(2)
|
||||
@@ -96,7 +95,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("select option").length).toEqual(3)
|
||||
@@ -120,7 +119,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("select option").length).toEqual(2)
|
||||
@@ -143,7 +142,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("select option").length).toEqual(3)
|
||||
@@ -168,7 +167,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.get(0).name).toEqual("select")
|
||||
expect(wrapper.find("select option").length).toEqual(1)
|
||||
@@ -200,7 +199,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
})
|
||||
}
|
||||
|
||||
let wrapper = mount(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = mount(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
updateQueue.forEach(newProps => wrapper.setProps(newProps))
|
||||
|
||||
@@ -223,7 +222,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
}
|
||||
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.length).toEqual(1)
|
||||
expect(wrapper.get(0).name).toEqual("input")
|
||||
@@ -246,7 +245,7 @@ describe("<JsonSchemaForm/>", function(){
|
||||
}
|
||||
|
||||
|
||||
let wrapper = render(<JsonSchemaForm {...props}/>)
|
||||
let wrapper = render(<JsonSchemaComponents.JsonSchemaForm {...props}/>)
|
||||
|
||||
expect(wrapper.length).toEqual(1)
|
||||
expect(wrapper.get(0).name).toEqual("input")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react"
|
||||
import { fromJSOrdered } from "core/utils"
|
||||
import { shallow } from "enzyme"
|
||||
import Curl from "components/curl"
|
||||
import LiveResponse from "components/live-response"
|
||||
import ResponseBody from "components/response-body"
|
||||
import Curl from "core/components/curl"
|
||||
import LiveResponse from "core/components/live-response"
|
||||
import ResponseBody from "core/components/response-body"
|
||||
|
||||
describe("<LiveResponse/>", function(){
|
||||
let request = fromJSOrdered({
|
||||
@@ -49,7 +49,7 @@ describe("<LiveResponse/>", function(){
|
||||
})
|
||||
|
||||
let mutatedRequestForSpy = jest.fn().mockImplementation(function(mutatedRequest) { return mutatedRequest })
|
||||
let requestForSpy = jest.fn().mockImplementation(function(request) { return request })
|
||||
let requestForSpy = jest.fn().mockImplementation(function(request) { return request })
|
||||
|
||||
let components = {
|
||||
curl: Curl,
|
||||
@@ -57,7 +57,7 @@ describe("<LiveResponse/>", function(){
|
||||
}
|
||||
|
||||
let props = {
|
||||
response: response,
|
||||
response: response,
|
||||
specSelectors: {
|
||||
mutatedRequestFor: mutatedRequestForSpy,
|
||||
requestFor: requestForSpy,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "corePlugins/oas3/wrap-components/markdown.jsx"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "core/plugins/oas3/wrap-components/markdown.jsx"
|
||||
|
||||
describe("Markdown component", function () {
|
||||
describe("Swagger 2.0", function () {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import ModelExample from "components/model-example"
|
||||
import ModelComponent from "components/model-wrapper"
|
||||
import ModelExample from "core/components/model-example"
|
||||
import ModelComponent from "core/components/model-wrapper"
|
||||
|
||||
describe("<ModelExample/>", function(){
|
||||
let components, props
|
||||
|
||||
|
||||
let exampleSelectedTestInputs = [
|
||||
{ defaultModelRendering: "model", isExecute: true },
|
||||
{ defaultModelRendering: "example", isExecute: true },
|
||||
@@ -13,7 +13,7 @@ describe("<ModelExample/>", function(){
|
||||
{ defaultModelRendering: "othervalue", isExecute: true },
|
||||
{ defaultModelRendering: "othervalue", isExecute: false }
|
||||
]
|
||||
|
||||
|
||||
let modelSelectedTestInputs = [
|
||||
{ defaultModelRendering: "model", isExecute: false }
|
||||
]
|
||||
@@ -22,7 +22,7 @@ describe("<ModelExample/>", function(){
|
||||
components = {
|
||||
ModelWrapper: ModelComponent
|
||||
}
|
||||
|
||||
|
||||
props = {
|
||||
getComponent: (c) => {
|
||||
return components[c]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS, Map } from "immutable"
|
||||
import Models from "components/models"
|
||||
import ModelCollapse from "components/model-collapse"
|
||||
import ModelComponent from "components/model-wrapper"
|
||||
import Models from "core/components/models"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
import ModelComponent from "core/components/model-wrapper"
|
||||
|
||||
describe("<Models/>", function(){
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { List } from "immutable"
|
||||
import ObjectModel from "components/object-model"
|
||||
// import ModelExample from "components/model-example"
|
||||
import ObjectModel from "core/components/object-model"
|
||||
// import ModelExample from "core/components/model-example"
|
||||
import Immutable from "immutable"
|
||||
import Model from "components/model"
|
||||
import ModelCollapse from "components/model-collapse"
|
||||
import Property from "components/property"
|
||||
// import { inferSchema } from "corePlugins/samples/fn"
|
||||
import Model from "core/components/model"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
import Property from "core/components/property"
|
||||
// import { inferSchema } from "core/plugins/samples/fn"
|
||||
|
||||
describe("<ObjectModel />", function() {
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import OnlineValidatorBadge from "components/online-validator-badge"
|
||||
import OnlineValidatorBadge from "core/components/online-validator-badge"
|
||||
|
||||
describe("<OnlineValidatorBadge/>", function () {
|
||||
it("should render a validator link and image correctly for the default validator", function () {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import OperationTag from "components/operation-tag"
|
||||
import OperationTag from "core/components/operation-tag"
|
||||
import Im from "immutable"
|
||||
import { Link } from "components/layout-utils"
|
||||
import { Link } from "core/components/layout-utils"
|
||||
|
||||
describe("<OperationTag/>", function(){
|
||||
it("render externalDocs URL for swagger v2", function(){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import Operation from "components/operation"
|
||||
import Operation from "core/components/operation"
|
||||
|
||||
describe("<Operation/>", function(){
|
||||
it.skip("blanket tests", function(){
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import DeepLink from "components/deep-link"
|
||||
import Operations from "components/operations"
|
||||
import {Collapse} from "components/layout-utils"
|
||||
import DeepLink from "core/components/deep-link"
|
||||
import Operations from "core/components/operations"
|
||||
import {Collapse} from "core/components/layout-utils"
|
||||
|
||||
const components = {
|
||||
Collapse,
|
||||
|
||||
@@ -5,7 +5,7 @@ import React from "react"
|
||||
import { List, fromJS } from "immutable"
|
||||
import { render } from "enzyme"
|
||||
|
||||
import ParameterRow from "components/parameter-row"
|
||||
import ParameterRow from "core/components/parameter-row"
|
||||
import {
|
||||
memoizedSampleFromSchema,
|
||||
memoizedCreateXMLExample,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import PrimitiveModel from "components/primitive-model"
|
||||
import ModelCollapse from "components/model-collapse"
|
||||
import PrimitiveModel from "core/components/primitive-model"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
|
||||
describe("<PrimitiveModel/>", function () {
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import ResponseBody from "components/response-body"
|
||||
import ResponseBody from "core/components/response-body"
|
||||
|
||||
describe("<ResponseBody />", function () {
|
||||
const highlightCodeComponent = () => null
|
||||
|
||||
@@ -5,8 +5,8 @@ import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS, List } from "immutable"
|
||||
|
||||
import Response from "components/response"
|
||||
import ModelExample from "components/model-example"
|
||||
import Response from "core/components/response"
|
||||
import ModelExample from "core/components/model-example"
|
||||
import {
|
||||
inferSchema,
|
||||
memoizedSampleFromSchema,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import SchemesContainer from "containers/schemes"
|
||||
import Schemes from "components/schemes"
|
||||
import { Col } from "components/layout-utils"
|
||||
import SchemesContainer from "core/containers/schemes"
|
||||
import Schemes from "core/components/schemes"
|
||||
import { Col } from "core/components/layout-utils"
|
||||
|
||||
describe("<SchemesContainer/>", function(){
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import Schemes from "components/schemes"
|
||||
import Schemes from "core/components/schemes"
|
||||
|
||||
describe("<Schemes/>", function(){
|
||||
it("calls props.specActions.setScheme() when no currentScheme is selected", function(){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import VersionPragmaFilter from "components/version-pragma-filter"
|
||||
import VersionPragmaFilter from "core/components/version-pragma-filter"
|
||||
|
||||
describe("<VersionPragmaFilter/>", function(){
|
||||
it("renders children for a Swagger 2 definition", function(){
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import getParameterSchema from "../../../../src/helpers/get-parameter-schema"
|
||||
import getParameterSchema from "../../../../src/core/utils/get-parameter-schema"
|
||||
|
||||
describe("getParameterSchema", () => {
|
||||
it("should return an empty Map when given no parameters", () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
authorizeOauth2WithPersistOption,
|
||||
logoutWithPersistOption,
|
||||
persistAuthorizationIfNeeded
|
||||
} from "corePlugins/auth/actions"
|
||||
} from "core/plugins/auth/actions"
|
||||
import {authorizeAccessCodeWithBasicAuthentication, authPopup} from "../../../../../src/core/plugins/auth/actions"
|
||||
|
||||
describe("auth plugin - actions", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loaded } from "corePlugins/auth/configs-extensions/wrap-actions"
|
||||
import { loaded } from "core/plugins/auth/configs-extensions/wrap-actions"
|
||||
|
||||
describe("loaded hook", () => {
|
||||
describe("authorization data restoration", () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import { preauthorizeBasic, preauthorizeApiKey } from "corePlugins/auth"
|
||||
import { authorize } from "corePlugins/auth/actions"
|
||||
import { preauthorizeBasic, preauthorizeApiKey } from "core/plugins/auth"
|
||||
import { authorize } from "core/plugins/auth/actions"
|
||||
|
||||
const S2_SYSTEM = {
|
||||
authActions: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import { definitionsToAuthorize, definitionsForRequirements } from "corePlugins/auth/selectors"
|
||||
import { definitionsToAuthorize, definitionsForRequirements } from "core/plugins/auth/selectors"
|
||||
|
||||
describe("auth plugin - selectors", () => {
|
||||
describe("definitionsToAuthorize", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { execute } from "corePlugins/auth/spec-extensions/wrap-actions"
|
||||
import { execute } from "core/plugins/auth/spec-extensions/wrap-actions"
|
||||
|
||||
describe("spec plugin - actions", function(){
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @prettier
|
||||
*/
|
||||
import { fromJS } from "immutable"
|
||||
import { authorize, logout } from "corePlugins/auth/wrap-actions"
|
||||
import { authorize, logout } from "core/plugins/auth/wrap-actions"
|
||||
|
||||
describe("Cookie based apiKey persistence in document.cookie", () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { downloadConfig } from "corePlugins/configs/spec-actions"
|
||||
import { downloadConfig } from "core/plugins/configs/spec-actions"
|
||||
|
||||
describe("configs plugin - actions", () => {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Map, List } from "immutable"
|
||||
import { transform } from "corePlugins/err/error-transformers/transformers/not-of-type"
|
||||
import { transform } from "core/plugins/err/error-transformers/transformers/not-of-type"
|
||||
|
||||
describe("err plugin - tranformers - not of type", () => {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-useless-escape */
|
||||
import { fromJS } from "immutable"
|
||||
import { transform } from "corePlugins/err/error-transformers/transformers/parameter-oneof"
|
||||
import { transform } from "core/plugins/err/error-transformers/transformers/parameter-oneof"
|
||||
|
||||
describe.skip("err plugin - tranformers - parameter oneof", () => {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Map } from "immutable"
|
||||
import opsFilter from "corePlugins/filter/opsFilter"
|
||||
import opsFilter from "core/plugins/filter/opsFilter"
|
||||
|
||||
describe("opsFilter", function() {
|
||||
const taggedOps = Map([["pet"], ["store"], ["user"]])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromJS } from "immutable"
|
||||
import { isOAS30, isSwagger2 } from "corePlugins/oas3/helpers"
|
||||
import { isOAS30, isSwagger2 } from "core/plugins/oas3/helpers"
|
||||
|
||||
const isOAS3Shorthand = (version) => isOAS30(fromJS({
|
||||
openapi: version
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import reducer from "corePlugins/oas3/reducers"
|
||||
import reducer from "core/plugins/oas3/reducers"
|
||||
|
||||
describe("oas3 plugin - reducer", function () {
|
||||
describe("SET_REQUEST_BODY_VALIDATE_ERROR", () => {
|
||||
@@ -518,13 +518,13 @@ describe("oas3 plugin - reducer", function () {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const result = clearRequestBodyValue(state, {
|
||||
payload: {
|
||||
pathMethod: ["/pet", "post"],
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const expectedResult = {
|
||||
requestData: {
|
||||
"/pet": {
|
||||
@@ -535,7 +535,7 @@ describe("oas3 plugin - reducer", function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
expect(result.toJS()).toEqual(expectedResult)
|
||||
})
|
||||
})
|
||||
@@ -556,13 +556,13 @@ describe("oas3 plugin - reducer", function () {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const result = clearRequestBodyValue(state, {
|
||||
payload: {
|
||||
pathMethod: ["/pet", "post"],
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const expectedResult = {
|
||||
requestData: {
|
||||
"/pet": {
|
||||
@@ -573,7 +573,7 @@ describe("oas3 plugin - reducer", function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
expect(result.toJS()).toEqual(expectedResult)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import { mount } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import ServersContainer from "core/plugins/oas3/components/servers-container"
|
||||
import Servers from "core/plugins/oas3/components/servers"
|
||||
import { Col } from "components/layout-utils"
|
||||
import { Col } from "core/components/layout-utils"
|
||||
|
||||
describe("<ServersContainer/>", function(){
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import {
|
||||
serverVariableValue,
|
||||
serverVariables,
|
||||
serverEffectiveValue
|
||||
} from "corePlugins/oas3/selectors"
|
||||
} from "core/plugins/oas3/selectors"
|
||||
|
||||
import reducers from "corePlugins/oas3/reducers"
|
||||
import reducers from "core/plugins/oas3/reducers"
|
||||
|
||||
import {
|
||||
setSelectedServer,
|
||||
setServerVariableValue,
|
||||
} from "corePlugins/oas3/actions"
|
||||
} from "core/plugins/oas3/actions"
|
||||
|
||||
describe("OAS3 plugin - state", function() {
|
||||
describe("action + reducer + selector integration", function() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { fromJS, Map } from "immutable"
|
||||
import {
|
||||
definitionsToAuthorize
|
||||
} from "corePlugins/oas3/auth-extensions/wrap-selectors"
|
||||
} from "core/plugins/oas3/auth-extensions/wrap-selectors"
|
||||
|
||||
describe("oas3 plugin - auth extensions - wrapSelectors", function(){
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromJS } from "immutable"
|
||||
import { definitions } from "corePlugins/oas3/spec-extensions/wrap-selectors"
|
||||
import { definitions } from "core/plugins/oas3/spec-extensions/wrap-selectors"
|
||||
|
||||
describe("oas3 plugin - spec extensions - wrapSelectors", function(){
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fromJS } from "immutable"
|
||||
import { createXMLExample, sampleFromSchema, memoizedCreateXMLExample, memoizedSampleFromSchema } from "corePlugins/samples/fn/index"
|
||||
import { createXMLExample, sampleFromSchema, memoizedCreateXMLExample, memoizedSampleFromSchema } from "core/plugins/samples/fn/index"
|
||||
|
||||
describe("sampleFromSchema", () => {
|
||||
it("handles Immutable.js objects for nested schemas", function () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import { execute, executeRequest, changeParamByIdentity, updateEmptyParamInclusion } from "corePlugins/spec/actions"
|
||||
import { execute, executeRequest, changeParamByIdentity, updateEmptyParamInclusion } from "core/plugins/spec/actions"
|
||||
|
||||
describe("spec plugin - actions", function(){
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { fromJS } from "immutable"
|
||||
import reducer from "corePlugins/spec/reducers"
|
||||
import reducer from "core/plugins/spec/reducers"
|
||||
|
||||
describe("spec plugin - reducer", function(){
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
consumesOptionsFor,
|
||||
taggedOperations,
|
||||
isMediaTypeSchemaPropertiesEqual
|
||||
} from "corePlugins/spec/selectors"
|
||||
} from "core/plugins/spec/selectors"
|
||||
|
||||
import Petstore from "./assets/petstore.json"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { loaded } from "corePlugins/swagger-js/configs-wrap-actions"
|
||||
import { loaded } from "core/plugins/swagger-client/configs-wrap-actions"
|
||||
|
||||
describe("swagger-js plugin - withCredentials", () => {
|
||||
describe("swagger-client plugin - withCredentials", () => {
|
||||
it("should have no effect by default", () => {
|
||||
const system = {
|
||||
fn: {
|
||||
@@ -34,7 +34,7 @@ describe("swagger-js plugin - withCredentials", () => {
|
||||
expect(oriExecute.mock.calls.length).toBe(1)
|
||||
expect(system.fn.fetch.withCredentials).toBe(true)
|
||||
})
|
||||
|
||||
|
||||
it("should allow setting flag to false via config", () => {
|
||||
const system = {
|
||||
fn: {
|
||||
@@ -52,7 +52,7 @@ describe("swagger-js plugin - withCredentials", () => {
|
||||
expect(oriExecute.mock.calls.length).toBe(1)
|
||||
expect(system.fn.fetch.withCredentials).toBe(false)
|
||||
})
|
||||
|
||||
|
||||
it("should allow setting flag to true via config as string", () => {
|
||||
// for query string config
|
||||
const system = {
|
||||
@@ -71,7 +71,7 @@ describe("swagger-js plugin - withCredentials", () => {
|
||||
expect(oriExecute.mock.calls.length).toBe(1)
|
||||
expect(system.fn.fetch.withCredentials).toBe(true)
|
||||
})
|
||||
|
||||
|
||||
it("should allow setting flag to false via config as string", () => {
|
||||
// for query string config
|
||||
const system = {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import Info, { InfoUrl } from "components/info"
|
||||
import Contact from "components/contact"
|
||||
import License from "components/license"
|
||||
import { Link } from "components/layout-utils"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import Info, { InfoUrl } from "core/components/info"
|
||||
import Contact from "core/components/contact"
|
||||
import License from "core/components/license"
|
||||
import { Link } from "core/components/layout-utils"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
|
||||
describe("<Info/> Anchor Target Safety", function(){
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import { Link } from "components/layout-utils"
|
||||
import { Link } from "core/components/layout-utils"
|
||||
|
||||
describe("<Link/> Anchor Target Safety", function () {
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "corePlugins/oas3/wrap-components/markdown.jsx"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "core/plugins/oas3/wrap-components/markdown.jsx"
|
||||
|
||||
describe("Markdown Link Anchor Safety", function () {
|
||||
describe("Swagger 2.0", function () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import OnlineValidatorBadge from "components/online-validator-badge"
|
||||
import OnlineValidatorBadge from "core/components/online-validator-badge"
|
||||
|
||||
describe("<OnlineValidatorBadge/> Anchor Target Safety", function () {
|
||||
it("should render a validator link with safe `rel` attributes", function () {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import Info from "components/info"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import Info from "core/components/info"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
|
||||
describe("<Info/> Sanitization", function(){
|
||||
const dummyComponent = () => null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { render } from "enzyme"
|
||||
import Markdown from "components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "corePlugins/oas3/wrap-components/markdown.jsx"
|
||||
import Markdown from "core/components/providers/markdown"
|
||||
import { Markdown as OAS3Markdown } from "core/plugins/oas3/wrap-components/markdown.jsx"
|
||||
|
||||
describe("Markdown Script Sanitization", function() {
|
||||
describe("Swagger 2.0", function() {
|
||||
|
||||
Reference in New Issue
Block a user