@atlaskit/editor-common 80.5.2 → 81.0.1
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 +23 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/media-inline/media-inline-image-card.js +2 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +2 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/media-inline/media-inline-image-card.js +2 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/avatar.d.ts +2 -2
- package/dist/types/analytics/types/config-panel-events.d.ts +2 -2
- package/dist/types/analytics/types/date-events.d.ts +2 -2
- package/dist/types/analytics/types/dispatch-analytics-event.d.ts +1 -1
- package/dist/types/analytics/types/experimental-events.d.ts +2 -2
- package/dist/types/card/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types/extensions/extension-fields-helpers.d.ts +2 -2
- package/dist/types/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types/extensions/types/extension-provider.d.ts +2 -2
- package/dist/types/link/LinkPicker/EditorLinkPicker/index.d.ts +2 -2
- package/dist/types/link/LinkSearch/index.d.ts +2 -2
- package/dist/types/link/LinkSearch/transformTimeStamp.d.ts +1 -1
- package/dist/types/link/LinkSearch/types.d.ts +3 -3
- package/dist/types/link/LinkSearch/withActivityProvider.d.ts +2 -2
- package/dist/types/link/types.d.ts +2 -2
- package/dist/types/provider-factory/context.d.ts +1 -1
- package/dist/types/provider-factory/profile-card-provider.d.ts +1 -1
- package/dist/types/provider-factory/provider-factory.d.ts +1 -1
- package/dist/types/provider-factory/with-providers.d.ts +3 -3
- package/dist/types/transforms/layout.d.ts +1 -1
- package/dist/types/types/copy-button.d.ts +1 -1
- package/dist/types/types/resizable-media-single.d.ts +1 -1
- package/dist/types/types/type-ahead.d.ts +1 -1
- package/dist/types/ufo/experience-store.d.ts +1 -1
- package/dist/types/ui/EventHandlers/index.d.ts +1 -1
- package/dist/types/ui/Layer/index.d.ts +2 -2
- package/dist/types/ui/Mention/index.d.ts +2 -2
- package/dist/types/ui/Mention/types.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/styled.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/types.d.ts +3 -3
- package/dist/types/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
- package/dist/types/ui/unsupported-content-helper.d.ts +2 -2
- package/dist/types/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui-menu/ToolbarButton/styles.d.ts +1 -1
- package/dist/types/ui-react/ReactEditorViewContext.d.ts +1 -1
- package/dist/types/utils/analytics.d.ts +1 -1
- package/dist/types/utils/commands.d.ts +3 -3
- package/dist/types/utils/compareNodes.d.ts +2 -2
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types/utils/imageLoader.d.ts +1 -1
- package/dist/types/utils/macro.d.ts +1 -1
- package/dist/types/utils/performance/hooks/use-component-render-tracking/index.d.ts +1 -1
- package/dist/types/utils/plugin-state-factory.d.ts +2 -2
- package/dist/types/utils/slice.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/config-panel-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/date-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/dispatch-analytics-event.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/experimental-events.d.ts +2 -2
- package/dist/types-ts4.5/card/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types-ts4.5/extensions/extension-fields-helpers.d.ts +2 -2
- package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkSearch/index.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkSearch/transformTimeStamp.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +3 -3
- package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +2 -2
- package/dist/types-ts4.5/link/types.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/context.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/profile-card-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/provider-factory.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/with-providers.d.ts +3 -3
- package/dist/types-ts4.5/transforms/layout.d.ts +1 -1
- package/dist/types-ts4.5/types/copy-button.d.ts +1 -1
- package/dist/types-ts4.5/types/resizable-media-single.d.ts +1 -1
- package/dist/types-ts4.5/types/type-ahead.d.ts +1 -1
- package/dist/types-ts4.5/ufo/experience-store.d.ts +1 -1
- package/dist/types-ts4.5/ui/EventHandlers/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Layer/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Mention/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Mention/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizerLegacy/styled.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizerLegacy/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/unsupported-content-helper.d.ts +2 -2
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ToolbarButton/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/ReactEditorViewContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics.d.ts +1 -1
- package/dist/types-ts4.5/utils/commands.d.ts +3 -3
- package/dist/types-ts4.5/utils/compareNodes.d.ts +2 -2
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
- package/dist/types-ts4.5/utils/macro.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/hooks/use-component-render-tracking/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +2 -2
- package/dist/types-ts4.5/utils/slice.d.ts +1 -1
- package/package.json +4 -9
- package/tsconfig.json +0 -1
- package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +0 -15
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -20
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -28
- package/dist/cjs/__tests_external__/cases/smart-links/index.js +0 -33
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -35
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -65
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -16
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -35
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -65
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -16
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -63
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -17
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -33
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -36
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/types.js +0 -5
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -14
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -31
- package/dist/cjs/__tests_external__/cases/types.js +0 -5
- package/dist/cjs/__tests_external__/index.js +0 -44
- package/dist/cjs/__tests_external__/page-objects/Editor.js +0 -47
- package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +0 -208
- package/dist/cjs/__tests_external__/page-objects/Renderer.js +0 -35
- package/dist/cjs/in-product.js +0 -42
- package/dist/es2019/__tests_external__/cases/fundamentals/collection.js +0 -7
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -12
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -22
- package/dist/es2019/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -28
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -57
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -8
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -28
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -57
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -8
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -55
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -9
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -26
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -29
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/types.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -6
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -24
- package/dist/es2019/__tests_external__/cases/types.js +0 -1
- package/dist/es2019/__tests_external__/index.js +0 -3
- package/dist/es2019/__tests_external__/page-objects/Editor.js +0 -19
- package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +0 -143
- package/dist/es2019/__tests_external__/page-objects/Renderer.js +0 -9
- package/dist/es2019/in-product.js +0 -1
- package/dist/esm/__tests_external__/cases/fundamentals/collection.js +0 -9
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -14
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -22
- package/dist/esm/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -29
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -59
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -10
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -29
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -59
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -10
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -57
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -11
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -27
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -30
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/types.js +0 -1
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -8
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -25
- package/dist/esm/__tests_external__/cases/types.js +0 -1
- package/dist/esm/__tests_external__/index.js +0 -3
- package/dist/esm/__tests_external__/page-objects/Editor.js +0 -40
- package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +0 -201
- package/dist/esm/__tests_external__/page-objects/Renderer.js +0 -28
- package/dist/esm/in-product.js +0 -1
- package/dist/types/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/index.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/types.d.ts +0 -7
- package/dist/types/__tests_external__/index.d.ts +0 -3
- package/dist/types/__tests_external__/page-objects/Editor.d.ts +0 -11
- package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -43
- package/dist/types/__tests_external__/page-objects/Renderer.d.ts +0 -8
- package/dist/types/in-product.d.ts +0 -1
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/index.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/types.d.ts +0 -7
- package/dist/types-ts4.5/__tests_external__/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/page-objects/Editor.d.ts +0 -9
- package/dist/types-ts4.5/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -41
- package/dist/types-ts4.5/__tests_external__/page-objects/Renderer.d.ts +0 -6
- package/dist/types-ts4.5/in-product.d.ts +0 -1
- package/in-product/package.json +0 -15
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { embedSmartLinkRendersTestCase } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var switchToEmbedSmartLinkTestCase = function switchToEmbedSmartLinkTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'switching to an Embed Smart Link works',
|
|
10
|
-
id: 'switch-to-embed',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
15
|
-
editorWithSmartLinks.switchAfterInsert('embed');
|
|
16
|
-
embedSmartLinkRendersTestCase({
|
|
17
|
-
url: url
|
|
18
|
-
}).assertions(cy);
|
|
19
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
20
|
-
var renderer = editor.publish(ui);
|
|
21
|
-
renderer.expectContentReady();
|
|
22
|
-
embedSmartLinkRendersTestCase({
|
|
23
|
-
url: url
|
|
24
|
-
}).assertions(cy);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { InlineCardPageObject, inlineSmartLinkRendersTestCase } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var deleteInlineSmartLinkTestCase = function deleteInlineSmartLinkTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'able to delete an Inline Smart Link using floating toolbar',
|
|
10
|
-
id: 'delete-inline-smart-link',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
var inlineCard = new InlineCardPageObject(cy);
|
|
15
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
16
|
-
inlineSmartLinkRendersTestCase({
|
|
17
|
-
url: url
|
|
18
|
-
}).assertions(cy);
|
|
19
|
-
editorWithSmartLinks.deleteSmartLink();
|
|
20
|
-
inlineCard.expectCardNotExists();
|
|
21
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
22
|
-
var renderer = editor.publish(ui);
|
|
23
|
-
renderer.expectContentReady();
|
|
24
|
-
inlineCard.expectCardNotExists();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { InlineCardPageObject, inlineSmartLinkRendersTestCase } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var editInlineSmartLinkTitleTestCase = function editInlineSmartLinkTitleTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'editing an Inline Smart Link renders as Blue Link (title)',
|
|
10
|
-
id: 'inline-smart-link-edit-title',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
var inlineCard = new InlineCardPageObject(cy);
|
|
15
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
16
|
-
inlineSmartLinkRendersTestCase({
|
|
17
|
-
url: url
|
|
18
|
-
}).assertions(cy);
|
|
19
|
-
editorWithSmartLinks.changeLinkLabel('Avocorne is watching you 🥑');
|
|
20
|
-
inlineCard.assertHrefRendered(url);
|
|
21
|
-
inlineCard.expectCardNotExists();
|
|
22
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
23
|
-
var renderer = editor.publish(ui);
|
|
24
|
-
renderer.expectContentReady();
|
|
25
|
-
inlineCard.assertHrefRendered(url);
|
|
26
|
-
inlineCard.expectCardNotExists();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export var editInlineSmartLinkUrlTestCase = function editInlineSmartLinkUrlTestCase(_ref2) {
|
|
32
|
-
var ui = _ref2.ui,
|
|
33
|
-
url = _ref2.url;
|
|
34
|
-
return new InProductTestCase({
|
|
35
|
-
title: 'editing an Inline Smart Link renders as Blue Link (URL)',
|
|
36
|
-
id: 'inline-smart-link-edit',
|
|
37
|
-
assertions: function assertions(cy) {
|
|
38
|
-
var editor = new EditorPageObject(cy);
|
|
39
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
40
|
-
var inlineCard = new InlineCardPageObject(cy);
|
|
41
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
42
|
-
inlineSmartLinkRendersTestCase({
|
|
43
|
-
url: url
|
|
44
|
-
}).assertions(cy);
|
|
45
|
-
var newUrl = 'https://avo.corne.com';
|
|
46
|
-
editorWithSmartLinks.changeLinkUrl(newUrl);
|
|
47
|
-
inlineCard.expectCardNotExists();
|
|
48
|
-
inlineCard.assertHrefRendered(newUrl);
|
|
49
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
50
|
-
var renderer = editor.publish(ui);
|
|
51
|
-
renderer.expectContentReady();
|
|
52
|
-
inlineCard.assertHrefRendered(newUrl);
|
|
53
|
-
inlineCard.expectCardNotExists();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InProductTestCollection } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { deleteInlineSmartLinkTestCase } from './delete';
|
|
3
|
-
import { editInlineSmartLinkTitleTestCase, editInlineSmartLinkUrlTestCase } from './edit';
|
|
4
|
-
import { insertInlineSmartLinkTestCase } from './insert';
|
|
5
|
-
import { unlinkInlineSmartLinkTestCase } from './unlink';
|
|
6
|
-
export var inlineSmartLinksTestCollection = function inlineSmartLinksTestCollection(opts) {
|
|
7
|
-
return new InProductTestCollection({
|
|
8
|
-
title: '@atlaskit/editor-core -> Inline Smart Links, happy paths',
|
|
9
|
-
testCases: [insertInlineSmartLinkTestCase(opts), editInlineSmartLinkTitleTestCase(opts), editInlineSmartLinkUrlTestCase(opts), unlinkInlineSmartLinkTestCase(opts), deleteInlineSmartLinkTestCase(opts)]
|
|
10
|
-
});
|
|
11
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { inlineSmartLinkRendersTestCase } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var insertInlineSmartLinkTestCase = function insertInlineSmartLinkTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'inserting an Inline Smart Link works',
|
|
10
|
-
id: 'inline-smart-link-insert',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
15
|
-
inlineSmartLinkRendersTestCase({
|
|
16
|
-
url: url
|
|
17
|
-
}).assertions(cy);
|
|
18
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
19
|
-
var renderer = editor.publish(ui);
|
|
20
|
-
renderer.expectContentReady();
|
|
21
|
-
inlineSmartLinkRendersTestCase({
|
|
22
|
-
url: url
|
|
23
|
-
}).assertions(cy);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { InlineCardPageObject, inlineSmartLinkRendersTestCase } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var unlinkInlineSmartLinkTestCase = function unlinkInlineSmartLinkTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'unlinking an Inline Smart Link works',
|
|
10
|
-
id: 'inline-smart-link-unlink',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
var inlineCard = new InlineCardPageObject(cy);
|
|
15
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
16
|
-
inlineSmartLinkRendersTestCase({
|
|
17
|
-
url: url
|
|
18
|
-
}).assertions(cy);
|
|
19
|
-
editorWithSmartLinks.unlink();
|
|
20
|
-
inlineCard.expectCardNotExists();
|
|
21
|
-
inlineCard.assertHrefNotRendered(url);
|
|
22
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
23
|
-
var renderer = editor.publish(ui);
|
|
24
|
-
renderer.expectContentReady();
|
|
25
|
-
inlineCard.expectCardNotExists();
|
|
26
|
-
inlineCard.assertHrefNotRendered(url);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { InProductTestCollection } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { switchToUrlTestCase } from './insert';
|
|
3
|
-
export var blueLinksTestCollection = function blueLinksTestCollection(opts) {
|
|
4
|
-
return new InProductTestCollection({
|
|
5
|
-
title: '@atlaskit/editor-core -> Blue Links, happy paths',
|
|
6
|
-
testCases: [switchToUrlTestCase(opts)]
|
|
7
|
-
});
|
|
8
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { InlineCardPageObject } from '@atlaskit/smart-card/in-product';
|
|
3
|
-
import { EditorPageObject } from '../../../../page-objects/Editor';
|
|
4
|
-
import { EditorSmartLinkPageObject } from '../../../../page-objects/EditorSmartLink';
|
|
5
|
-
export var switchToUrlTestCase = function switchToUrlTestCase(_ref) {
|
|
6
|
-
var ui = _ref.ui,
|
|
7
|
-
url = _ref.url;
|
|
8
|
-
return new InProductTestCase({
|
|
9
|
-
title: 'switching to a Blue Link works',
|
|
10
|
-
id: 'switch-to-url',
|
|
11
|
-
assertions: function assertions(cy) {
|
|
12
|
-
var editor = new EditorPageObject(cy);
|
|
13
|
-
var editorWithSmartLinks = new EditorSmartLinkPageObject(cy, editor);
|
|
14
|
-
var inlineCard = new InlineCardPageObject(cy);
|
|
15
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
16
|
-
editorWithSmartLinks.switchAfterInsert('url');
|
|
17
|
-
inlineCard.assertHrefRendered(url);
|
|
18
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
19
|
-
var renderer = editor.publish(ui);
|
|
20
|
-
renderer.expectContentReady();
|
|
21
|
-
inlineCard.assertHrefRendered(url);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { EditorPageObject } from './page-objects/Editor';
|
|
2
|
-
export { fundamentalsTestCollection } from './cases/fundamentals/collection';
|
|
3
|
-
export { inlineSmartLinksTestCollection, blockSmartLinksTestCollection, embedSmartLinksTestCollection, blueLinksTestCollection } from './cases/smart-links';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
-
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
9
|
-
import { RendererPageObject } from './Renderer';
|
|
10
|
-
export var EditorPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
11
|
-
_inherits(EditorPageObject, _InProductTestPageObj);
|
|
12
|
-
var _super = _createSuper(EditorPageObject);
|
|
13
|
-
function EditorPageObject() {
|
|
14
|
-
_classCallCheck(this, EditorPageObject);
|
|
15
|
-
return _super.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
_createClass(EditorPageObject, [{
|
|
18
|
-
key: "getEditorArea",
|
|
19
|
-
value: function getEditorArea() {
|
|
20
|
-
return this.cy.get('div.ProseMirror', {
|
|
21
|
-
timeout: 30000
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}, {
|
|
25
|
-
key: "getTitleArea",
|
|
26
|
-
value: function getTitleArea() {
|
|
27
|
-
return this.cy.get('[data-test-id="editor-title"]');
|
|
28
|
-
}
|
|
29
|
-
}, {
|
|
30
|
-
key: "publish",
|
|
31
|
-
value: function publish(opts) {
|
|
32
|
-
if (opts !== null && opts !== void 0 && opts.publishButton) {
|
|
33
|
-
this.cy.get(opts.publishButton).click();
|
|
34
|
-
return new RendererPageObject(this.cy);
|
|
35
|
-
}
|
|
36
|
-
throw Error('No publish button selector supplied!');
|
|
37
|
-
}
|
|
38
|
-
}]);
|
|
39
|
-
return EditorPageObject;
|
|
40
|
-
}(InProductTestPageObject);
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
-
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
11
|
-
import { BlockCardPageObject, EmbedCardPageObject, InlineCardPageObject } from '@atlaskit/smart-card/in-product';
|
|
12
|
-
export var EditorSmartLinkPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
13
|
-
_inherits(EditorSmartLinkPageObject, _InProductTestPageObj);
|
|
14
|
-
var _super = _createSuper(EditorSmartLinkPageObject);
|
|
15
|
-
function EditorSmartLinkPageObject(cy, editor) {
|
|
16
|
-
var _this;
|
|
17
|
-
_classCallCheck(this, EditorSmartLinkPageObject);
|
|
18
|
-
_this = _super.call(this, cy);
|
|
19
|
-
_defineProperty(_assertThisInitialized(_this), "testIds", {
|
|
20
|
-
viewSwitcher: 'link-toolbar-appearance-button',
|
|
21
|
-
displayUrlOption: 'url-appearance',
|
|
22
|
-
displayInlineOption: 'inline-appearance',
|
|
23
|
-
displayCardOption: 'block-appearance',
|
|
24
|
-
displayEmbedOption: 'embed-appearance',
|
|
25
|
-
linkUrl: 'link-url',
|
|
26
|
-
linkLabel: 'link-text'
|
|
27
|
-
});
|
|
28
|
-
_defineProperty(_assertThisInitialized(_this), "ariaLabels", {
|
|
29
|
-
editLink: 'Edit link',
|
|
30
|
-
deleteLink: 'Remove',
|
|
31
|
-
unlinkLink: 'Unlink'
|
|
32
|
-
});
|
|
33
|
-
_this.cy = cy;
|
|
34
|
-
_this.editor = editor;
|
|
35
|
-
return _this;
|
|
36
|
-
}
|
|
37
|
-
_createClass(EditorSmartLinkPageObject, [{
|
|
38
|
-
key: "getViewSwitcher",
|
|
39
|
-
value: function getViewSwitcher() {
|
|
40
|
-
return this.cy.get(this.toTestId(this.testIds.viewSwitcher));
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
key: "openViewSwitcher",
|
|
44
|
-
value: function openViewSwitcher() {
|
|
45
|
-
return this.getViewSwitcher().click();
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
key: "getViewSwitcherOption",
|
|
49
|
-
value: function getViewSwitcherOption() {
|
|
50
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
51
|
-
switch (type) {
|
|
52
|
-
case 'url':
|
|
53
|
-
{
|
|
54
|
-
return this.cy.get(this.toTestId(this.testIds.displayUrlOption));
|
|
55
|
-
}
|
|
56
|
-
case 'inline':
|
|
57
|
-
{
|
|
58
|
-
return this.cy.get(this.toTestId(this.testIds.displayInlineOption));
|
|
59
|
-
}
|
|
60
|
-
case 'block':
|
|
61
|
-
{
|
|
62
|
-
return this.cy.get(this.toTestId(this.testIds.displayCardOption));
|
|
63
|
-
}
|
|
64
|
-
case 'embed':
|
|
65
|
-
{
|
|
66
|
-
return this.cy.get(this.toTestId(this.testIds.displayEmbedOption));
|
|
67
|
-
}
|
|
68
|
-
default:
|
|
69
|
-
{
|
|
70
|
-
throw Error("Attempted to switch to `".concat(type, "`: unknown Smart Link view switcher option!"));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, {
|
|
75
|
-
key: "selectViewSwitcherOption",
|
|
76
|
-
value: function selectViewSwitcherOption() {
|
|
77
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
78
|
-
var viewSwitcherOption = this.getViewSwitcherOption(type);
|
|
79
|
-
return viewSwitcherOption.click();
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "insertSmartLinkByTyping",
|
|
83
|
-
value: function insertSmartLinkByTyping(url) {
|
|
84
|
-
var _this2 = this;
|
|
85
|
-
return this.editor.getEditorArea().type("".concat(url, " "), {
|
|
86
|
-
delay: 0
|
|
87
|
-
}).get('p>a').type('{leftArrow}{leftArrow}').get('[aria-label="Floating Toolbar"]').then(function () {
|
|
88
|
-
_this2.openViewSwitcher();
|
|
89
|
-
_this2.selectViewSwitcherOption('inline');
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}, {
|
|
93
|
-
key: "switchAfterInsert",
|
|
94
|
-
value: function switchAfterInsert() {
|
|
95
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
96
|
-
// NOTE: inline inserted by default for all Smart Links.
|
|
97
|
-
var inlineCard = new InlineCardPageObject(this.cy);
|
|
98
|
-
inlineCard.click();
|
|
99
|
-
this.openViewSwitcher();
|
|
100
|
-
this.selectViewSwitcherOption(type);
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "getSmartLink",
|
|
104
|
-
value: function getSmartLink() {
|
|
105
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
106
|
-
switch (type) {
|
|
107
|
-
case 'inline':
|
|
108
|
-
{
|
|
109
|
-
return new InlineCardPageObject(this.cy);
|
|
110
|
-
}
|
|
111
|
-
case 'block':
|
|
112
|
-
{
|
|
113
|
-
return new BlockCardPageObject(this.cy);
|
|
114
|
-
}
|
|
115
|
-
case 'embed':
|
|
116
|
-
{
|
|
117
|
-
return new EmbedCardPageObject(this.cy);
|
|
118
|
-
}
|
|
119
|
-
case 'url':
|
|
120
|
-
{
|
|
121
|
-
return new InlineCardPageObject(this.cy);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}, {
|
|
126
|
-
key: "getEditLinkButton",
|
|
127
|
-
value: function getEditLinkButton() {
|
|
128
|
-
return this.cy.get(this.toAriaLabel(this.ariaLabels.editLink));
|
|
129
|
-
}
|
|
130
|
-
}, {
|
|
131
|
-
key: "openEditLinkMenu",
|
|
132
|
-
value: function openEditLinkMenu() {
|
|
133
|
-
var button = this.getEditLinkButton();
|
|
134
|
-
return button.click();
|
|
135
|
-
}
|
|
136
|
-
}, {
|
|
137
|
-
key: "changeLinkLabel",
|
|
138
|
-
value: function changeLinkLabel(title) {
|
|
139
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'inline';
|
|
140
|
-
var smartLink = this.getSmartLink(type);
|
|
141
|
-
smartLink.click();
|
|
142
|
-
this.openEditLinkMenu();
|
|
143
|
-
this.typeIntoLabelField(title);
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
key: "changeLinkUrl",
|
|
147
|
-
value: function changeLinkUrl(url) {
|
|
148
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'inline';
|
|
149
|
-
this.getSmartLink(type).click();
|
|
150
|
-
this.openEditLinkMenu();
|
|
151
|
-
this.typeIntoUrlField(url);
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "typeIntoLabelField",
|
|
155
|
-
value: function typeIntoLabelField(title) {
|
|
156
|
-
var titleField = this.cy.get(this.toTestId(this.testIds.linkLabel)).focus();
|
|
157
|
-
titleField.clear();
|
|
158
|
-
titleField.type("".concat(title, "{enter}"), {
|
|
159
|
-
delay: 0
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
key: "typeIntoUrlField",
|
|
164
|
-
value: function typeIntoUrlField(url) {
|
|
165
|
-
var urlField = this.cy.get(this.toTestId(this.testIds.linkUrl)).focus();
|
|
166
|
-
urlField.clear();
|
|
167
|
-
urlField.type("".concat(url, "{enter}"), {
|
|
168
|
-
delay: 0
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
}, {
|
|
172
|
-
key: "deleteSmartLink",
|
|
173
|
-
value: function deleteSmartLink() {
|
|
174
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
175
|
-
this.getSmartLink(type).click();
|
|
176
|
-
this.clickDeleteIcon();
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
key: "clickDeleteIcon",
|
|
180
|
-
value: function clickDeleteIcon() {
|
|
181
|
-
var ariaLabelSelector = this.toAriaLabel(this.ariaLabels.deleteLink);
|
|
182
|
-
var deleteButtonSelector = "button".concat(ariaLabelSelector);
|
|
183
|
-
return this.cy.get(deleteButtonSelector).click();
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: "unlink",
|
|
187
|
-
value: function unlink() {
|
|
188
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'inline';
|
|
189
|
-
this.getSmartLink(type).click();
|
|
190
|
-
this.clickUnlinkIcon();
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "clickUnlinkIcon",
|
|
194
|
-
value: function clickUnlinkIcon() {
|
|
195
|
-
var ariaLabelSelector = this.toAriaLabel(this.ariaLabels.unlinkLink);
|
|
196
|
-
var unlinkButtonSelector = "button".concat(ariaLabelSelector);
|
|
197
|
-
return this.cy.get(unlinkButtonSelector).click();
|
|
198
|
-
}
|
|
199
|
-
}]);
|
|
200
|
-
return EditorSmartLinkPageObject;
|
|
201
|
-
}(InProductTestPageObject);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
-
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
9
|
-
export var RendererPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
10
|
-
_inherits(RendererPageObject, _InProductTestPageObj);
|
|
11
|
-
var _super = _createSuper(RendererPageObject);
|
|
12
|
-
function RendererPageObject() {
|
|
13
|
-
_classCallCheck(this, RendererPageObject);
|
|
14
|
-
return _super.apply(this, arguments);
|
|
15
|
-
}
|
|
16
|
-
_createClass(RendererPageObject, [{
|
|
17
|
-
key: "getContent",
|
|
18
|
-
value: function getContent() {
|
|
19
|
-
return this.cy.get('.ak-renderer-document');
|
|
20
|
-
}
|
|
21
|
-
}, {
|
|
22
|
-
key: "expectContentReady",
|
|
23
|
-
value: function expectContentReady() {
|
|
24
|
-
return this.cy.get('.ak-renderer-document').should('be.visible');
|
|
25
|
-
}
|
|
26
|
-
}]);
|
|
27
|
-
return RendererPageObject;
|
|
28
|
-
}(InProductTestPageObject);
|
package/dist/esm/in-product.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fundamentalsTestCollection, blueLinksTestCollection, inlineSmartLinksTestCollection, blockSmartLinksTestCollection, embedSmartLinksTestCollection, EditorPageObject } from './__tests_external__';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import type { SmartLinkTestCaseOpts } from '../types';
|
|
3
|
-
export declare const editBlockSmartLinkTitleTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
4
|
-
export declare const editBlockSmartLinkUrlTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import type { SmartLinkTestCaseOpts } from '../types';
|
|
3
|
-
export declare const editEmbedSmartLinkTitleTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
4
|
-
export declare const editEmbedSmartLinkUrlTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import type { SmartLinkTestCaseOpts } from '../types';
|
|
3
|
-
export declare const editInlineSmartLinkTitleTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
4
|
-
export declare const editInlineSmartLinkUrlTestCase: ({ ui, url, }: SmartLinkTestCaseOpts) => InProductTestCase;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { EditorPageObject } from './page-objects/Editor';
|
|
2
|
-
export { fundamentalsTestCollection } from './cases/fundamentals/collection';
|
|
3
|
-
export { inlineSmartLinksTestCollection, blockSmartLinksTestCollection, embedSmartLinksTestCollection, blueLinksTestCollection, } from './cases/smart-links';
|