integration.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
  6. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  7. import ShiftEnter from '@ckeditor/ckeditor5-enter/src/shiftenter';
  8. import Heading from '@ckeditor/ckeditor5-heading/src/heading';
  9. import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
  10. import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
  11. import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
  12. import Link from '@ckeditor/ckeditor5-link/src/link';
  13. import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
  14. import List from '@ckeditor/ckeditor5-list/src/list';
  15. import Image from '@ckeditor/ckeditor5-image/src/image';
  16. import Table from '@ckeditor/ckeditor5-table/src/table';
  17. import PasteFromOffice from '../../src/pastefromoffice';
  18. import { generateTests } from '../_utils/utils';
  19. const browsers = [ 'chrome', 'firefox', 'safari', 'edge' ];
  20. describe( 'PasteFromOffice - integration', () => {
  21. generateTests( {
  22. input: 'basic-styles',
  23. type: 'integration',
  24. browsers,
  25. editorConfig: {
  26. plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Strikethrough, PasteFromOffice ]
  27. },
  28. skip: {
  29. safari: [ 'italicStartingText', 'multipleStylesSingleLine', 'multipleStylesMultiline' ] // Skip due to spacing issue (#13).
  30. }
  31. } );
  32. generateTests( {
  33. input: 'image',
  34. type: 'integration',
  35. browsers,
  36. editorConfig: {
  37. plugins: [ Clipboard, Paragraph, Image, Table, PasteFromOffice ]
  38. },
  39. skip: {
  40. chrome: [],
  41. firefox: [],
  42. safari: [],
  43. edge: [ 'adjacentGroups' ]
  44. }
  45. } );
  46. generateTests( {
  47. input: 'link',
  48. type: 'integration',
  49. browsers,
  50. editorConfig: {
  51. plugins: [ Clipboard, Paragraph, Heading, Bold, Link, ShiftEnter, PasteFromOffice ]
  52. },
  53. skip: {
  54. safari: [ 'combined' ] // Skip due to spacing issue (#13).
  55. }
  56. } );
  57. generateTests( {
  58. input: 'list',
  59. type: 'integration',
  60. browsers,
  61. editorConfig: {
  62. plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Link, List, PasteFromOffice ]
  63. },
  64. skip: {
  65. safari: [ 'heading3Styled' ] // Skip due to spacing issue (#13).
  66. }
  67. } );
  68. generateTests( {
  69. input: 'spacing',
  70. type: 'integration',
  71. browsers,
  72. editorConfig: {
  73. plugins: [ Clipboard, Paragraph, Bold, Italic, Underline, PasteFromOffice ]
  74. }
  75. } );
  76. generateTests( {
  77. input: 'google-docs-bold-wrapper',
  78. type: 'integration',
  79. browsers,
  80. editorConfig: {
  81. plugins: [ Clipboard, Paragraph, Bold, PasteFromOffice ]
  82. }
  83. } );
  84. generateTests( {
  85. input: 'google-docs-list',
  86. type: 'integration',
  87. browsers,
  88. editorConfig: {
  89. plugins: [ Clipboard, Paragraph, List, PasteFromOffice ]
  90. }
  91. } );
  92. generateTests( {
  93. input: 'generic-list-in-table',
  94. type: 'integration',
  95. browsers,
  96. editorConfig: {
  97. plugins: [ Clipboard, Paragraph, List, Table, Bold, PasteFromOffice ]
  98. }
  99. } );
  100. } );