feat: unify income payment cards and drop period comparisons (WealthLedger/main#33) (#83)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 13s
Backend verify / verify (push) Failing after 7m1s

feat: unify income payment cards and drop period comparisons (WealthLedger/main#33)
This commit was merged in pull request #83.
This commit is contained in:
2026-10-13 18:16:46 +03:00
parent 90486d4237
commit 31b0e15579
14 changed files with 230 additions and 274 deletions
+18 -2
View File
@@ -77,7 +77,7 @@ describe('OpenAPI contract (integration)', () => {
}
});
it('exposes required semantic income dependency roles', () => {
it('exposes only the selected income dependency role and no comparison data', () => {
const schemas = createOpenApiDocument(app).components?.schemas;
expect(schemas?.IncomeAnalyticsResourceDto).toMatchObject({
properties: {
@@ -100,9 +100,25 @@ describe('OpenAPI contract (integration)', () => {
expect(dependency.required).toContain('role');
expect(dependency).toMatchObject({
properties: {
role: { type: 'string', enum: ['selected', 'previous', 'year'] },
role: { type: 'string', enum: ['selected'] },
},
});
const analytics = schemas?.IncomeAnalyticsDto;
assert(analytics && !('$ref' in analytics));
expect(analytics.required).toEqual(
expect.arrayContaining([
'accountId',
'period',
'totalsByCurrency',
'calculatedAt',
'bucketGranularity',
'buckets',
'instruments',
'entries',
]),
);
expect(analytics.properties).not.toHaveProperty('previous');
expect(analytics.properties).not.toHaveProperty('yearComparison');
});
it('generates the runtime contract without server startup or deployment configuration', async () => {