From f2feecf84e381d8eb3536ee79d7478c23c095697 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 29 Sep 2023 10:25:22 -0700 Subject: [PATCH] Fix avatars tests Because the tests referenced images on the appwrite.io website, but the appwrite.io website changed, the tests broke. This updates the tests to reference valid images/URLs. In addition, the favicon test was changed to use github.com because appwrite.io has an SVG favicon which the avatars API does not support. --- tests/e2e/Services/Avatars/AvatarsBase.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Avatars/AvatarsBase.php b/tests/e2e/Services/Avatars/AvatarsBase.php index 1652e01514..fbe66e76c5 100644 --- a/tests/e2e/Services/Avatars/AvatarsBase.php +++ b/tests/e2e/Services/Avatars/AvatarsBase.php @@ -202,7 +202,7 @@ trait AvatarsBase $response = $this->client->call(Client::METHOD_GET, '/avatars/image', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'url' => 'https://appwrite.io/images/apple.png', + 'url' => 'https://appwrite.io/images/open-graph/website.png', ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -212,7 +212,7 @@ trait AvatarsBase $response = $this->client->call(Client::METHOD_GET, '/avatars/image', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'url' => 'https://appwrite.io/images/apple.png', + 'url' => 'https://appwrite.io/images/open-graph/website.png', 'width' => 200, 'height' => 200, ]); @@ -224,7 +224,7 @@ trait AvatarsBase $response = $this->client->call(Client::METHOD_GET, '/avatars/image', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'url' => 'https://appwrite.io/images/apple.png', + 'url' => 'https://appwrite.io/images/open-graph/website.png', 'width' => 300, 'height' => 300, 'quality' => 30, @@ -251,7 +251,7 @@ trait AvatarsBase $response = $this->client->call(Client::METHOD_GET, '/avatars/image', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'url' => 'https://appwrite.io/images/apple.png', + 'url' => 'https://appwrite.io/images/open-graph/website.png', 'width' => 2001, 'height' => 300, 'quality' => 30, @@ -280,11 +280,11 @@ trait AvatarsBase $response = $this->client->call(Client::METHOD_GET, '/avatars/favicon', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'url' => 'https://appwrite.io/', + 'url' => 'https://github.com/', ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals('image/png', $response['headers']['content-type']); + $this->assertEquals('image/x-icon', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); /**