Skip to content

Commit a12a37c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Shorten scenario name for public dashboard test (#3128)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 45c7330 commit a12a37c

7 files changed

Lines changed: 311 additions & 11 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-03-18T20:27:29.628Z

cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK-.yml

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-03-19T17:48:57.466Z

cassettes/features/v1/dashboards/Send-shared-dashboard-invitation-email-returns-OK.yml

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v1/dashboards/SendPublicDashboardInvitation.rb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
55

6-
# there is a valid "shared_dashboard" in the system
7-
SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"]
8-
96
body = DatadogAPIClient::V1::SharedDashboardInvites.new({
10-
data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
11-
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
12-
email: "exampledashboard@datadoghq.com",
7+
data: [
8+
DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
9+
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
10+
email: "test@datadoghq.com",
11+
}),
12+
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
1313
}),
14-
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
15-
}),
14+
],
1615
})
17-
p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body)
16+
p api_instance.send_public_dashboard_invitation("token", body)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Send shared dashboard invitation email returns OK
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5+
6+
# there is a valid "shared_dashboard" in the system
7+
SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"]
8+
9+
body = DatadogAPIClient::V1::SharedDashboardInvites.new({
10+
data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
11+
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
12+
email: "exampledashboard@datadoghq.com",
13+
}),
14+
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
15+
}),
16+
})
17+
p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body)

features/v1/dashboards.feature

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,16 +1357,24 @@ Feature: Dashboards
13571357
When the request is sent
13581358
Then the response status is 404 Not Found
13591359

1360-
@team:DataDog/reporting-and-sharing
1360+
@generated @skip @team:DataDog/reporting-and-sharing
13611361
Scenario: Send shared dashboard invitation email returns "OK" response
1362+
Given new "SendPublicDashboardInvitation" request
1363+
And request contains "token" parameter from "REPLACE.ME"
1364+
And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]}
1365+
When the request is sent
1366+
Then the response status is 201 OK
1367+
1368+
@team:DataDog/reporting-and-sharing
1369+
Scenario: Send shared dashboard invitation email returns OK
13621370
Given there is a valid "dashboard" in the system
13631371
And there is a valid "shared_dashboard" in the system
13641372
And new "SendPublicDashboardInvitation" request
13651373
And request contains "token" parameter from "shared_dashboard.token"
13661374
And body with value {"data": {"attributes": {"email": "{{unique_lower_alnum}}@datadoghq.com"}, "type": "public_dashboard_invitation"}}
13671375
When the request is sent
13681376
Then the response status is 201 OK
1369-
And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[0]"
1377+
And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[1]"
13701378
And the response "data.attributes.share_token" has the same value as "shared_dashboard.token"
13711379

13721380
@generated @skip @team:DataDog/dashboards-backend

0 commit comments

Comments
 (0)