TouchInteractionSpec.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import {
  2. bootstrapDiagram,
  3. inject
  4. } from 'test/TestHelper';
  5. import touchModule from 'lib/navigation/touch';
  6. import contextPadModule from 'lib/features/context-pad';
  7. import paletteModule from 'lib/features/palette';
  8. describe('navigation/touch', function() {
  9. describe('bootstrap', function() {
  10. beforeEach(bootstrapDiagram({ modules: [ touchModule ] }));
  11. it('should bootstrap', inject(function(canvas) {
  12. canvas.addShape({
  13. id: 'test',
  14. width: 100,
  15. height: 100,
  16. x: 100,
  17. y: 100
  18. });
  19. }));
  20. });
  21. describe('integration', function() {
  22. describe('contextPad', function() {
  23. beforeEach(bootstrapDiagram({ modules: [ contextPadModule, touchModule ] }));
  24. it('should integrate with contextPad.create', inject(function(canvas, contextPad) {
  25. canvas.addShape({
  26. id: 'test',
  27. width: 100,
  28. height: 100,
  29. x: 100,
  30. y: 100
  31. });
  32. }));
  33. });
  34. describe('palette', function() {
  35. beforeEach(bootstrapDiagram({ modules: [ paletteModule, touchModule ] }));
  36. it('should integrate with palette.create', inject(function(canvas, palette) {
  37. canvas.addShape({
  38. id: 'test',
  39. width: 100,
  40. height: 100,
  41. x: 100,
  42. y: 100
  43. });
  44. }));
  45. });
  46. });
  47. });