@@ -75,7 +75,7 @@ Feature: Dashboards
7575 @generated @skip @team:DataDog/dashboards-backend
7676 Scenario : Create a new dashboard returns "Bad Request" response
7777 Given new "CreateDashboard" request
78- And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
78+ And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" , "type" : "group" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
7979 When the request is sent
8080 Then the response status is 400 Bad Request
8181
@@ -807,6 +807,17 @@ Feature: Dashboards
807807 And the response "template_variable_presets[0].template_variables[0].name" is equal to "datacenter"
808808 And the response "template_variable_presets[0].template_variables[0].values[0]" is equal to "*"
809809
810+ @team:DataDog/dashboards-backend
811+ Scenario : Create a new dashboard with template variable type field returns "OK" response
812+ Given new "CreateDashboard" request
813+ And body with value {"description" : null, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "defaults" : ["my-host" ], "name" : "host1" , "prefix" : "host" }, {"available_values" : ["service" , "datacenter" , "env" ], "default" : "service" , "defaults" : ["service" , "datacenter" ], "name" : "group_by_var" , "type" : "group" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
814+ When the request is sent
815+ Then the response status is 200 OK
816+ And the response "template_variables[0].name" is equal to "host1"
817+ And the response "template_variables[0].available_values[0]" is equal to "my-host"
818+ And the response "template_variables[0].defaults[0]" is equal to "my-host"
819+ And the response "template_variables[0].type" is equal to "filter"
820+
810821 @team:DataDog/dashboards-backend
811822 Scenario : Create a new dashboard with timeseries widget and formula style attributes
812823 Given new "CreateDashboard" request
@@ -960,6 +971,16 @@ Feature: Dashboards
960971 And the response "dashboard_id" has the same value as "dashboard.id"
961972 And the response "dashboard_type" is equal to "custom_timeboard"
962973
974+ @team:DataDog/reporting-and-sharing
975+ Scenario : Create a shared dashboard with a group template variable returns "OK" response
976+ Given there is a valid "dashboard" in the system
977+ And new "CreatePublicDashboard" request
978+ And body with value {"dashboard_id" : "{{dashboard.id}}" , "dashboard_type" : "custom_timeboard" , "share_type" : "open" , "global_time" : {"live_span" : "1h" }, "selectable_template_vars" : [{"default_value" : "*" , "name" : "group_by_var" , "type" : "group" , "visible_tags" : ["selectableValue1" , "selectableValue2" ]}]}
979+ When the request is sent
980+ Then the response status is 200 OK
981+ And the response "dashboard_id" has the same value as "dashboard.id"
982+ And the response "dashboard_type" is equal to "custom_timeboard"
983+
963984 @generated @skip @team:DataDog/dashboards-backend
964985 Scenario : Delete a dashboard returns "Dashboards Not Found" response
965986 Given new "DeleteDashboard" request
@@ -1172,15 +1193,15 @@ Feature: Dashboards
11721193 Scenario : Update a dashboard returns "Bad Request" response
11731194 Given new "UpdateDashboard" request
11741195 And request contains "dashboard_id" parameter from "REPLACE.ME"
1175- And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
1196+ And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" , "type" : "group" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
11761197 When the request is sent
11771198 Then the response status is 400 Bad Request
11781199
11791200 @generated @skip @team:DataDog/dashboards-backend
11801201 Scenario : Update a dashboard returns "Item Not Found" response
11811202 Given new "UpdateDashboard" request
11821203 And request contains "dashboard_id" parameter from "REPLACE.ME"
1183- And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
1204+ And body with value {"description" : null, "is_read_only" : false, "layout_type" : "ordered" , "notify_list" : [], "reflow_type" : "auto" , "restricted_roles" : [], "tags" : [], "template_variable_presets" : [{"template_variables" : [{"values" : []}]}], "template_variables" : [{"available_values" : ["my-host" , "host1" , "host2" ], "default" : "my-host" , "defaults" : ["my-host-1" , "my-host-2" ], "name" : "host1" , "prefix" : "host" , "type" : "group" }], "title" : "" , "widgets" : [{"definition" : {"requests" : {"fill" : {"q" : "avg:system.cpu.user{*}" }}, "type" : "hostmap" }}]}
11841205 When the request is sent
11851206 Then the response status is 404 Item Not Found
11861207
@@ -1234,3 +1255,18 @@ Feature: Dashboards
12341255 And the response "global_time.live_span" is equal to "15m"
12351256 And the response "share_type" is equal to "open"
12361257 And the response "share_list" has length 0
1258+
1259+ @team:DataDog/reporting-and-sharing
1260+ Scenario : Update a shared dashboard with selectable_template_vars returns "OK" response
1261+ Given there is a valid "dashboard" in the system
1262+ And there is a valid "shared_dashboard" in the system
1263+ And new "UpdatePublicDashboard" request
1264+ And request contains "token" parameter from "shared_dashboard.token"
1265+ And body with value {"global_time" : {"live_span" : "15m" }, "share_list" : [], "share_type" : "open" , "selectable_template_vars" : [{"default_value" : "*" , "name" : "group_by_var" , "type" : "group" , "visible_tags" : ["selectableValue1" , "selectableValue2" ]}]}
1266+ When the request is sent
1267+ Then the response status is 200 OK
1268+ And the response "dashboard_id" has the same value as "dashboard.id"
1269+ And the response "dashboard_type" is equal to "custom_timeboard"
1270+ And the response "global_time.live_span" is equal to "15m"
1271+ And the response "share_type" is equal to "open"
1272+ And the response "share_list" has length 0
0 commit comments