umstellung auf claud
This commit is contained in:
1 parent
4c60b59150
commit
6a15699d0f
29 files changed
+1132
-12
No files matched your search
@@ -3,6 +3,7 @@ import { describe, expect, it, jest } from '@jest/globals';
|
||||
import { UnitsService } from './units.service';
|
||||
import { UnitSchema } from '../../_schemas/anlagen/units';
|
||||
import { UnitTypeDto } from '../../_dto/anlagen/units';
|
||||
import { defaultMaterialSettings } from '../../_dto/anlagen/materialfluss';
|
||||
|
||||
describe('UnitsService.findAll', () => {
|
||||
it('zeigt ausschließlich Units der aktiven Anlage und liest die Auswahl nach jedem Wechsel neu', async () => {
|
||||
@@ -36,6 +37,7 @@ describe('UnitsService.copy', () => {
|
||||
const componentId = new Types.ObjectId();
|
||||
const source = {
|
||||
_id: new Types.ObjectId(), anlageId, name: 'SC', type: UnitTypeDto.GENERAL,
|
||||
materialFlow: { ...defaultMaterialSettings(), kind: 'storage' as const, fullSignalId: 'digital:original' },
|
||||
components: [{ _id: componentId, name: '', type: 'Allgemein' }],
|
||||
};
|
||||
const UnitModel = model('UnitCopyRegression', UnitSchema);
|
||||
@@ -51,6 +53,8 @@ describe('UnitsService.copy', () => {
|
||||
expect(result.components[0].name).toBe('unbenannt');
|
||||
expect(result.components[0].id).not.toBe(componentId.toString());
|
||||
expect(source.components[0].name).toBe('');
|
||||
expect((save.mock.contexts[0] as unknown as { materialFlow: { fullSignalId: string | null } }).materialFlow.fullSignalId).toBeNull();
|
||||
expect(source.materialFlow.fullSignalId).toBe('digital:original');
|
||||
expect(save).toHaveBeenCalledTimes(1);
|
||||
} finally {
|
||||
save.mockRestore();
|
||||
|
||||
Reference in new issue
Block a user