From 9b24335dd7f15844dfeb869719cadf0709949839 Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Fri, 7 Aug 2020 13:36:49 +0200 Subject: [PATCH 01/37] Added manual tests for the list styles feature. --- .../tests/manual/list-styles.html | 180 ++++++++++++++++++ .../tests/manual/list-styles.js | 45 +++++ .../tests/manual/list-styles.md | 17 ++ 3 files changed, 242 insertions(+) create mode 100644 packages/ckeditor5-list/tests/manual/list-styles.html create mode 100644 packages/ckeditor5-list/tests/manual/list-styles.js create mode 100644 packages/ckeditor5-list/tests/manual/list-styles.md diff --git a/packages/ckeditor5-list/tests/manual/list-styles.html b/packages/ckeditor5-list/tests/manual/list-styles.html new file mode 100644 index 00000000000..805ebfd98f8 --- /dev/null +++ b/packages/ckeditor5-list/tests/manual/list-styles.html @@ -0,0 +1,180 @@ +
+

Default styles

+
+ + + + + + + + + + + + + + +
+ Default styles +
BulletedNumbered
+
    +
  • UL List item 1
  • +
  • UL List item 2
  • +
  • UL List item 3
  • +
+
+
    +
  1. OL List item 1
  2. +
  3. OL List item 2
  4. +
  5. OL List item 3
  6. +
+
+
+ +

Bulleted lists

+
+ + + + + + + + + + + + + + + + + + +
+ Type of list +
CircleDiscSquare'👉'
+
    +
  • UL List item 1
  • +
  • UL List item 2
  • +
  • UL List item 3
  • +
+
+
    +
  • UL List item 1
  • +
  • UL List item 2
  • +
  • UL List item 3
  • +
+
+
    +
  • UL List item 1
  • +
  • UL List item 2
  • +
  • UL List item 3
  • +
+
+
    +
  • UL List item 1
  • +
  • UL List item 2
  • +
  • UL List item 3
  • +
+
+
+ +

Numbered lists

+
+ + + + + + + + + + + + + + + + + + +
+ Type of list +
DecimalDecimal-leading-zeroLower-latinLower-roman
+
    +
  1. OL List item 1
  2. +
  3. OL List item 2
  4. +
  5. OL List item 3
  6. +
+
+
    +
  1. OL List item 1
  2. +
  3. OL List item 2
  4. +
  5. OL List item 3
  6. +
+
+
    +
  1. OL List item 1
  2. +
  3. OL List item 2
  4. +
  5. OL List item 3
  6. +
+
+
    +
  1. OL List item 1
  2. +
  3. OL List item 2
  4. +
  5. OL List item 3
  6. +
+
+
+ +

Nested/mixed lists (numbered and bulleted)

+
+ + + + + +
+
    +
  1. OL 1.1 OL[style: lower-roman]
  2. +
  3. OL 1.2 OL[style: lower-roman] +
      +
    • UL 1.2.1 OL[style: lower-roman] > UL[style: square]
    • +
    • UL 1.2.2 OL[style: lower-roman] > UL[style: square]
    • +
    • UL 1.2.3 OL[style: lower-roman] > UL[style: square]
    • +
    +
  4. +
  5. OL 1.3 OL[style: lower-roman]
  6. +
  7. OL 1.4 OL[style: lower-roman]
  8. +
      +
    1. OL 1.4.1 OL[style: lower-roman] > OL[style: lower-alpha]
    2. +
    3. OL 1.4.2 OL[style: lower-roman] > OL[style: lower-alpha]
    4. +
    5. OL 1.4.3 OL[style: lower-roman] > OL[style: lower-alpha]
    6. +
    + +
  9. OL 1.5 OL[style: lower-roman]
  10. +
  11. OL 1.6 OL[style: lower-roman]
  12. +
+
+
    +
  1. OL 2.1 OL[style: upper-alpha] +
      +
    1. OL 2.2.1 OL[style: lower-alpha] > OL[style: lower-greek] +
        +
      • UL 2.2.1.1 ... > OL[style: lower-greek] > UL[style: circle]
      • +
      • UL 2.2.1.2 ... > OL[style: lower-greek] > UL[style: circle]
      • +
      • UL 2.2.1.3 ... > OL[style: lower-greek] > UL[style: circle]
      • +
      +
    2. +
    3. OL 2.2.2 OL[style: lower-alpha] > OL[style: lower-greek]
    4. +
    5. OL 2.2.3 OL[style: lower-alpha] > OL[style: lower-greek]
    6. +
    +
  2. +
  3. OL 2.2 OL[style: upper-alpha]
  4. +
+
+
+
diff --git a/packages/ckeditor5-list/tests/manual/list-styles.js b/packages/ckeditor5-list/tests/manual/list-styles.js new file mode 100644 index 00000000000..0c57954e949 --- /dev/null +++ b/packages/ckeditor5-list/tests/manual/list-styles.js @@ -0,0 +1,45 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/* globals console, window, document */ + +import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; +import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials'; +import Code from '@ckeditor/ckeditor5-basic-styles/src/code'; +import Heading from '@ckeditor/ckeditor5-heading/src/heading'; +import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; +import Table from '@ckeditor/ckeditor5-table/src/table'; +import TablePropertiesEditing from '@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesediting'; +import TableCellPropertiesEditing from '@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting'; +import List from '../../src/list'; +import ListStyles from '../../src/liststyles'; + +ClassicEditor + .create( document.querySelector( '#editor' ), { + plugins: [ + Essentials, + Code, + Heading, + List, + Paragraph, + ListStyles, + Table, + TablePropertiesEditing, + TableCellPropertiesEditing + ], + toolbar: [ + 'heading', + '|', + 'bulletedList', 'numberedList', + '|', + 'undo', 'redo' + ] + } ) + .then( editor => { + window.editor = editor; + } ) + .catch( err => { + console.error( err.stack ); + } ); diff --git a/packages/ckeditor5-list/tests/manual/list-styles.md b/packages/ckeditor5-list/tests/manual/list-styles.md new file mode 100644 index 00000000000..b6c06834cef --- /dev/null +++ b/packages/ckeditor5-list/tests/manual/list-styles.md @@ -0,0 +1,17 @@ +# List Styles feature + +The editor should display 4 headers and tables. + +1. **Default styles**
+ A table should contain two columns that display default styles for `