@@ -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" : ["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 "group_by_var"
817+ And the response "template_variables[0].available_values[0]" is equal to "service"
818+ And the response "template_variables[0].defaults[0]" is equal to "service"
819+ And the response "template_variables[0].type" is equal to "group"
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,18 @@ 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+ And the response "selectable_template_vars[0].name" is equal to "group_by_var"
984+ And the response "selectable_template_vars[0].type" is equal to "group"
985+
963986 @generated @skip @team:DataDog/dashboards-backend
964987 Scenario : Delete a dashboard returns "Dashboards Not Found" response
965988 Given new "DeleteDashboard" request
@@ -1172,15 +1195,15 @@ Feature: Dashboards
11721195 Scenario : Update a dashboard returns "Bad Request" response
11731196 Given new "UpdateDashboard" request
11741197 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" }}]}
1198+ 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" }}]}
11761199 When the request is sent
11771200 Then the response status is 400 Bad Request
11781201
11791202 @generated @skip @team:DataDog/dashboards-backend
11801203 Scenario : Update a dashboard returns "Item Not Found" response
11811204 Given new "UpdateDashboard" request
11821205 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" }}]}
1206+ 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" }}]}
11841207 When the request is sent
11851208 Then the response status is 404 Item Not Found
11861209
@@ -1234,3 +1257,20 @@ Feature: Dashboards
12341257 And the response "global_time.live_span" is equal to "15m"
12351258 And the response "share_type" is equal to "open"
12361259 And the response "share_list" has length 0
1260+
1261+ @team:DataDog/reporting-and-sharing
1262+ Scenario : Update a shared dashboard with selectable_template_vars returns "OK" response
1263+ Given there is a valid "dashboard" in the system
1264+ And there is a valid "shared_dashboard" in the system
1265+ And new "UpdatePublicDashboard" request
1266+ And request contains "token" parameter from "shared_dashboard.token"
1267+ 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" ]}]}
1268+ When the request is sent
1269+ Then the response status is 200 OK
1270+ And the response "dashboard_id" has the same value as "dashboard.id"
1271+ And the response "dashboard_type" is equal to "custom_timeboard"
1272+ And the response "global_time.live_span" is equal to "15m"
1273+ And the response "share_type" is equal to "open"
1274+ And the response "share_list" has length 0
1275+ And the response "selectable_template_vars[0].name" is equal to "group_by_var"
1276+ And the response "selectable_template_vars[0].type" is equal to "group"
0 commit comments