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