@atlaskit/editor-plugin-table 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/plugins/table/index.js +5 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/index.js +3 -4
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/index.js +5 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/index.d.ts +1 -0
- package/dist/types-ts4.0/plugins/plugin-key.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/commands/clear.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/commands/collapse.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/commands/go-to-next-cell.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/commands/hover.d.ts +8 -0
- package/dist/types-ts4.0/plugins/table/commands/index.d.ts +7 -0
- package/dist/types-ts4.0/plugins/table/commands/insert.d.ts +10 -0
- package/dist/types-ts4.0/plugins/table/commands/misc.d.ts +27 -0
- package/dist/types-ts4.0/plugins/table/commands/selection.d.ts +8 -0
- package/dist/types-ts4.0/plugins/table/commands/sort.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/commands/split-cell.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/commands/toggle.d.ts +12 -0
- package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +26 -0
- package/dist/types-ts4.0/plugins/table/create-plugin-config.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/event-handlers.d.ts +16 -0
- package/dist/types-ts4.0/plugins/table/handlers.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/index.d.ts +17 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +26 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/TableComponent.d.ts +72 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +9 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +9 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/table.d.ts +31 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/tableCell.d.ts +19 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/types.d.ts +23 -0
- package/dist/types-ts4.0/plugins/table/nodeviews/update-overflow-shadows.d.ts +8 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/plugin.d.ts +7 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/index.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/types.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/default-table-selection.d.ts +5 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/keymap.d.ts +5 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/main.d.ts +8 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-factory.d.ts +1 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/commands.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/index.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +65 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/types.d.ts +16 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/util.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-local-id.d.ts +22 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/commands.d.ts +25 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/reducer.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +8 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +14 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +13 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +12 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +22 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +29 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +17 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +22 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +1 -0
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-selection-keymap.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/reducer.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +1 -0
- package/dist/types-ts4.0/plugins/table/toolbar.d.ts +36 -0
- package/dist/types-ts4.0/plugins/table/transforms/column-width.d.ts +18 -0
- package/dist/types-ts4.0/plugins/table/transforms/delete-columns.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/transforms/delete-rows.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +10 -0
- package/dist/types-ts4.0/plugins/table/transforms/index.d.ts +7 -0
- package/dist/types-ts4.0/plugins/table/transforms/merge.d.ts +5 -0
- package/dist/types-ts4.0/plugins/table/transforms/metadata.d.ts +21 -0
- package/dist/types-ts4.0/plugins/table/transforms/replace-table.d.ts +5 -0
- package/dist/types-ts4.0/plugins/table/transforms/split.d.ts +9 -0
- package/dist/types-ts4.0/plugins/table/types.d.ts +328 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/index.d.ts +29 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +87 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/index.d.ts +22 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +14 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +10 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/index.d.ts +54 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +12 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +3 -0
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/index.d.ts +35 -0
- package/dist/types-ts4.0/plugins/table/ui/LayoutButton/index.d.ts +21 -0
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +19 -0
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +21 -0
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +17 -0
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/index.d.ts +40 -0
- package/dist/types-ts4.0/plugins/table/ui/common-styles.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/ui/consts.d.ts +39 -0
- package/dist/types-ts4.0/plugins/table/ui/messages.d.ts +38 -0
- package/dist/types-ts4.0/plugins/table/ui/ui-styles.d.ts +15 -0
- package/dist/types-ts4.0/plugins/table/utils/analytics.d.ts +18 -0
- package/dist/types-ts4.0/plugins/table/utils/collapse.d.ts +29 -0
- package/dist/types-ts4.0/plugins/table/utils/column-controls.d.ts +10 -0
- package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +16 -0
- package/dist/types-ts4.0/plugins/table/utils/dom.d.ts +20 -0
- package/dist/types-ts4.0/plugins/table/utils/get-allow-add-column-custom-step.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/utils/index.d.ts +11 -0
- package/dist/types-ts4.0/plugins/table/utils/nodes.d.ts +12 -0
- package/dist/types-ts4.0/plugins/table/utils/paste.d.ts +14 -0
- package/dist/types-ts4.0/plugins/table/utils/referentiality.d.ts +2 -0
- package/dist/types-ts4.0/plugins/table/utils/row-controls.d.ts +16 -0
- package/dist/types-ts4.0/plugins/table/utils/selection.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/utils/table.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table/utils/update-plugin-state-decorations.d.ts +4 -0
- package/dist/types-ts4.0/plugins/table-plugin.d.ts +2 -0
- package/dist/types-ts4.0/types.d.ts +3 -0
- package/examples/99-testing.tsx +227 -0
- package/package.json +18 -5
- package/src/plugins/table/__tests__/integration/__fixtures__/auto-size-documents.ts +439 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/basic-table.ts +120 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/empty-paragraph-underneath-table.ts +396 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/even-columns.ts +493 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/layout-documents.ts +607 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/merged-rows-and-cols-document.ts +343 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/nested-in-extension.ts +163 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/paragraph-and-table-adf.json +130 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/resize-documents.ts +1610 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/scale.ts +825 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/table-inside-layout.ts +145 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/table-with-min-width-columns-document.ts +175 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/table-with-multiline-date.adf.json +168 -0
- package/src/plugins/table/__tests__/integration/__fixtures__/table-with-text-and-empty-row.ts +216 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/auto-size.ts.snap +609 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/change-date-inside-table.ts.snap +173 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/copy-button.ts.snap +421 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-columns.ts.snap +818 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +119 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +119 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +227 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-rows.ts.snap +959 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/delete-table-when-selected.ts.snap +101 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +502 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/even-columns.ts.snap +645 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +172 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/insert-row-inside-layout.ts.snap +238 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/layout.ts.snap +1645 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/resize.ts.snap +2674 -0
- package/src/plugins/table/__tests__/integration/__snapshots__/scale.ts.snap +1083 -0
- package/src/plugins/table/__tests__/integration/arrow-down-into-table.ts +38 -0
- package/src/plugins/table/__tests__/integration/auto-size.ts +87 -0
- package/src/plugins/table/__tests__/integration/block-node-selection.ts +162 -163
- package/src/plugins/table/__tests__/integration/cell-selection.ts +101 -0
- package/src/plugins/table/__tests__/integration/change-date-inside-table.ts +47 -0
- package/src/plugins/table/__tests__/integration/copy-button.ts +179 -0
- package/src/plugins/table/__tests__/integration/delete-columns.ts +95 -0
- package/src/plugins/table/__tests__/integration/delete-last-column-in-full-width.ts +70 -0
- package/src/plugins/table/__tests__/integration/delete-last-column-with-empty-action.ts +58 -0
- package/src/plugins/table/__tests__/integration/delete-last-row-with-empty-action.ts +97 -0
- package/src/plugins/table/__tests__/integration/delete-rows.ts +122 -0
- package/src/plugins/table/__tests__/integration/delete-table-when-selected.ts +110 -0
- package/src/plugins/table/__tests__/integration/deleting-empty-paragraph-under-table.ts +86 -0
- package/src/plugins/table/__tests__/integration/even-columns.ts +72 -0
- package/src/plugins/table/__tests__/integration/insert-cell-header-with-strong-mark.ts +40 -0
- package/src/plugins/table/__tests__/integration/insert-long-smart-link.ts +52 -0
- package/src/plugins/table/__tests__/integration/insert-row-inside-layout.ts +47 -0
- package/src/plugins/table/__tests__/integration/layout.ts +224 -0
- package/src/plugins/table/__tests__/integration/resize-handler.ts +101 -0
- package/src/plugins/table/__tests__/integration/resize.ts +342 -0
- package/src/plugins/table/__tests__/integration/scale.ts +67 -0
- package/src/plugins/table/__tests__/integration/table-controls-selection.ts +70 -0
- package/src/plugins/table/index.tsx +3 -3
- package/src/plugins/table/ui/FloatingContextualButton/index.tsx +2 -2
- package/types/package.json +8 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
//import { runBlockNodeSelectionTestSuite } from '@atlaskit/editor-test-helpers/integration/selection';
|
|
2
|
+
// import { _getCopyButtonTestSuite } from '@atlaskit/editor-core/src/plugins/copy-button/__tests__/integration/_getCopyButtonTestSuite';
|
|
3
|
+
|
|
4
|
+
test.todo('TODO: ED-15706 We disabled the copy button');
|
|
5
|
+
// _getCopyButtonTestSuite({
|
|
6
|
+
// nodeName: 'Table',
|
|
7
|
+
// editorOptions: {
|
|
8
|
+
// allowTables: {
|
|
9
|
+
// advanced: true,
|
|
10
|
+
// },
|
|
11
|
+
// defaultValue: {
|
|
12
|
+
// version: 1,
|
|
13
|
+
// type: 'doc',
|
|
14
|
+
// content: [
|
|
15
|
+
// {
|
|
16
|
+
// type: 'table',
|
|
17
|
+
// attrs: {
|
|
18
|
+
// isNumberColumnEnabled: false,
|
|
19
|
+
// layout: 'default',
|
|
20
|
+
// localId: '15804638-b946-4591-b64c-beffe5122733',
|
|
21
|
+
// },
|
|
22
|
+
// content: [
|
|
23
|
+
// {
|
|
24
|
+
// type: 'tableRow',
|
|
25
|
+
// content: [
|
|
26
|
+
// {
|
|
27
|
+
// type: 'tableHeader',
|
|
28
|
+
// attrs: {},
|
|
29
|
+
// content: [
|
|
30
|
+
// {
|
|
31
|
+
// type: 'paragraph',
|
|
32
|
+
// content: [
|
|
33
|
+
// {
|
|
34
|
+
// type: 'text',
|
|
35
|
+
// text: '1',
|
|
36
|
+
// },
|
|
37
|
+
// ],
|
|
38
|
+
// },
|
|
39
|
+
// ],
|
|
40
|
+
// },
|
|
41
|
+
// {
|
|
42
|
+
// type: 'tableHeader',
|
|
43
|
+
// attrs: {},
|
|
44
|
+
// content: [
|
|
45
|
+
// {
|
|
46
|
+
// type: 'paragraph',
|
|
47
|
+
// content: [
|
|
48
|
+
// {
|
|
49
|
+
// type: 'text',
|
|
50
|
+
// text: '2',
|
|
51
|
+
// },
|
|
52
|
+
// ],
|
|
53
|
+
// },
|
|
54
|
+
// ],
|
|
55
|
+
// },
|
|
56
|
+
// {
|
|
57
|
+
// type: 'tableHeader',
|
|
58
|
+
// attrs: {},
|
|
59
|
+
// content: [
|
|
60
|
+
// {
|
|
61
|
+
// type: 'paragraph',
|
|
62
|
+
// content: [
|
|
63
|
+
// {
|
|
64
|
+
// type: 'text',
|
|
65
|
+
// text: '3',
|
|
66
|
+
// },
|
|
67
|
+
// ],
|
|
68
|
+
// },
|
|
69
|
+
// ],
|
|
70
|
+
// },
|
|
71
|
+
// ],
|
|
72
|
+
// },
|
|
73
|
+
// {
|
|
74
|
+
// type: 'tableRow',
|
|
75
|
+
// content: [
|
|
76
|
+
// {
|
|
77
|
+
// type: 'tableCell',
|
|
78
|
+
// attrs: {},
|
|
79
|
+
// content: [
|
|
80
|
+
// {
|
|
81
|
+
// type: 'paragraph',
|
|
82
|
+
// content: [
|
|
83
|
+
// {
|
|
84
|
+
// type: 'text',
|
|
85
|
+
// text: '4',
|
|
86
|
+
// },
|
|
87
|
+
// ],
|
|
88
|
+
// },
|
|
89
|
+
// ],
|
|
90
|
+
// },
|
|
91
|
+
// {
|
|
92
|
+
// type: 'tableCell',
|
|
93
|
+
// attrs: {},
|
|
94
|
+
// content: [
|
|
95
|
+
// {
|
|
96
|
+
// type: 'paragraph',
|
|
97
|
+
// content: [
|
|
98
|
+
// {
|
|
99
|
+
// type: 'text',
|
|
100
|
+
// text: '5',
|
|
101
|
+
// },
|
|
102
|
+
// ],
|
|
103
|
+
// },
|
|
104
|
+
// ],
|
|
105
|
+
// },
|
|
106
|
+
// {
|
|
107
|
+
// type: 'tableCell',
|
|
108
|
+
// attrs: {},
|
|
109
|
+
// content: [
|
|
110
|
+
// {
|
|
111
|
+
// type: 'paragraph',
|
|
112
|
+
// content: [
|
|
113
|
+
// {
|
|
114
|
+
// type: 'text',
|
|
115
|
+
// text: '6',
|
|
116
|
+
// },
|
|
117
|
+
// ],
|
|
118
|
+
// },
|
|
119
|
+
// ],
|
|
120
|
+
// },
|
|
121
|
+
// ],
|
|
122
|
+
// },
|
|
123
|
+
// {
|
|
124
|
+
// type: 'tableRow',
|
|
125
|
+
// content: [
|
|
126
|
+
// {
|
|
127
|
+
// type: 'tableCell',
|
|
128
|
+
// attrs: {},
|
|
129
|
+
// content: [
|
|
130
|
+
// {
|
|
131
|
+
// type: 'paragraph',
|
|
132
|
+
// content: [
|
|
133
|
+
// {
|
|
134
|
+
// type: 'text',
|
|
135
|
+
// text: '7',
|
|
136
|
+
// },
|
|
137
|
+
// ],
|
|
138
|
+
// },
|
|
139
|
+
// ],
|
|
140
|
+
// },
|
|
141
|
+
// {
|
|
142
|
+
// type: 'tableCell',
|
|
143
|
+
// attrs: {},
|
|
144
|
+
// content: [
|
|
145
|
+
// {
|
|
146
|
+
// type: 'paragraph',
|
|
147
|
+
// content: [
|
|
148
|
+
// {
|
|
149
|
+
// type: 'text',
|
|
150
|
+
// text: '8',
|
|
151
|
+
// },
|
|
152
|
+
// ],
|
|
153
|
+
// },
|
|
154
|
+
// ],
|
|
155
|
+
// },
|
|
156
|
+
// {
|
|
157
|
+
// type: 'tableCell',
|
|
158
|
+
// attrs: {},
|
|
159
|
+
// content: [
|
|
160
|
+
// {
|
|
161
|
+
// type: 'paragraph',
|
|
162
|
+
// content: [
|
|
163
|
+
// {
|
|
164
|
+
// type: 'text',
|
|
165
|
+
// text: '9',
|
|
166
|
+
// },
|
|
167
|
+
// ],
|
|
168
|
+
// },
|
|
169
|
+
// ],
|
|
170
|
+
// },
|
|
171
|
+
// ],
|
|
172
|
+
// },
|
|
173
|
+
// ],
|
|
174
|
+
// },
|
|
175
|
+
// ],
|
|
176
|
+
// },
|
|
177
|
+
// },
|
|
178
|
+
// nodeSelector: '.pm-table-cell-content-wrap',
|
|
179
|
+
// });
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createIntl } from 'react-intl-next';
|
|
2
|
+
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
editable,
|
|
6
|
+
getDocFromElement,
|
|
7
|
+
fullpage,
|
|
8
|
+
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
import { documentWithMergedCells } from './__fixtures__/merged-rows-and-cols-document';
|
|
10
|
+
import { TableCssClassName as ClassName } from '@atlaskit/editor-core/src/plugins/table/types';
|
|
11
|
+
import {
|
|
12
|
+
goToEditorTestingWDExample,
|
|
13
|
+
mountEditor,
|
|
14
|
+
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
15
|
+
import messages from '@atlaskit/editor-core/src/plugins/table/ui/messages';
|
|
16
|
+
|
|
17
|
+
BrowserTestCase(
|
|
18
|
+
'Should delete merged columns from contextual menu and append missing cells to the table',
|
|
19
|
+
{ skip: ['firefox', 'safari'] },
|
|
20
|
+
async (client: any, testName: string) => {
|
|
21
|
+
const page = await goToEditorTestingWDExample(
|
|
22
|
+
client,
|
|
23
|
+
'editor-plugin-table',
|
|
24
|
+
);
|
|
25
|
+
const intl = createIntl({
|
|
26
|
+
locale: 'en',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
await mountEditor(page, {
|
|
30
|
+
appearance: fullpage.appearance,
|
|
31
|
+
defaultValue: JSON.stringify(documentWithMergedCells),
|
|
32
|
+
allowTables: {
|
|
33
|
+
advanced: true,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const controlSelector = `tbody tr:first-child th:nth-child(2)`;
|
|
38
|
+
await page.waitForSelector(controlSelector);
|
|
39
|
+
await page.click(controlSelector);
|
|
40
|
+
|
|
41
|
+
const contextMenuTriggerSelector = `.${ClassName.CONTEXTUAL_MENU_BUTTON}`;
|
|
42
|
+
await page.waitForSelector(contextMenuTriggerSelector);
|
|
43
|
+
await page.click(contextMenuTriggerSelector);
|
|
44
|
+
|
|
45
|
+
const message = await intl.formatMessage(messages.removeColumns, {
|
|
46
|
+
0: 1,
|
|
47
|
+
});
|
|
48
|
+
const contextMenuItemSelector = `span=${message}`;
|
|
49
|
+
await page.waitForSelector(contextMenuItemSelector);
|
|
50
|
+
await page.click(contextMenuItemSelector);
|
|
51
|
+
|
|
52
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
53
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
BrowserTestCase(
|
|
58
|
+
'Should delete merged columns from contextual menu and decrement colspan of the spanning cell',
|
|
59
|
+
{ skip: ['firefox', 'safari'] },
|
|
60
|
+
async (client: any, testName: string) => {
|
|
61
|
+
const page = await goToEditorTestingWDExample(
|
|
62
|
+
client,
|
|
63
|
+
'editor-plugin-table',
|
|
64
|
+
);
|
|
65
|
+
const intl = createIntl({
|
|
66
|
+
locale: 'en',
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
await mountEditor(page, {
|
|
70
|
+
appearance: fullpage.appearance,
|
|
71
|
+
defaultValue: JSON.stringify(documentWithMergedCells),
|
|
72
|
+
allowTables: {
|
|
73
|
+
advanced: true,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const controlSelector = `tbody tr:first-child th:nth-child(3)`;
|
|
78
|
+
await page.waitForSelector(controlSelector);
|
|
79
|
+
await page.click(controlSelector);
|
|
80
|
+
|
|
81
|
+
const contextMenuTriggerSelector = `.${ClassName.CONTEXTUAL_MENU_BUTTON}`;
|
|
82
|
+
await page.waitForSelector(contextMenuTriggerSelector);
|
|
83
|
+
await page.click(contextMenuTriggerSelector);
|
|
84
|
+
|
|
85
|
+
const message = await intl.formatMessage(messages.removeColumns, {
|
|
86
|
+
0: 1,
|
|
87
|
+
});
|
|
88
|
+
const contextMenuItemSelector = `span=${message}`;
|
|
89
|
+
await page.waitForSelector(contextMenuItemSelector);
|
|
90
|
+
await page.click(contextMenuItemSelector);
|
|
91
|
+
|
|
92
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
93
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
94
|
+
},
|
|
95
|
+
);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
editable,
|
|
5
|
+
getDocFromElement,
|
|
6
|
+
fullpage,
|
|
7
|
+
quickInsert,
|
|
8
|
+
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
import { TableCssClassName as ClassName } from '@atlaskit/editor-core/src/plugins/table/types';
|
|
10
|
+
import {
|
|
11
|
+
goToEditorTestingWDExample,
|
|
12
|
+
mountEditor,
|
|
13
|
+
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
14
|
+
|
|
15
|
+
// ED-6231
|
|
16
|
+
BrowserTestCase(
|
|
17
|
+
'Delete last table column in full-width mode',
|
|
18
|
+
// Only Chrome has logging support in BrowserStack now
|
|
19
|
+
{ skip: ['safari'] },
|
|
20
|
+
async (client: any, testName: string) => {
|
|
21
|
+
const page = await goToEditorTestingWDExample(
|
|
22
|
+
client,
|
|
23
|
+
'editor-plugin-table',
|
|
24
|
+
);
|
|
25
|
+
await mountEditor(
|
|
26
|
+
page,
|
|
27
|
+
{
|
|
28
|
+
appearance: fullpage.appearance,
|
|
29
|
+
allowTables: {
|
|
30
|
+
advanced: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{ i18n: { locale: 'en' } },
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
await page.click(editable);
|
|
37
|
+
|
|
38
|
+
// Insert table
|
|
39
|
+
await quickInsert(page, 'Table');
|
|
40
|
+
|
|
41
|
+
// Change layout to full-width
|
|
42
|
+
await page.waitForSelector(`.${ClassName.LAYOUT_BUTTON}`);
|
|
43
|
+
await page.click(`.${ClassName.LAYOUT_BUTTON}`);
|
|
44
|
+
await page.click(`.${ClassName.LAYOUT_BUTTON}`);
|
|
45
|
+
|
|
46
|
+
await page.click(editable);
|
|
47
|
+
|
|
48
|
+
// Select button wrapper from last column
|
|
49
|
+
const controlSelector = `.${ClassName.COLUMN_CONTROLS_DECORATIONS}[data-start-index="2"]`;
|
|
50
|
+
await page.waitForSelector(controlSelector);
|
|
51
|
+
await page.hover(controlSelector);
|
|
52
|
+
await page.click(controlSelector);
|
|
53
|
+
|
|
54
|
+
// Click on delete row button
|
|
55
|
+
const deleteButtonSelector = `.${ClassName.CONTROLS_DELETE_BUTTON_WRAP} .${ClassName.CONTROLS_DELETE_BUTTON}`;
|
|
56
|
+
await page.waitForVisible(deleteButtonSelector);
|
|
57
|
+
await page.click(deleteButtonSelector);
|
|
58
|
+
|
|
59
|
+
// await page.checkConsoleErrors({
|
|
60
|
+
// ignoreErrors: [
|
|
61
|
+
// /is potentially unsafe when doing server-side rendering\. Try changing it to/,
|
|
62
|
+
// ],
|
|
63
|
+
// });
|
|
64
|
+
|
|
65
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
66
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
it.todo('ED-15748: Test is not working properly with checkConsoleErrors');
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
editable,
|
|
5
|
+
getDocFromElement,
|
|
6
|
+
fullpage,
|
|
7
|
+
quickInsert,
|
|
8
|
+
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
import { TableCssClassName as ClassName } from '@atlaskit/editor-core/src/plugins/table/types';
|
|
10
|
+
import {
|
|
11
|
+
goToEditorTestingWDExample,
|
|
12
|
+
mountEditor,
|
|
13
|
+
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
14
|
+
|
|
15
|
+
BrowserTestCase(
|
|
16
|
+
'delete-last-column-with-empty-action.ts: Delete last table column with empty action',
|
|
17
|
+
{},
|
|
18
|
+
async (client: any, testName: string) => {
|
|
19
|
+
const LAST_HEADER_FROM_FIRST_ROW =
|
|
20
|
+
'table > tbody > tr:first-child > th:last-child';
|
|
21
|
+
|
|
22
|
+
const page = await goToEditorTestingWDExample(
|
|
23
|
+
client,
|
|
24
|
+
'editor-plugin-table',
|
|
25
|
+
);
|
|
26
|
+
await mountEditor(page, {
|
|
27
|
+
appearance: fullpage.appearance,
|
|
28
|
+
allowTables: {
|
|
29
|
+
advanced: true,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
await page.click(editable);
|
|
34
|
+
|
|
35
|
+
// Insert table and click on last cell of first row
|
|
36
|
+
await quickInsert(page, 'Table');
|
|
37
|
+
await page.waitForSelector(LAST_HEADER_FROM_FIRST_ROW);
|
|
38
|
+
await page.click(LAST_HEADER_FROM_FIRST_ROW);
|
|
39
|
+
|
|
40
|
+
// Add empty action on first cell from last row
|
|
41
|
+
await quickInsert(page, 'Action item');
|
|
42
|
+
|
|
43
|
+
// Select button wrapper from last column
|
|
44
|
+
const controlSelector = `.${ClassName.COLUMN_CONTROLS_DECORATIONS}[data-start-index="2"]`;
|
|
45
|
+
await page.waitForSelector(controlSelector);
|
|
46
|
+
// We need to move the mouse to the column control first
|
|
47
|
+
await page.hover(controlSelector, { x: 10, y: 1 });
|
|
48
|
+
await page.click(controlSelector);
|
|
49
|
+
|
|
50
|
+
// Click on delete row button
|
|
51
|
+
const deleteButtonSelector = `.${ClassName.CONTROLS_DELETE_BUTTON_WRAP} .${ClassName.CONTROLS_DELETE_BUTTON}`;
|
|
52
|
+
await page.waitForVisible(deleteButtonSelector);
|
|
53
|
+
await page.click(deleteButtonSelector);
|
|
54
|
+
|
|
55
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
56
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
editable,
|
|
5
|
+
getDocFromElement,
|
|
6
|
+
fullpage,
|
|
7
|
+
quickInsert,
|
|
8
|
+
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
import { TableCssClassName as ClassName } from '@atlaskit/editor-core/src/plugins/table/types';
|
|
10
|
+
import {
|
|
11
|
+
goToEditorTestingWDExample,
|
|
12
|
+
mountEditor,
|
|
13
|
+
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
14
|
+
|
|
15
|
+
BrowserTestCase(
|
|
16
|
+
'delete-last-row.ts: Delete last table row with empty action',
|
|
17
|
+
{ skip: ['chrome'] },
|
|
18
|
+
async (client: any, testName: string) => {
|
|
19
|
+
const FIRST_CELL_FROM_LAST_ROW =
|
|
20
|
+
'table > tbody > tr:last-child > td:first-child';
|
|
21
|
+
const page = await goToEditorTestingWDExample(
|
|
22
|
+
client,
|
|
23
|
+
'editor-plugin-table',
|
|
24
|
+
);
|
|
25
|
+
await mountEditor(page, {
|
|
26
|
+
appearance: fullpage.appearance,
|
|
27
|
+
allowTables: {
|
|
28
|
+
advanced: true,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
await page.click(editable);
|
|
33
|
+
|
|
34
|
+
// Insert table and click on first cell
|
|
35
|
+
await quickInsert(page, 'Table');
|
|
36
|
+
await page.waitForSelector(FIRST_CELL_FROM_LAST_ROW);
|
|
37
|
+
await page.click(FIRST_CELL_FROM_LAST_ROW);
|
|
38
|
+
|
|
39
|
+
// Add empty action on first cell from last row
|
|
40
|
+
await quickInsert(page, 'Action item');
|
|
41
|
+
|
|
42
|
+
// Select button wrapper from last row
|
|
43
|
+
const controlSelector = `.${ClassName.ROW_CONTROLS_WRAPPER} .${ClassName.ROW_CONTROLS_BUTTON_WRAP}:last-child .${ClassName.CONTROLS_BUTTON}`;
|
|
44
|
+
await page.waitForSelector(controlSelector);
|
|
45
|
+
await page.click(controlSelector);
|
|
46
|
+
|
|
47
|
+
// Click on delete row button
|
|
48
|
+
const deleteButtonSelector = `.${ClassName.CONTROLS_DELETE_BUTTON_WRAP} .${ClassName.CONTROLS_DELETE_BUTTON}`;
|
|
49
|
+
await page.waitForVisible(deleteButtonSelector);
|
|
50
|
+
await page.click(deleteButtonSelector);
|
|
51
|
+
|
|
52
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
53
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
BrowserTestCase(
|
|
58
|
+
'delete-last-row.ts: Delete last table row with empty action, chrome',
|
|
59
|
+
{ skip: ['firefox', 'safari'] },
|
|
60
|
+
async (client: any, testName: string) => {
|
|
61
|
+
const FIRST_CELL_FROM_LAST_ROW =
|
|
62
|
+
'table > tbody > tr:last-child > td:first-child';
|
|
63
|
+
const page = await goToEditorTestingWDExample(
|
|
64
|
+
client,
|
|
65
|
+
'editor-plugin-table',
|
|
66
|
+
);
|
|
67
|
+
await mountEditor(page, {
|
|
68
|
+
appearance: fullpage.appearance,
|
|
69
|
+
allowTables: {
|
|
70
|
+
advanced: true,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
await page.click(editable);
|
|
75
|
+
|
|
76
|
+
// Insert table and click on first cell
|
|
77
|
+
await quickInsert(page, 'Table');
|
|
78
|
+
await page.waitForSelector(FIRST_CELL_FROM_LAST_ROW);
|
|
79
|
+
await page.click(FIRST_CELL_FROM_LAST_ROW);
|
|
80
|
+
|
|
81
|
+
// Add empty action on first cell from last row
|
|
82
|
+
await quickInsert(page, 'Action item');
|
|
83
|
+
|
|
84
|
+
// Select button wrapper from last row
|
|
85
|
+
const controlSelector = `.${ClassName.ROW_CONTROLS_WRAPPER} .${ClassName.ROW_CONTROLS_BUTTON_WRAP}:last-child .${ClassName.CONTROLS_BUTTON}`;
|
|
86
|
+
await page.waitForSelector(controlSelector);
|
|
87
|
+
await page.click(controlSelector);
|
|
88
|
+
|
|
89
|
+
// Click on delete row button
|
|
90
|
+
const deleteButtonSelector = `.${ClassName.CONTROLS_DELETE_BUTTON_WRAP} .${ClassName.CONTROLS_DELETE_BUTTON}`;
|
|
91
|
+
await page.waitForVisible(deleteButtonSelector);
|
|
92
|
+
await page.click(deleteButtonSelector);
|
|
93
|
+
|
|
94
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
95
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
96
|
+
},
|
|
97
|
+
);
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createIntl } from 'react-intl-next';
|
|
2
|
+
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
editable,
|
|
6
|
+
getDocFromElement,
|
|
7
|
+
fullpage,
|
|
8
|
+
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
import { documentWithMergedCells } from './__fixtures__/merged-rows-and-cols-document';
|
|
10
|
+
import { nestedInExtension } from './__fixtures__/nested-in-extension';
|
|
11
|
+
import { TableCssClassName as ClassName } from '@atlaskit/editor-core/src/plugins/table/types';
|
|
12
|
+
import {
|
|
13
|
+
goToEditorTestingWDExample,
|
|
14
|
+
mountEditor,
|
|
15
|
+
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
16
|
+
import messages from '@atlaskit/editor-core/src/plugins/table/ui/messages';
|
|
17
|
+
import { deleteRow } from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
18
|
+
|
|
19
|
+
BrowserTestCase(
|
|
20
|
+
'Should delete merged rows from contextual menu and append missing cells to the table',
|
|
21
|
+
{ skip: ['firefox', 'safari'] },
|
|
22
|
+
async (client: any, testName: string) => {
|
|
23
|
+
const page = await goToEditorTestingWDExample(
|
|
24
|
+
client,
|
|
25
|
+
'editor-plugin-table',
|
|
26
|
+
);
|
|
27
|
+
const intl = createIntl({
|
|
28
|
+
locale: 'en',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
await mountEditor(page, {
|
|
32
|
+
appearance: fullpage.appearance,
|
|
33
|
+
defaultValue: JSON.stringify(documentWithMergedCells),
|
|
34
|
+
allowTables: {
|
|
35
|
+
advanced: true,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const controlSelector = `tbody tr:nth-child(2) td:first-child`;
|
|
40
|
+
await page.waitForSelector(controlSelector);
|
|
41
|
+
await page.click(controlSelector);
|
|
42
|
+
|
|
43
|
+
const contextMenuTriggerSelector = `.${ClassName.CONTEXTUAL_MENU_BUTTON}`;
|
|
44
|
+
await page.waitForSelector(contextMenuTriggerSelector);
|
|
45
|
+
await page.click(contextMenuTriggerSelector);
|
|
46
|
+
|
|
47
|
+
const message = await intl.formatMessage(messages.removeRows, {
|
|
48
|
+
0: 1,
|
|
49
|
+
});
|
|
50
|
+
const contextMenuItemSelector = `span=${message}`;
|
|
51
|
+
await page.waitForSelector(contextMenuItemSelector);
|
|
52
|
+
await page.click(contextMenuItemSelector);
|
|
53
|
+
|
|
54
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
55
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
BrowserTestCase(
|
|
60
|
+
'Should delete merged rows from contextual menu and decrement rowspan of the spanning cell',
|
|
61
|
+
{ skip: ['firefox', 'safari'] },
|
|
62
|
+
async (client: any, testName: string) => {
|
|
63
|
+
const page = await goToEditorTestingWDExample(
|
|
64
|
+
client,
|
|
65
|
+
'editor-plugin-table',
|
|
66
|
+
);
|
|
67
|
+
const intl = createIntl({
|
|
68
|
+
locale: 'en',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
await mountEditor(page, {
|
|
72
|
+
appearance: fullpage.appearance,
|
|
73
|
+
defaultValue: JSON.stringify(documentWithMergedCells),
|
|
74
|
+
allowTables: {
|
|
75
|
+
advanced: true,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const controlSelector = `tbody tr:nth-child(3) td:first-child`;
|
|
80
|
+
await page.waitForSelector(controlSelector);
|
|
81
|
+
await page.click(controlSelector);
|
|
82
|
+
|
|
83
|
+
const contextMenuTriggerSelector = `.${ClassName.CONTEXTUAL_MENU_BUTTON}`;
|
|
84
|
+
await page.waitForSelector(contextMenuTriggerSelector);
|
|
85
|
+
await page.click(contextMenuTriggerSelector);
|
|
86
|
+
|
|
87
|
+
const message = await intl.formatMessage(messages.removeRows, {
|
|
88
|
+
0: 1,
|
|
89
|
+
});
|
|
90
|
+
const contextMenuItemSelector = `span=${message}`;
|
|
91
|
+
await page.waitForSelector(contextMenuItemSelector);
|
|
92
|
+
await page.click(contextMenuItemSelector);
|
|
93
|
+
|
|
94
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
95
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
96
|
+
},
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
BrowserTestCase(
|
|
100
|
+
'Should delete a row when table is nested inside bodied extension',
|
|
101
|
+
{ skip: ['firefox', 'safari'] },
|
|
102
|
+
async (client: any, testName: string) => {
|
|
103
|
+
const page = await goToEditorTestingWDExample(
|
|
104
|
+
client,
|
|
105
|
+
'editor-plugin-table',
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
await mountEditor(page, {
|
|
109
|
+
appearance: fullpage.appearance,
|
|
110
|
+
defaultValue: JSON.stringify(nestedInExtension),
|
|
111
|
+
allowTables: {
|
|
112
|
+
advanced: true,
|
|
113
|
+
},
|
|
114
|
+
allowExtension: true,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
await deleteRow(page, 1);
|
|
118
|
+
|
|
119
|
+
const doc = await page.$eval(editable, getDocFromElement);
|
|
120
|
+
expect(doc).toMatchCustomDocSnapshot(testName);
|
|
121
|
+
},
|
|
122
|
+
);
|