Skip to content

Commit

Permalink
Storyboard Fractional Index sorting (#628)
Browse files Browse the repository at this point in the history
* Refactor storyboard story, goal, and column sortings to use fractional indexes

* Add test ids to storyboard ui elements missing them

* Move e2e tests into folders for clearer organization

* Add apis for storyboard events to test story move changes

* Add api tests for storyboard goal and column creates

* Add api test for storyboard create story

* Add api tests for moving story within storyboard
  • Loading branch information
StevenWeathers authored Oct 2, 2024
1 parent 362d05b commit c4bddb4
Show file tree
Hide file tree
Showing 36 changed files with 1,978 additions and 135 deletions.
285 changes: 282 additions & 3 deletions docs/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5574,6 +5574,229 @@ const docTemplate = `{
}
}
},
"/storyboards/{storyboardId}/columns": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Add a column to a storyboard goal",
"produces": [
"application/json"
],
"tags": [
"storyboard"
],
"summary": "Storyboard Column Add",
"parameters": [
{
"type": "string",
"description": "the storyboard ID",
"name": "storyboardId",
"in": "path",
"required": true
},
{
"description": "request body for adding a column",
"name": "storyboard",
"in": "body",
"schema": {
"$ref": "#/definitions/http.storyboardColumnAddRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/storyboards/{storyboardId}/goals": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Add a goal to a storyboard",
"produces": [
"application/json"
],
"tags": [
"storyboard"
],
"summary": "Storyboard Goal Add",
"parameters": [
{
"type": "string",
"description": "the storyboard ID",
"name": "storyboardId",
"in": "path",
"required": true
},
{
"description": "the goal to add",
"name": "storyboard",
"in": "body",
"schema": {
"$ref": "#/definitions/http.storyboardGoalAddRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/storyboards/{storyboardId}/stories": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Add a story to a storyboard goal column",
"produces": [
"application/json"
],
"tags": [
"storyboard"
],
"summary": "Storyboard Story Add",
"parameters": [
{
"type": "string",
"description": "the storyboard ID",
"name": "storyboardId",
"in": "path",
"required": true
},
{
"description": "request body for adding a story",
"name": "storyboard",
"in": "body",
"schema": {
"$ref": "#/definitions/http.storyboardStoryAddRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/storyboards/{storyboardId}/stories/{storyId}/move": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Move a story in a storyboard",
"produces": [
"application/json"
],
"tags": [
"storyboard"
],
"summary": "Storyboard Story Move",
"parameters": [
{
"type": "string",
"description": "the storyboard ID",
"name": "storyboardId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "the story ID",
"name": "storyId",
"in": "path",
"required": true
},
{
"description": "target goal column and place before story",
"name": "storyboard",
"in": "body",
"schema": {
"$ref": "#/definitions/http.storyboardStoryMoveRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/http.standardJsonResponse"
}
}
}
}
},
"/subscriptions": {
"get": {
"security": [
Expand Down Expand Up @@ -10891,6 +11114,17 @@ const docTemplate = `{
}
}
},
"http.storyboardColumnAddRequestBody": {
"type": "object",
"required": [
"goalId"
],
"properties": {
"goalId": {
"type": "string"
}
}
},
"http.storyboardCreateRequestBody": {
"type": "object",
"required": [
Expand All @@ -10908,6 +11142,51 @@ const docTemplate = `{
}
}
},
"http.storyboardGoalAddRequestBody": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
}
}
},
"http.storyboardStoryAddRequestBody": {
"type": "object",
"required": [
"columnId",
"goalId"
],
"properties": {
"columnId": {
"type": "string"
},
"goalId": {
"type": "string"
}
}
},
"http.storyboardStoryMoveRequestBody": {
"type": "object",
"required": [
"columnId",
"goalId"
],
"properties": {
"columnId": {
"type": "string"
},
"goalId": {
"type": "string"
},
"placeBefore": {
"type": "string"
}
}
},
"http.subscriptionAssociateRequestBody": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12177,7 +12456,7 @@ const docTemplate = `{
}
},
"sort_order": {
"type": "integer"
"type": "string"
},
"stories": {
"type": "array",
Expand Down Expand Up @@ -12209,7 +12488,7 @@ const docTemplate = `{
}
},
"sort_order": {
"type": "integer"
"type": "string"
}
}
},
Expand Down Expand Up @@ -12267,7 +12546,7 @@ const docTemplate = `{
"type": "integer"
},
"sort_order": {
"type": "integer"
"type": "string"
}
}
},
Expand Down
Loading

0 comments on commit c4bddb4

Please sign in to comment.