Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pvaneveld committed Jul 11, 2024
1 parent aafd7f0 commit 2827cb3
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 92 deletions.
36 changes: 18 additions & 18 deletions internal/assets/asset_folder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ interactions:
trailer: {}
content_length: 139
uncompressed: false
body: '{"asset_folder":{"id":576397,"name":"asset-folder-name","parent_id":null,"uuid":"fa69a52f-3dd1-420b-8e2c-1b30bdef162c","parent_uuid":null}}'
body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 103.60975ms
duration: 253.17725ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -46,7 +46,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: GET
response:
proto: HTTP/2.0
Expand All @@ -56,13 +56,13 @@ interactions:
trailer: {}
content_length: 139
uncompressed: false
body: '{"asset_folder":{"id":576397,"name":"asset-folder-name","parent_id":null,"uuid":"fa69a52f-3dd1-420b-8e2c-1b30bdef162c","parent_uuid":null}}'
body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 39.288459ms
duration: 102.269667ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -77,7 +77,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: GET
response:
proto: HTTP/2.0
Expand All @@ -87,13 +87,13 @@ interactions:
trailer: {}
content_length: 139
uncompressed: false
body: '{"asset_folder":{"id":576397,"name":"asset-folder-name","parent_id":null,"uuid":"fa69a52f-3dd1-420b-8e2c-1b30bdef162c","parent_uuid":null}}'
body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 262.893583ms
duration: 107.813083ms
- id: 3
request:
proto: HTTP/1.1
Expand All @@ -108,7 +108,7 @@ interactions:
body: '{"asset_folder":{"name":"new-asset-folder-name"}}'
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: PUT
response:
proto: HTTP/2.0
Expand All @@ -122,7 +122,7 @@ interactions:
headers: {}
status: 204 No Content
code: 204
duration: 146.615459ms
duration: 152.376458ms
- id: 4
request:
proto: HTTP/1.1
Expand All @@ -137,7 +137,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: GET
response:
proto: HTTP/2.0
Expand All @@ -147,13 +147,13 @@ interactions:
trailer: {}
content_length: 143
uncompressed: false
body: '{"asset_folder":{"id":576397,"name":"new-asset-folder-name","parent_id":null,"uuid":"fa69a52f-3dd1-420b-8e2c-1b30bdef162c","parent_uuid":null}}'
body: '{"asset_folder":{"id":604728,"name":"new-asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 40.777416ms
duration: 86.802167ms
- id: 5
request:
proto: HTTP/1.1
Expand All @@ -168,7 +168,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: GET
response:
proto: HTTP/2.0
Expand All @@ -178,13 +178,13 @@ interactions:
trailer: {}
content_length: 143
uncompressed: false
body: '{"asset_folder":{"id":576397,"name":"new-asset-folder-name","parent_id":null,"uuid":"fa69a52f-3dd1-420b-8e2c-1b30bdef162c","parent_uuid":null}}'
body: '{"asset_folder":{"id":604728,"name":"new-asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 40.8615ms
duration: 80.509792ms
- id: 6
request:
proto: HTTP/1.1
Expand All @@ -199,7 +199,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/576397
url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -213,4 +213,4 @@ interactions:
headers: {}
status: 204 No Content
code: 204
duration: 174.791209ms
duration: 240.006791ms
44 changes: 22 additions & 22 deletions internal/assets/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 229
content_length: 447
transfer_encoding: []
trailer: {}
host: mapi.storyblok.com
remote_addr: ""
request_uri: ""
body: '{"component":{"is_nestable":false,"is_root":false,"name":"test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"pos":3,"type":"image"}}}}'
body: '{"component":{"is_nestable":false,"is_root":false,"name":"test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}}}}'
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/
Expand All @@ -23,15 +23,15 @@ interactions:
proto_minor: 0
transfer_encoding: []
trailer: {}
content_length: 569
content_length: 787
uncompressed: false
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:36.374Z","id":5949850,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 129.956416ms
duration: 104.29925ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -46,23 +46,23 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/5949850
url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
transfer_encoding: []
trailer: {}
content_length: 569
content_length: 787
uncompressed: false
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:36.374Z","id":5949850,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 106.954542ms
duration: 77.601416ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -77,23 +77,23 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/5949850
url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934
method: GET
response:
proto: HTTP/2.0
proto_major: 2
proto_minor: 0
transfer_encoding: []
trailer: {}
content_length: 569
content_length: 787
uncompressed: false
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:36.374Z","id":5949850,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 43.386ms
duration: 78.886416ms
- id: 3
request:
proto: HTTP/1.1
Expand All @@ -108,7 +108,7 @@ interactions:
body: '{"component":{"is_nestable":false,"is_root":false,"name":"new-test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}}}}'
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/5949850
url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934
method: PUT
response:
proto: HTTP/2.0
Expand All @@ -118,13 +118,13 @@ interactions:
trailer: {}
content_length: 642
uncompressed: false
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:37.276Z","id":5949850,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 128.283917ms
duration: 115.851583ms
- id: 4
request:
proto: HTTP/1.1
Expand All @@ -139,7 +139,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/5949850
url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934
method: GET
response:
proto: HTTP/2.0
Expand All @@ -149,13 +149,13 @@ interactions:
trailer: {}
content_length: 642
uncompressed: false
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:37.276Z","id":5949850,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 35.870375ms
duration: 82.617166ms
- id: 5
request:
proto: HTTP/1.1
Expand All @@ -170,7 +170,7 @@ interactions:
body: ""
form: {}
headers: {}
url: https://mapi.storyblok.com/v1/spaces/233252/components/5949850
url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -180,10 +180,10 @@ interactions:
trailer: {}
content_length: 642
uncompressed: false
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-06-19T11:49:36.374Z","updated_at":"2024-06-19T11:49:37.276Z","id":5949850,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 109.515709ms
duration: 146.879375ms
Loading

0 comments on commit 2827cb3

Please sign in to comment.