-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react-grid): use correct cursors for dragging (#224)
- Loading branch information
Showing
7 changed files
with
52 additions
and
6 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
23 changes: 23 additions & 0 deletions
23
packages/dx-react-grid-bootstrap3/src/templates/drag-drop.test.jsx
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,23 @@ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
import { Container } from './drag-drop'; | ||
|
||
describe('Container', () => { | ||
it('should have correct styles', () => { | ||
const tree = mount( | ||
<Container | ||
columns={[{ | ||
name: 'Test', | ||
}]} | ||
clientOffset={{ x: 10, y: 20 }} | ||
columnTemplate={() => <div />} | ||
/>, | ||
); | ||
|
||
expect(tree.find('ul').prop('style')) | ||
.toMatchObject({ | ||
transform: 'translate(calc(10px - 50%), calc(20px - 50%))', | ||
cursor: 'move', | ||
}); | ||
}); | ||
}); |
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
22 changes: 22 additions & 0 deletions
22
packages/dx-react-grid-material-ui/src/templates/drag-drop.test.jsx
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,22 @@ | ||
import React from 'react'; | ||
import { Paper } from 'material-ui'; | ||
import { mountWithStyles } from '../utils/testing'; | ||
import { Container, styleSheet } from './drag-drop'; | ||
|
||
describe('Container', () => { | ||
it('should have correct styles', () => { | ||
const { tree, classes } = mountWithStyles( | ||
<Container | ||
columns={[{ | ||
name: 'Test', | ||
}]} | ||
clientOffset={{ x: 10, y: 20 }} | ||
columnTemplate={() => <div />} | ||
/>, | ||
styleSheet, | ||
); | ||
|
||
expect(tree.find(Paper).hasClass(classes.container)) | ||
.toBeTruthy(); | ||
}); | ||
}); |
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