Skip to content

Commit

Permalink
modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomokazu tantaka committed Sep 17, 2024
1 parent b78d0b4 commit 3a479b0
Show file tree
Hide file tree
Showing 16 changed files with 507 additions and 409 deletions.
425 changes: 408 additions & 17 deletions server/e2e/gql_import_export_test.go

Large diffs are not rendered by default.

341 changes: 0 additions & 341 deletions server/e2e/project.json

This file was deleted.

28 changes: 28 additions & 0 deletions server/internal/adapter/gql/gqlmodel/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/reearth/reearth/server/internal/usecase/interfaces"
"github.com/reearth/reearth/server/pkg/file"
"github.com/reearth/reearth/server/pkg/plugin"
"github.com/reearth/reearth/server/pkg/visualizer"
"github.com/reearth/reearthx/usecasex"
"github.com/samber/lo"
Expand Down Expand Up @@ -64,6 +65,33 @@ func ToVisualizerRef(v visualizer.Visualizer) *Visualizer {
return &v2
}

func FromPluginExtension(p PluginExtensionType) plugin.ExtensionType {
switch p {
case PluginExtensionTypePrimitive:
return plugin.ExtensionTypePrimitive
case PluginExtensionTypeWidget:
return plugin.ExtensionTypeWidget
case PluginExtensionTypeBlock:
return plugin.ExtensionTypeBlock
case PluginExtensionTypeVisualizer:
return plugin.ExtensionTypeVisualizer
case PluginExtensionTypeInfobox:
return plugin.ExtensionTypeInfobox
case PluginExtensionTypeInfoboxBlock:
return plugin.ExtensionTypeInfoboxBlock
case PluginExtensionTypeCluster:
return plugin.ExtensionTypeCluster
case PluginExtensionTypeStory:
return plugin.ExtensionTypeStory
case PluginExtensionTypeStoryPage:
return plugin.ExtensionTypeStoryPage
case PluginExtensionTypeStoryBlock:
return plugin.ExtensionTypeStoryBlock
default:
return plugin.ExtensionType("")
}
}

func FromFile(f *graphql.Upload) *file.File {
if f == nil {
return nil
Expand Down
2 changes: 1 addition & 1 deletion server/internal/adapter/gql/gqlmodel/convert_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func ToPluginExtensionType(t plugin.ExtensionType) PluginExtensionType {
case plugin.ExtensionTypeStoryBlock:
return PluginExtensionTypeStoryBlock
}
return PluginExtensionType(string(t))
return PluginExtensionType("")
}

func ToPluginWidgetLayout(wl *plugin.WidgetLayout) *WidgetLayout {
Expand Down
Loading

0 comments on commit 3a479b0

Please sign in to comment.