@atlaskit/editor-plugin-table 1.6.3 → 1.6.5
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/nodeviews/TableResizer.js +5 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +8 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/consts.js +10 -0
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/index.js +20 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/nodeviews/TableResizer.js +6 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +6 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/consts.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/index.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/nodeviews/TableResizer.js +6 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +6 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/consts.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/index.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/consts.d.ts +2 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +2 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/consts.d.ts +2 -0
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/__tests__/unit/commands.ts +2 -0
- package/src/__tests__/unit/event-handlers.ts +2 -0
- package/src/__tests__/unit/index.ts +2 -0
- package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +48 -2
- package/src/__tests__/visual-regression/sticky-header.ts +2 -1
- package/src/plugins/table/nodeviews/TableResizer.tsx +11 -0
- package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +6 -0
- package/src/plugins/table/pm-plugins/table-resizing/utils/consts.ts +2 -0
- package/src/plugins/table/pm-plugins/table-resizing/utils/index.ts +2 -0
- package/src/__tests__/playwright/__fixtures__/base-adfs.ts +0 -1486
- package/src/__tests__/playwright/extensions.spec.ts +0 -67
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EditorTableModel,
|
|
3
|
-
EditorNodeContainerModel,
|
|
4
|
-
EditorExtensionModel,
|
|
5
|
-
editorTestCase as test,
|
|
6
|
-
expect,
|
|
7
|
-
} from '@af/editor-libra';
|
|
8
|
-
import { tableInsideLayoutAfterExtension } from './__fixtures__/base-adfs';
|
|
9
|
-
|
|
10
|
-
test.use({
|
|
11
|
-
editorProps: {
|
|
12
|
-
appearance: 'full-page',
|
|
13
|
-
allowTables: {
|
|
14
|
-
advanced: true,
|
|
15
|
-
},
|
|
16
|
-
allowLayouts: true,
|
|
17
|
-
allowExtension: true,
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
editorMountOptions: {
|
|
21
|
-
withConfluenceMacrosExtensionProvider: true,
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
adf: tableInsideLayoutAfterExtension,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
test.describe('when the extension context panel opens', () => {
|
|
28
|
-
test('should not overflow the table', async ({ editor }) => {
|
|
29
|
-
const nodes = EditorNodeContainerModel.from(editor);
|
|
30
|
-
const extensionModel = EditorExtensionModel.from(nodes.bodiedExtension);
|
|
31
|
-
const tableModel = EditorTableModel.from(nodes.table);
|
|
32
|
-
|
|
33
|
-
await editor.selection.set({ anchor: 1, head: 1 });
|
|
34
|
-
|
|
35
|
-
await test.step('make sure the table is not overflowed already', async () => {
|
|
36
|
-
expect(await tableModel.hasOverflowed()).toBeFalsy();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
await extensionModel.configuration(editor).openContextPanel();
|
|
40
|
-
|
|
41
|
-
expect(await tableModel.hasOverflowed()).toBeFalsy();
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
test('should not overflow the table when changing viewport', async ({
|
|
46
|
-
editor,
|
|
47
|
-
}) => {
|
|
48
|
-
const nodes = EditorNodeContainerModel.from(editor);
|
|
49
|
-
const tableModel = EditorTableModel.from(nodes.table);
|
|
50
|
-
await editor.page.setViewportSize({ width: 1000, height: 1024 });
|
|
51
|
-
await editor.selection.set({ anchor: 1, head: 1 });
|
|
52
|
-
await tableModel.isSelected();
|
|
53
|
-
const cell = await tableModel.cell(0);
|
|
54
|
-
await cell.click();
|
|
55
|
-
await cell.resize({
|
|
56
|
-
mouse: editor.page.mouse,
|
|
57
|
-
cellSide: 'right',
|
|
58
|
-
moveDirection: 'right',
|
|
59
|
-
moveDistance: 100,
|
|
60
|
-
});
|
|
61
|
-
await test.step('make sure the table is not overflowed already', async () => {
|
|
62
|
-
expect(await tableModel.hasOverflowed()).toBeFalsy();
|
|
63
|
-
});
|
|
64
|
-
await editor.page.setViewportSize({ width: 1050, height: 1024 });
|
|
65
|
-
await tableModel.isSelected();
|
|
66
|
-
expect(await tableModel.hasOverflowed()).toBeFalsy();
|
|
67
|
-
});
|