|
| 1 | +@endpoint(widgets) @endpoint(widgets-v2) |
| 2 | +Feature: Widgets |
| 3 | + Create, read, update, and delete saved widgets. Widgets are reusable |
| 4 | + visualization components stored independently from any dashboard or |
| 5 | + notebook, partitioned by experience type and identified by a UUID. |
| 6 | + |
| 7 | + Background: |
| 8 | + Given a valid "apiKeyAuth" key in the system |
| 9 | + And a valid "appKeyAuth" key in the system |
| 10 | + And an instance of "Widgets" API |
| 11 | + |
| 12 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 13 | + Scenario: Create a widget returns "Bad Request" response |
| 14 | + Given new "CreateWidget" request |
| 15 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 16 | + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} |
| 17 | + When the request is sent |
| 18 | + Then the response status is 400 Bad Request |
| 19 | + |
| 20 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 21 | + Scenario: Create a widget returns "OK" response |
| 22 | + Given new "CreateWidget" request |
| 23 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 24 | + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} |
| 25 | + When the request is sent |
| 26 | + Then the response status is 200 OK |
| 27 | + |
| 28 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 29 | + Scenario: Delete a widget returns "Bad Request" response |
| 30 | + Given new "DeleteWidget" request |
| 31 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 32 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 33 | + When the request is sent |
| 34 | + Then the response status is 400 Bad Request |
| 35 | + |
| 36 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 37 | + Scenario: Delete a widget returns "No Content" response |
| 38 | + Given new "DeleteWidget" request |
| 39 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 40 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 41 | + When the request is sent |
| 42 | + Then the response status is 204 No Content |
| 43 | + |
| 44 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 45 | + Scenario: Delete a widget returns "Not Found" response |
| 46 | + Given new "DeleteWidget" request |
| 47 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 48 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 49 | + When the request is sent |
| 50 | + Then the response status is 404 Not Found |
| 51 | + |
| 52 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 53 | + Scenario: Get a widget returns "Bad Request" response |
| 54 | + Given new "GetWidget" request |
| 55 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 56 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 57 | + When the request is sent |
| 58 | + Then the response status is 400 Bad Request |
| 59 | + |
| 60 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 61 | + Scenario: Get a widget returns "Not Found" response |
| 62 | + Given new "GetWidget" request |
| 63 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 64 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 65 | + When the request is sent |
| 66 | + Then the response status is 404 Not Found |
| 67 | + |
| 68 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 69 | + Scenario: Get a widget returns "OK" response |
| 70 | + Given new "GetWidget" request |
| 71 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 72 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 73 | + When the request is sent |
| 74 | + Then the response status is 200 OK |
| 75 | + |
| 76 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 77 | + Scenario: Search widgets returns "Bad Request" response |
| 78 | + Given new "SearchWidgets" request |
| 79 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 80 | + When the request is sent |
| 81 | + Then the response status is 400 Bad Request |
| 82 | + |
| 83 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 84 | + Scenario: Search widgets returns "OK" response |
| 85 | + Given new "SearchWidgets" request |
| 86 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 87 | + When the request is sent |
| 88 | + Then the response status is 200 OK |
| 89 | + |
| 90 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 91 | + Scenario: Update a widget returns "Bad Request" response |
| 92 | + Given new "UpdateWidget" request |
| 93 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 94 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 95 | + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} |
| 96 | + When the request is sent |
| 97 | + Then the response status is 400 Bad Request |
| 98 | + |
| 99 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 100 | + Scenario: Update a widget returns "Not Found" response |
| 101 | + Given new "UpdateWidget" request |
| 102 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 103 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 104 | + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} |
| 105 | + When the request is sent |
| 106 | + Then the response status is 404 Not Found |
| 107 | + |
| 108 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 109 | + Scenario: Update a widget returns "OK" response |
| 110 | + Given new "UpdateWidget" request |
| 111 | + And request contains "experience_type" parameter from "REPLACE.ME" |
| 112 | + And request contains "uuid" parameter from "REPLACE.ME" |
| 113 | + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} |
| 114 | + When the request is sent |
| 115 | + Then the response status is 200 OK |
0 commit comments