Skip to content

Commit

Permalink
param name change 'core'
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaforce committed Nov 21, 2024
1 parent 948e16f commit acacab6
Show file tree
Hide file tree
Showing 39 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion server/e2e/gql_nlslayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func fetchProjectForNewLayers(e *httpexpect.Expect, pID string) (GraphQLRequest,
publishmentStatus
updatedAt
createdAt
coreSupport
core
starred
__typename
}`,
Expand Down
6 changes: 3 additions & 3 deletions server/e2e/gql_project_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func TestCallExportProject(t *testing.T) {
func createProjectWithExternalImage(e *httpexpect.Expect, name string) string {
requestBody := GraphQLRequest{
OperationName: "CreateProject",
Query: `mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $coreSupport: Boolean) {
createProject( input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, coreSupport: $coreSupport} ) {
Query: `mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $core: Boolean) {
createProject( input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, core: $core} ) {
project {
id
__typename
Expand All @@ -83,7 +83,7 @@ func createProjectWithExternalImage(e *httpexpect.Expect, name string) string {
"imageUrl": "https://test.com/project.jpg",
"teamId": wID.String(),
"visualizer": "CESIUM",
"coreSupport": true,
"core": true,
},
}
res := e.POST("/api/graphql").
Expand Down
18 changes: 9 additions & 9 deletions server/e2e/gql_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ func TestCreateProject(t *testing.T) {
},
true, baseSeeder)

// create project with default coreSupport value (false)
// create project with default core value (false)
requestBody := GraphQLRequest{
OperationName: "CreateProject",
Query: "mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL) {\n createProject(\n input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl}\n ) {\n project {\n id\n name\n description\n imageUrl\n coreSupport\n __typename\n }\n __typename\n }\n}",
Query: "mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL) {\n createProject(\n input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl}\n ) {\n project {\n id\n name\n description\n imageUrl\n core\n __typename\n }\n __typename\n }\n}",
Variables: map[string]any{
"name": "test",
"description": "abc",
Expand Down Expand Up @@ -49,19 +49,19 @@ func TestCreateProject(t *testing.T) {
ValueEqual("name", "test").
ValueEqual("description", "abc").
ValueEqual("imageUrl", "").
ValueEqual("coreSupport", false)
ValueEqual("core", false)

// create coreSupport project
// create core project
requestBody = GraphQLRequest{
OperationName: "CreateProject",
Query: "mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $coreSupport: Boolean) {\n createProject(\n input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, coreSupport: $coreSupport}\n ) {\n project {\n id\n name\n description\n imageUrl\n coreSupport\n __typename\n }\n __typename\n }\n}",
Query: "mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $core: Boolean) {\n createProject(\n input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, core: $core}\n ) {\n project {\n id\n name\n description\n imageUrl\n core\n __typename\n }\n __typename\n }\n}",
Variables: map[string]any{
"name": "test",
"description": "abc",
"imageUrl": "",
"teamId": wID.String(),
"visualizer": "CESIUM",
"coreSupport": true,
"core": true,
},
}

Expand All @@ -82,7 +82,7 @@ func TestCreateProject(t *testing.T) {
ValueEqual("name", "test").
ValueEqual("description", "abc").
ValueEqual("imageUrl", "").
ValueEqual("coreSupport", true)
ValueEqual("core", true)
}

func TestSortByName(t *testing.T) {
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestSortByName(t *testing.T) {
publishmentStatus
updatedAt
createdAt
coreSupport
core
starred
__typename
}`,
Expand Down Expand Up @@ -424,7 +424,7 @@ func TestSortByUpdatedAt(t *testing.T) {
publishmentStatus
updatedAt
createdAt
coreSupport
core
starred
__typename
}`,
Expand Down
8 changes: 4 additions & 4 deletions server/e2e/gql_storytelling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
func createProject(e *httpexpect.Expect, name string) string {
requestBody := GraphQLRequest{
OperationName: "CreateProject",
Query: `mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $coreSupport: Boolean) {
createProject( input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, coreSupport: $coreSupport} ) {
Query: `mutation CreateProject($teamId: ID!, $visualizer: Visualizer!, $name: String!, $description: String!, $imageUrl: URL, $core: Boolean) {
createProject( input: {teamId: $teamId, visualizer: $visualizer, name: $name, description: $description, imageUrl: $imageUrl, core: $core} ) {
project {
id
__typename
Expand All @@ -33,7 +33,7 @@ func createProject(e *httpexpect.Expect, name string) string {
"imageUrl": "",
"teamId": wID.String(),
"visualizer": "CESIUM",
"coreSupport": true,
"core": true,
},
}

Expand Down Expand Up @@ -1048,7 +1048,7 @@ func TestStoryPublishing(t *testing.T) {
_, err = buf.ReadFrom(rc)
assert.NoError(t, err)

pub := regexp.MustCompile(fmt.Sprintf(`{"schemaVersion":1,"id":"%s","publishedAt":".*","property":{"tiles":\[{"id":".*"}]},"plugins":{},"layers":null,"widgets":\[],"widgetAlignSystem":null,"tags":\[],"clusters":\[],"story":{"id":"%s","title":"","property":{},"pages":\[{"id":"%s","property":{},"title":"test","blocks":\[{"id":"%s","property":{"default":{"text":"test value"},"panel":{"padding":{"top":2,"bottom":3,"left":0,"right":1}}},"plugins":null,"extensionId":"%s","pluginId":"%s"}],"swipeable":true,"swipeableLayers":\[],"layers":\[]}],"position":"left","bgColor":""},"nlsLayers":null,"layerStyles":null,"coreSupport":true,"enableGa":false,"trackingId":""}`, sID, storyID, pageID, blockID, extensionId, pluginId))
pub := regexp.MustCompile(fmt.Sprintf(`{"schemaVersion":1,"id":"%s","publishedAt":".*","property":{"tiles":\[{"id":".*"}]},"plugins":{},"layers":null,"widgets":\[],"widgetAlignSystem":null,"tags":\[],"clusters":\[],"story":{"id":"%s","title":"","property":{},"pages":\[{"id":"%s","property":{},"title":"test","blocks":\[{"id":"%s","property":{"default":{"text":"test value"},"panel":{"padding":{"top":2,"bottom":3,"left":0,"right":1}}},"plugins":null,"extensionId":"%s","pluginId":"%s"}],"swipeable":true,"swipeableLayers":\[],"layers":\[]}],"position":"left","bgColor":""},"nlsLayers":null,"layerStyles":null,"core":true,"enableGa":false,"trackingId":""}`, sID, storyID, pageID, blockID, extensionId, pluginId))
assert.Regexp(t, pub, buf.String())

resString := e.GET("/p/test-alias/data.json").
Expand Down
4 changes: 2 additions & 2 deletions server/gql/asset.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Asset implements Node {
url: String!
contentType: String!
team: Team
visualizer: Boolean!
core: Boolean!
}

enum AssetSortField {
Expand All @@ -20,7 +20,7 @@ enum AssetSortField {

input CreateAssetInput {
teamId: ID!
visualizer: Boolean!
core: Boolean!
file: Upload!
}

Expand Down
4 changes: 2 additions & 2 deletions server/gql/project.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Project implements Node {
publishmentStatus: PublishmentStatus!
team: Team
scene: Scene
coreSupport: Boolean!
core: Boolean!
enableGa: Boolean!
trackingId: String!
starred: Boolean!
Expand Down Expand Up @@ -58,7 +58,7 @@ input CreateProjectInput {
imageUrl: URL
alias: String
archived: Boolean
coreSupport: Boolean
core: Boolean
}

input UpdateProjectInput {
Expand Down
Loading

0 comments on commit acacab6

Please sign in to comment.