summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2023-05-04 04:54:54 -0300
committerVitor Mattos <vitor@php.rio>2023-05-04 04:55:01 -0300
commit602ff9625547118a6963b132e08e42c030a8a5bc (patch)
tree32820d134c53a76d00232488325fe4114bc46a94 /tests/integration
parent8bc090611b60f333c76a181ee5b335f3e618a210 (diff)
Fix integration test
I prefered to put a placeholder at URL from step to make splicit that the URL have a version at the place of placeholder. Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php4
-rw-r--r--tests/integration/features/integration/dashboard.feature6
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index d4963e47f..27537c1c3 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -1946,6 +1946,10 @@ class FeatureContext implements Context, SnippetAcceptingContext {
$item['iconUrl'] = str_replace('{$BASE_URL}', $this->baseUrl, $item['iconUrl']);
$item['iconUrl'] = str_replace('{token}', $token, $item['iconUrl']);
+ Assert::assertMatchesRegularExpression('/\?v=\w{8}$/', $data[$widgetId][$key]['iconUrl']);
+ preg_match('/(?<version>\?v=\w{8})$/', $data[$widgetId][$key]['iconUrl'], $matches);
+ $item['iconUrl'] = str_replace('{version}', $matches['version'], $item['iconUrl']);
+
Assert::assertEquals($item, $data[$widgetId][$key], 'Wrong details for item #' . $key);
}
}
diff --git a/tests/integration/features/integration/dashboard.feature b/tests/integration/features/integration/dashboard.feature
index 2120bbbef..8730bedd0 100644
--- a/tests/integration/features/integration/dashboard.feature
+++ b/tests/integration/features/integration/dashboard.feature
@@ -37,6 +37,6 @@ Feature: integration/dashboard
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 | |
- | group room | You were mentioned | group room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar | |
- | participant2-displayname | Hello | one-to-one room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar | |
+ | 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} | |