Skip to content

Commit

Permalink
fix(dashboard): Adjust dashboard API response after server PR
Browse files Browse the repository at this point in the history
Ref nextcloud/server#39937

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed Aug 22, 2023
1 parent dc4baea commit 9c168ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,7 @@ public function userGetsDashboardWidgets($user, $apiVersion = 'v1', TableNode $f
$widget['widget_url'] = str_replace('{$BASE_URL}', $this->baseUrl, $widget['widget_url']);
$widget['buttons'] = str_replace('{$BASE_URL}', $this->baseUrl, $widget['buttons']);
$widget['buttons'] = json_decode($widget['buttons'], true);
$widget['item_api_versions'] = json_decode($widget['item_api_versions'], true);

Assert::assertEquals($widget, $data[$id], 'Mismatch of data for widget ' . $id);
Assert::assertStringEndsWith($widgetIconUrl, $dataIconUrl, 'Mismatch of icon URL for widget ' . $id);
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/features/integration/dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Feature: integration/dashboard

Scenario: User gets the available dashboard widgets
When user "participant1" sees the following entry when loading the list of dashboard widgets (v1)
| id | title | icon_class | icon_url | widget_url | item_icons_round | order | buttons |
| spreed | Talk mentions | dashboard-talk-icon | img/app-dark.svg | {$BASE_URL}index.php/apps/spreed/ | true | 10 | [{"type":"more","text":"More unread mentions","link":"{$BASE_URL}index.php/apps/spreed/"}] |
| id | title | icon_class | icon_url | widget_url | item_icons_round | order | buttons | item_api_versions | reload_interval |
| spreed | Talk mentions | dashboard-talk-icon | img/app-dark.svg | {$BASE_URL}index.php/apps/spreed/ | true | 10 | [{"type":"more","text":"More unread mentions","link":"{$BASE_URL}index.php/apps/spreed/"}] | [1] | 0 |

Scenario: User gets the dashboard widget content
When user "participant1" sees the following entries for dashboard widgets "spreed" (v1)
Expand Down Expand Up @@ -36,7 +36,7 @@ Feature: integration/dashboard
And user "participant2" starts breakout rooms in room "breakout room parent" with 200 (v1)
And user "participant2" broadcasts message "@participant1 hello" to room "breakout room parent" with 201 (v1)
Then user "participant1" sees the following entries for dashboard widgets "spreed" (v1)
| title | subtitle | link | iconUrl | sinceId |
| call room | Call in progress | call room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | |
| group room | You were mentioned | group room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | |
| participant2-displayname | Hello | one-to-one room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | |
| title | subtitle | link | iconUrl | sinceId | overlayIconUrl |
| call room | Call in progress | call room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |
| group room | You were mentioned | group room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |
| participant2-displayname | Hello | one-to-one room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |

0 comments on commit 9c168ef

Please sign in to comment.