-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
3d2a7e3
commit e20fd02
Showing
14 changed files
with
136 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+10.2 KB
...pen-Ketcher-Brackets-rendering-for-whole-r-group-structure-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.1 KB
...ng-for-whole-r-group-structure-even-with-attachment-points-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9.64 KB
...-Group-tool-Brackets-rendering-for-whole-s-group-structure-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.5 KB
...ng-for-whole-s-group-structure-even-with-attachment-points-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/ketcher-core/__tests__/application/editor/actions/bond.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/ketcher-core/__tests__/application/render/restruct/rergroup.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ReRGroup, ReStruct } from 'application/render/restruct'; | ||
import { restruct } from '../../../mock-data'; | ||
import { RGroup } from 'domain/entities'; | ||
import { mock, mockFn } from 'jest-mock-extended'; | ||
import { Render } from 'src'; | ||
|
||
describe('rergroup should calculate R-Group bounding box correctly', () => { | ||
it('should calculate R-Group attachments points bounding box', () => { | ||
const render = mock<Render>(); | ||
render.ctab = { ...restruct.molecule } as unknown as ReStruct; | ||
const rGroup = new RGroup(); | ||
rGroup.frags.add(0); | ||
const rerGroup = new ReRGroup(rGroup); | ||
rerGroup.getAtoms = mockFn().mockReturnValue(restruct.molecule.atoms); | ||
const attachmentsSpy = jest.spyOn(render.ctab, 'getAttachmentsPointsVBox'); | ||
rerGroup.calcBBox(render); | ||
expect(attachmentsSpy).toHaveBeenCalled(); | ||
}); | ||
}); |
17 changes: 17 additions & 0 deletions
17
packages/ketcher-core/__tests__/domain/entities/sgroup.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ReStruct } from 'application/render/restruct'; | ||
import { restruct } from '../../mock-data'; | ||
import { SGroup } from 'domain/entities'; | ||
import { mock } from 'jest-mock-extended'; | ||
import { Render } from 'src'; | ||
|
||
describe('sgroup should calculate S-Group bounding box correctly', () => { | ||
it('should calculate S-Group attachments points bounding box', () => { | ||
const render = mock<Render>(); | ||
render.ctab = { ...restruct.molecule } as unknown as ReStruct; | ||
const sGroup = new SGroup('MUL'); | ||
sGroup.atoms = [0, 1, 2, 3, 4]; | ||
const attachmentsSpy = jest.spyOn(render.ctab, 'getAttachmentsPointsVBox'); | ||
SGroup.bracketPos(sGroup, restruct.molecule, {}, undefined, render); | ||
expect(attachmentsSpy).toHaveBeenCalled(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters