Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(server): remove redundant scene property #1038

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
version: v1.56
args: --timeout=10m
working-directory: server

Expand Down
111 changes: 0 additions & 111 deletions server/e2e/dataset_export_test.go

This file was deleted.

44 changes: 0 additions & 44 deletions server/e2e/gql_layer_test.go

This file was deleted.

1 change: 0 additions & 1 deletion server/e2e/gql_nlslayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ func fetchSceneForNewLayers(e *httpexpect.Expect, sID string) (GraphQLRequest, *
node(id: $sceneId, type: SCENE) {
id
... on Scene {
rootLayerId
newLayers {
id
layerType
Expand Down
49 changes: 49 additions & 0 deletions server/e2e/gql_scene_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package e2e

import (
"net/http"
"testing"

"github.com/reearth/reearth/server/internal/app/config"
"github.com/stretchr/testify/assert"
)

func TestCreateScene(t *testing.T) {
e := StartServer(t, &config.Config{
Origins: []string{"https://example.com"},
AuthSrv: config.AuthSrvConfig{
Disabled: true,
},
},
true, baseSeeder)

requestBody := GraphQLRequest{
OperationName: "CreateScene",
Query: `mutation CreateScene($projectId: ID!) {
createScene( input: {projectId: $projectId} ) {
scene {
id
__typename
}
__typename
}
}`,
Variables: map[string]any{
"projectId": pID,
},
}

res := e.POST("/api/graphql").
WithHeader("Origin", "https://example.com").
WithHeader("X-Reearth-Debug-User", uID.String()).
WithHeader("Content-Type", "application/json").
WithJSON(requestBody).
Expect().
Status(http.StatusOK).
JSON()

sID := res.Path("$.data.createScene.scene.id").Raw().(string)

assert.NotEmpty(t, sID)

}
Loading
Loading