mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Update CTA check
This commit is contained in:
parent
0b27d92509
commit
bb09abc087
1 changed files with 14 additions and 2 deletions
|
|
@ -2709,8 +2709,20 @@ class SitesCustomServerTest extends Scope
|
|||
'x-appwrite-key' => API_KEY_DYNAMIC . '_' . $apiKey,
|
||||
]);
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
$this->assertStringContainsString("Deployment build canceled", $response['body']);
|
||||
$this->assertStringContainsString("View deployments", $response['body']);
|
||||
$deployment = $this->getDeployment($siteId, $deploymentId);
|
||||
$status = $deployment['body']['status'] ?? '';
|
||||
$expectedMessage = match ($status) {
|
||||
'failed' => 'Deployment build failed',
|
||||
'canceled' => 'Deployment build canceled',
|
||||
default => 'Deployment is still building',
|
||||
};
|
||||
$this->assertStringContainsString($expectedMessage, $response['body']);
|
||||
$expectedCta = match ($status) {
|
||||
'failed' => 'View logs',
|
||||
'canceled' => 'View deployments',
|
||||
default => 'Reload',
|
||||
};
|
||||
$this->assertStringContainsString($expectedCta, $response['body']);
|
||||
|
||||
// check site domain for no active deployments
|
||||
$proxyClient->setEndpoint('http://' . $domain);
|
||||
|
|
|
|||
Loading…
Reference in a new issue