rename all components to new namespace (#1515)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
(
|
||||
<span v-for="(field, index) in fieldArgs" :key="index">
|
||||
{{ field.name }}:
|
||||
<typelink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<GraphqlTypeLink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<span v-if="index !== fieldArgs.length - 1"> , </span>
|
||||
</span>
|
||||
) </span
|
||||
>:
|
||||
<typelink :gqlType="gqlField.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<GraphqlTypeLink :gqlType="gqlField.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
</div>
|
||||
<div class="mt-2 text-fgLightColor field-desc" v-if="gqlField.description">
|
||||
{{ gqlField.description }}
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="px-4 border-l-2 border-acColor">
|
||||
<div v-for="(field, index) in fieldArgs" :key="index">
|
||||
{{ field.name }}:
|
||||
<typelink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<GraphqlTypeLink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<div class="mt-2 text-fgLightColor field-desc" v-if="field.description">
|
||||
{{ field.description }}
|
||||
</div>
|
||||
@@ -12,19 +12,19 @@
|
||||
<div v-if="interfaces.length > 0" class="mb-2">
|
||||
<h5>{{ $t("interfaces") }}</h5>
|
||||
<div v-for="gqlInterface in interfaces" :key="gqlInterface.name" class="m-2 ml-4">
|
||||
<typelink :gqlType="gqlInterface" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<GraphqlTypeLink :gqlType="gqlInterface" :jumpTypeCallback="jumpTypeCallback" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="children.length > 0" class="mb-2">
|
||||
<h5>{{ $t("children") }}</h5>
|
||||
<div v-for="child in children" :key="child.name" class="m-2 ml-4">
|
||||
<typelink :gqlType="child" :jumpTypeCallback="jumpTypeCallback" />
|
||||
<GraphqlTypeLink :gqlType="child" :jumpTypeCallback="jumpTypeCallback" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="gqlType.getFields">
|
||||
<h5>{{ $t("fields") }}</h5>
|
||||
<div v-for="field in gqlType.getFields()" :key="field.name">
|
||||
<field
|
||||
<GraphqlField
|
||||
:gqlField="field"
|
||||
:isHighlighted="isFieldHighlighted({ field })"
|
||||
:jumpTypeCallback="jumpTypeCallback"
|
||||
@@ -1,4 +1,4 @@
|
||||
import field from "../field"
|
||||
import field from "../Field"
|
||||
import { shallowMount } from "@vue/test-utils"
|
||||
|
||||
const gqlField = {
|
||||
@@ -21,7 +21,7 @@ const factory = (props) =>
|
||||
shallowMount(field, {
|
||||
propsData: props,
|
||||
stubs: {
|
||||
typelink: {
|
||||
GraphqlTypeLink: {
|
||||
template: "<span>Typelink</span>",
|
||||
},
|
||||
},
|
||||
@@ -1,4 +1,4 @@
|
||||
import type from "../type"
|
||||
import type from "../Type"
|
||||
|
||||
import { shallowMount } from "@vue/test-utils"
|
||||
import {GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType} from "graphql"
|
||||
@@ -15,7 +15,7 @@ const factory = (props) =>
|
||||
$t: (text) => text,
|
||||
},
|
||||
propsData: { gqlTypes: [], ...props },
|
||||
stubs: ["field", "typelink"],
|
||||
stubs: ["GraphqlField", "GraphqlTypeLink"],
|
||||
})
|
||||
|
||||
describe("type", () => {
|
||||
@@ -61,7 +61,7 @@ describe("type", () => {
|
||||
getFields: undefined,
|
||||
},
|
||||
})
|
||||
expect(wrapper.find("field-stub").exists()).toEqual(false)
|
||||
expect(wrapper.find("GraphqlField-stub").exists()).toEqual(false)
|
||||
})
|
||||
|
||||
test("all fields are rendered if present with props passed properly", () => {
|
||||
@@ -71,7 +71,7 @@ describe("type", () => {
|
||||
},
|
||||
})
|
||||
|
||||
expect(wrapper.findAll("field-stub").length).toEqual(2)
|
||||
expect(wrapper.findAll("GraphqlField-stub").length).toEqual(2)
|
||||
})
|
||||
|
||||
test("prepends 'input' to type name for Input Types", () => {
|
||||
@@ -1,4 +1,4 @@
|
||||
import typelink from "../typelink"
|
||||
import typelink from "../TypeLink.vue"
|
||||
import { shallowMount } from "@vue/test-utils"
|
||||
import {GraphQLInt} from "graphql"
|
||||
|
||||
Reference in New Issue
Block a user