fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -13,14 +13,14 @@ class ApiFrontendBackendContractParityTest extends FullSurfaceE2EContractCase
foreach ($paths as $path) {
$response = $this->actingAs($this->admin, 'api')->getJson($path);
$this->assertNoServerError($response, 'identity contract at '.$path);
$this->assertNoServerError($response, 'identity contract at ' . $path);
if ($response->getStatusCode() === 200) {
$body = $response->json();
$this->assertIsArray($body, $path.' should return an inspectable JSON identity payload.');
$this->assertIsArray($body, $path . ' should return an inspectable JSON identity payload.');
$this->assertTrue(
data_get($body, 'user.email') !== null || data_get($body, 'email') !== null || data_get($body, 'data.email') !== null,
$path.' should expose a stable user email for frontend identity hydration.'
$path . ' should expose a stable user email for frontend identity hydration.'
);
}
}
@@ -36,11 +36,11 @@ class ApiFrontendBackendContractParityTest extends FullSurfaceE2EContractCase
'password' => 'password',
]);
$this->assertNoServerError($response, 'login alias at '.$path);
$this->assertNoServerError($response, 'login alias at ' . $path);
if ($response->getStatusCode() >= 200 && $response->getStatusCode() < 300) {
$this->assertTrue($response->json('token') !== null || $response->json('access_token') !== null, $path.' must expose a token field.');
$this->assertTrue($response->json('user') !== null || $response->json('data.user') !== null, $path.' must expose a user object.');
$this->assertTrue($response->json('token') !== null || $response->json('access_token') !== null, $path . ' must expose a token field.');
$this->assertTrue($response->json('user') !== null || $response->json('data.user') !== null, $path . ' must expose a user object.');
}
}
}
@@ -60,7 +60,7 @@ class ApiFrontendBackendContractParityTest extends FullSurfaceE2EContractCase
$response = $this->actingAs($this->parent, 'api')->getJson($this->materializePath($uri));
$this->assertControlled($response, 'GET', $uri);
$this->assertNoServerError($response, 'frontend bootstrap route at '.$uri);
$this->assertNoServerError($response, 'frontend bootstrap route at ' . $uri);
}
}
}