refactor: consolidate all JSON Schema 5 rendering code into json-schema-5 plugin (#9798)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @prettier
|
||||
*/
|
||||
|
||||
import Model from "../../../../src/core/components/model"
|
||||
import Model from "../../../../src/core/plugins/json-schema-5/components/model"
|
||||
|
||||
describe("getModelName", () => {
|
||||
const model = new Model()
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react"
|
||||
import Immutable, { List } from "immutable"
|
||||
import { Select, Input, TextArea } from "core/components/layout-utils"
|
||||
import { mount, render } from "enzyme"
|
||||
import * as JsonSchemaComponents from "core/components/json-schema-components"
|
||||
import * as JsonSchemaComponents from "core/plugins/json-schema-5/components/json-schema-components"
|
||||
|
||||
const components = {...JsonSchemaComponents, Select, Input, TextArea}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import ModelExample from "core/components/model-example"
|
||||
import ModelComponent from "core/components/model-wrapper"
|
||||
import ModelExample from "core/plugins/json-schema-5/components/model-example"
|
||||
import ModelComponent from "core/plugins/json-schema-5/components/model-wrapper"
|
||||
|
||||
describe("<ModelExample/>", function(){
|
||||
let components, props
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS, Map } from "immutable"
|
||||
import Models from "core/components/models"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
import ModelComponent from "core/components/model-wrapper"
|
||||
import Models from "core/plugins/json-schema-5/components/models"
|
||||
import ModelCollapse from "core/plugins/json-schema-5/components/model-collapse"
|
||||
import ModelComponent from "core/plugins/json-schema-5/components/model-wrapper"
|
||||
|
||||
describe("<Models/>", function(){
|
||||
const dummyComponent = () => null
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { List } from "immutable"
|
||||
import ObjectModel from "core/components/object-model"
|
||||
import ObjectModel from "core/plugins/json-schema-5/components/object-model"
|
||||
// import ModelExample from "core/components/model-example"
|
||||
import Immutable from "immutable"
|
||||
import Model from "core/components/model"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
import Model from "core/plugins/json-schema-5/components/model"
|
||||
import ModelCollapse from "core/plugins/json-schema-5/components/model-collapse"
|
||||
import Property from "core/components/property"
|
||||
// import { inferSchema } from "core/plugins/samples/fn"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import PrimitiveModel from "core/components/primitive-model"
|
||||
import ModelCollapse from "core/components/model-collapse"
|
||||
import PrimitiveModel from "core/plugins/json-schema-5/components/primitive-model"
|
||||
import ModelCollapse from "core/plugins/json-schema-5/components/model-collapse"
|
||||
|
||||
describe("<PrimitiveModel/>", function () {
|
||||
const dummyComponent = () => null
|
||||
@@ -6,7 +6,7 @@ import { shallow } from "enzyme"
|
||||
import { fromJS, List } from "immutable"
|
||||
|
||||
import Response from "core/components/response"
|
||||
import ModelExample from "core/components/model-example"
|
||||
import ModelExample from "core/plugins/json-schema-5/components/model-example"
|
||||
import {
|
||||
inferSchema,
|
||||
memoizedSampleFromSchema,
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react"
|
||||
import { mount } from "enzyme"
|
||||
import { fromJS } from "immutable"
|
||||
import SchemesContainer from "core/containers/schemes"
|
||||
import Schemes from "core/components/schemes"
|
||||
import SchemesContainer from "core/plugins/json-schema-5/containers/schemes"
|
||||
import Schemes from "core/plugins/json-schema-5/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 "core/components/schemes"
|
||||
import Schemes from "core/plugins/json-schema-5/components/schemes"
|
||||
|
||||
describe("<Schemes/>", function(){
|
||||
it("calls props.specActions.setScheme() when no currentScheme is selected", function(){
|
||||
Reference in New Issue
Block a user