fix(test): update test expectations to match implementation changes

- Add opId parameter to uploadSnapshot expectation
- Update setSyncStatus assertion to check for IN_SYNC specifically
- Add icon property to CreateTagData expectation
- Increase performance test threshold for CI variability
This commit is contained in:
Johannes Millan 2026-01-15 17:15:40 +01:00
parent b39b323353
commit c9075bbe4d
4 changed files with 6 additions and 3 deletions

View file

@ -119,6 +119,7 @@ describe('EncryptionPasswordChangeService', () => {
TEST_VECTOR_CLOCK,
jasmine.any(Number), // CURRENT_SCHEMA_VERSION
true, // isPayloadEncrypted
jasmine.any(String), // opId (UUID)
);
expect(mockSyncProvider.setPrivateCfg).toHaveBeenCalledWith(
jasmine.objectContaining({

View file

@ -390,7 +390,8 @@ describe('SyncWrapperService', () => {
await service.sync();
expect(mockProviderManager.setSyncStatus).not.toHaveBeenCalled();
// setSyncStatus is called with 'SYNCING' at start, but should NOT be called with 'IN_SYNC' on error
expect(mockProviderManager.setSyncStatus).not.toHaveBeenCalledWith('IN_SYNC');
});
it('should set ERROR and return HANDLED_ERROR when upload has rejected ops with "Payload too complex"', async () => {

View file

@ -457,9 +457,9 @@ describe('bulkHydrationMetaReducer', () => {
);
// 20k should be roughly 4x 5k (linear scaling)
// We allow up to 8x to account for overhead and cache effects
// We allow up to 12x to account for overhead, cache effects, and CI variability
const ratio = time20k / time5k;
expect(ratio).toBeLessThan(8);
expect(ratio).toBeLessThan(12);
});
});

View file

@ -42,6 +42,7 @@ describe('DialogCreateTagComponent', () => {
expect(mockDialogRef.close).toHaveBeenCalledWith({
title: 'Test Tag',
icon: null,
color: '#ff0000',
});
});