| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- /**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
- import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
- import ShiftEnter from '@ckeditor/ckeditor5-enter/src/shiftenter';
- import Heading from '@ckeditor/ckeditor5-heading/src/heading';
- import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
- import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
- import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
- import Link from '@ckeditor/ckeditor5-link/src/link';
- import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
- import List from '@ckeditor/ckeditor5-list/src/list';
- import Image from '@ckeditor/ckeditor5-image/src/image';
- import Table from '@ckeditor/ckeditor5-table/src/table';
- import env from '@ckeditor/ckeditor5-utils/src/env';
- import PasteFromOffice from '../../src/pastefromoffice';
- import { generateTests } from '../_utils/utils';
- const browsers = [ 'chrome', 'firefox', 'safari', 'edge' ];
- describe( 'Paste from Office - automatic', () => {
- generateTests( {
- input: 'basic-styles',
- type: 'integration',
- dataSource: 'MS Word',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Strikethrough, PasteFromOffice ]
- },
- skip: {
- safari: [ 'italicStartingText', 'multipleStylesSingleLine', 'multipleStylesMultiline' ] // Skip due to spacing issue (#13).
- }
- } );
- generateTests( {
- input: 'image',
- type: 'integration',
- dataSource: 'MS Word',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Image, Table, PasteFromOffice ]
- },
- skip: {
- chrome: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
- firefox: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
- safari: ( env.isEdge ? [ 'adjacentGroups' ] : [] ),
- edge: ( env.isEdge ? [] : [ 'adjacentGroups' ] )
- }
- } );
- generateTests( {
- input: 'link',
- type: 'integration',
- dataSource: 'MS Word',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Heading, Bold, Link, ShiftEnter, PasteFromOffice ]
- },
- skip: {
- safari: [ 'combined' ] // Skip due to spacing issue (#13).
- }
- } );
- generateTests( {
- input: 'list',
- type: 'integration',
- dataSource: 'MS Word',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Link, List, PasteFromOffice ]
- },
- skip: {
- safari: [ 'heading3Styled' ] // Skip due to spacing issue (#13).
- }
- } );
- generateTests( {
- input: 'spacing',
- type: 'integration',
- dataSource: 'MS Word',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Bold, Italic, Underline, PasteFromOffice ]
- }
- } );
- generateTests( {
- input: 'simpleText',
- type: 'integration',
- dataSource: 'Google Docs',
- browsers,
- editorConfig: {
- plugins: [ Clipboard, Paragraph, Bold, PasteFromOffice ]
- }
- } );
- } );
|