You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

text.test.ts 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import TestState from '../test-utils'
  2. describe('arrow shape', () => {
  3. const tt = new TestState()
  4. tt.resetDocumentState()
  5. it('creates shape', () => {
  6. tt.send('SELECTED_TEXT_TOOL')
  7. expect(tt.state.isIn('text.creating')).toBe(true)
  8. const id = tt.getSortedPageShapeIds()[0]
  9. tt.clickCanvas()
  10. expect(tt.state.isIn('editingShape')).toBe(true)
  11. tt.send('EDITED_SHAPE', {
  12. id,
  13. change: { text: 'Hello world' },
  14. })
  15. tt.send('BLURRED_EDITING_SHAPE', { id: id })
  16. expect(tt.state.isIn('selecting')).toBe(true)
  17. })
  18. it('cancels shape while creating', () => {
  19. // TODO
  20. null
  21. })
  22. it('moves shape', () => {
  23. // TODO
  24. null
  25. })
  26. it('rotates shape', () => {
  27. // TODO
  28. null
  29. })
  30. it('rotates shape in a group', () => {
  31. // TODO
  32. null
  33. })
  34. it('measures shape bounds', () => {
  35. // TODO
  36. null
  37. })
  38. it('measures shape rotated bounds', () => {
  39. // TODO
  40. null
  41. })
  42. it('transforms single shape', () => {
  43. // TODO
  44. null
  45. })
  46. it('transforms in a group', () => {
  47. // TODO
  48. null
  49. })
  50. /* -------------------- Specific -------------------- */
  51. it('scales', () => {
  52. // TODO
  53. null
  54. })
  55. it('selects different text on tap while editing', () => {
  56. // TODO
  57. null
  58. })
  59. })