-
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.
- Loading branch information
1 parent
994bf83
commit 0af7763
Showing
1 changed file
with
18 additions
and
17 deletions.
There are no files selected for viewing
35 changes: 18 additions & 17 deletions
35
packages/ketcher-core/__tests__/application/render/renderers/PolymerBondRenderer.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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
// import { createPolymerEditorCanvas } from '../../../helpers/dom'; | ||
// import { getFinishedPolymerBond } from '../../../mock-data'; | ||
// import { PolymerBondRenderer } from 'application/render/renderers/PolymerBondRenderer'; | ||
import { createPolymerEditorCanvas } from '../../../helpers/dom'; | ||
import { getFinishedPolymerBond } from '../../../mock-data'; | ||
import { PolymerBondRenderer } from 'application/render/renderers/PolymerBondRenderer'; | ||
|
||
// describe('Polymer Bond Renderer', () => { | ||
// it('should render bond', () => { | ||
// const canvas: SVGSVGElement = createPolymerEditorCanvas(); | ||
// const polymerBond = getFinishedPolymerBond(10, 10, 90, 100); | ||
// polymerBond.moveToLinkedMonomers(); | ||
// const polymerBondRenderer = new PolymerBondRenderer(polymerBond); | ||
// global.SVGElement.prototype.getBBox = jest.fn(); | ||
// jest | ||
// .spyOn(global.SVGElement.prototype, 'getBBox') | ||
// .mockImplementation(() => ({ width: 30, height: 20 })); | ||
// polymerBondRenderer.show(); | ||
describe('Polymer Bond Renderer', () => { | ||
// Remove skip later! | ||
it.skip('should render bond', () => { | ||
const canvas: SVGSVGElement = createPolymerEditorCanvas(); | ||
const polymerBond = getFinishedPolymerBond(10, 10, 90, 100); | ||
polymerBond.moveToLinkedMonomers(); | ||
const polymerBondRenderer = new PolymerBondRenderer(polymerBond); | ||
global.SVGElement.prototype.getBBox = jest.fn(); | ||
jest | ||
.spyOn(global.SVGElement.prototype, 'getBBox') | ||
.mockImplementation(() => ({ width: 30, height: 20 })); | ||
polymerBondRenderer.show(); | ||
|
||
// expect(canvas).toMatchSnapshot(); | ||
// }); | ||
// }); | ||
expect(canvas).toMatchSnapshot(); | ||
}); | ||
}); |