Transitioned from obsolete gateway object classes (`edge_gateway_shell_action_jobs_o`, `edge_gateway_shell_events_o`, `edge_gateway_shell_sessions_o`, `edge_gateway_update_jobs_o`) to the new agent implementation (`edge-gateway-agent/agent.php`).
40 lines
1.6 KiB
PHP
40 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
function economic_draft_customer_openapi_specs_or_skip(): array
|
|
{
|
|
$root = dirname(__DIR__, 7);
|
|
$candidates = [
|
|
$root . DIRECTORY_SEPARATOR . 'backend-php' . DIRECTORY_SEPARATOR . 'services' . DIRECTORY_SEPARATOR . 'nginx' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'openapi.yaml',
|
|
$root . DIRECTORY_SEPARATOR . 'backend-php' . DIRECTORY_SEPARATOR . 'openapi.yaml',
|
|
$root . DIRECTORY_SEPARATOR . 'front-end-vue' . DIRECTORY_SEPARATOR . 'openapi.yaml',
|
|
];
|
|
|
|
$specs = [];
|
|
foreach ($candidates as $candidate) {
|
|
if (!is_file($candidate)) {
|
|
test()->markTestSkipped('One or more tracked openapi.yaml copies are not available in this runtime environment.');
|
|
}
|
|
|
|
$content = file_get_contents($candidate);
|
|
if ($content === false) {
|
|
test()->markTestSkipped('Failed to read one or more tracked openapi.yaml copies.');
|
|
}
|
|
|
|
$specs[$candidate] = $content;
|
|
}
|
|
|
|
return $specs;
|
|
}
|
|
|
|
it('documents transaction draft customer config and auth runtime fields in all tracked openapi copies', function (): void {
|
|
foreach (economic_draft_customer_openapi_specs_or_skip() as $path => $content) {
|
|
expect($content, $path)->toContain('/auth/session:');
|
|
expect($content, $path)->toContain('transaction_draft_customer_number:');
|
|
expect($content, $path)->toContain('EconomicConfigEntry:');
|
|
expect($content, $path)->toContain('transactionDraftCustomerNumber');
|
|
expect($content, $path)->toContain('nullable: true');
|
|
}
|
|
});
|