@bigbinary/neeto-folders-frontend 2.0.10 → 2.0.11

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.
@@ -528,6 +528,7 @@ var Node = function Node(_ref, ref) {
528
528
  onClick: onClick,
529
529
  ref: ref
530
530
  })), {}, {
531
+ "data-cy": "".concat(neetoCist.hyphenate(folder.name), "-folder-node"),
531
532
  className: classNames("relative my-1 flex cursor-pointer items-center px-2 py-1", className),
532
533
  children: [icon, /*#__PURE__*/jsxRuntime.jsxs("div", {
533
534
  className: "ml-2",
@@ -600,6 +601,7 @@ var _SelectableNode = function SelectableNode(_ref) {
600
601
  readOnly: true,
601
602
  checked: selection === folder.id,
602
603
  className: "neeto-ui-radio__container",
604
+ "data-cy": "".concat(neetoCist.hyphenate(folder.name), "-folder-option"),
603
605
  name: "move-folder-option"
604
606
  }),
605
607
  onClick: isDisabled ? neetoCist.noop : function () {
@@ -686,6 +688,7 @@ var PaneBody = function PaneBody(_ref) {
686
688
  children: t("moveToFolder.title")
687
689
  }), /*#__PURE__*/jsxRuntime.jsx(Button, {
688
690
  className: "mr-2",
691
+ "data-cy": "add-new-folder-button",
689
692
  label: t("folders.add"),
690
693
  style: "link",
691
694
  onClick: onAddFolder
@@ -710,23 +713,29 @@ var PaneBody = function PaneBody(_ref) {
710
713
  className: "space-x-2",
711
714
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
712
715
  className: "flex flex-1 space-x-2",
713
- children: [/*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8({
716
+ children: [/*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8(_objectSpread$8({
714
717
  disabled: selection === undefined,
715
718
  label: t("common.save"),
716
719
  style: "primary",
717
720
  onClick: function onClick() {
718
721
  return onSubmit(selection);
719
722
  }
720
- }, submitButtonProps)), /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8({
723
+ }, submitButtonProps), {}, {
724
+ "data-cy": "save-changes-button"
725
+ })), /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8(_objectSpread$8({
721
726
  label: t("common.cancel"),
722
727
  style: "text",
723
728
  onClick: onClose
724
- }, cancelButtonProps))]
725
- }), onRemove && /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8({
729
+ }, cancelButtonProps), {}, {
730
+ "data-cy": "cancel-button"
731
+ }))]
732
+ }), onRemove && /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$8(_objectSpread$8({
726
733
  label: t("moveToFolder.remove"),
727
734
  style: "tertiary",
728
735
  onClick: onRemove
729
- }, removeButtonProps))]
736
+ }, removeButtonProps), {}, {
737
+ "data-cy": "remove-from-folder-button"
738
+ }))]
730
739
  })]
731
740
  });
732
741
  };
@@ -1407,6 +1416,7 @@ var FolderTile = function FolderTile(_ref) {
1407
1416
  metaInfo.push("".concat(folder.itemCount || 0, " ").concat(itemLabel).toLowerCase());
1408
1417
  return /*#__PURE__*/jsxRuntime.jsxs(reactRouterDom.Link, {
1409
1418
  className: "neeto-ui-bg-gray-50 neeto-ui-border-gray-200 neeto-ui-rounded-md hover:neeto-ui-border-primary-500 relative flex max-w-full items-start gap-2 border-2 p-3 transition-colors ease-in",
1419
+ "data-cy": "".concat(neetoCist.hyphenate(folder.name), "-folder-tile"),
1410
1420
  to: link,
1411
1421
  children: [/*#__PURE__*/jsxRuntime.jsx(Checkbox, {
1412
1422
  checked: isSelected,
@@ -1422,6 +1432,7 @@ var FolderTile = function FolderTile(_ref) {
1422
1432
  className: "flex min-w-0 flex-grow flex-col gap-2",
1423
1433
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
1424
1434
  className: "-mt-0.5 line-clamp-2 break-words pr-8",
1435
+ "data-cy": "folder-name",
1425
1436
  lineHeight: "snug",
1426
1437
  style: "body1",
1427
1438
  title: folder.name,
@@ -1472,6 +1483,7 @@ var FoldersList = function FoldersList(_ref) {
1472
1483
  children: t("folders.title")
1473
1484
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1474
1485
  className: "neeto-folders-grid-view-wrapper mb-10 grid w-full gap-4",
1486
+ "data-cy": "folders-list",
1475
1487
  children: subFolders.map(function (folder) {
1476
1488
  return /*#__PURE__*/React.createElement(FolderTile, {
1477
1489
  actions: actions,
@@ -1522,6 +1534,7 @@ var FolderNode = function FolderNode(_ref) {
1522
1534
  to: link,
1523
1535
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
1524
1536
  className: "flex items-center",
1537
+ "data-cy": "".concat(neetoCist.hyphenate(name), "-folder-sublink"),
1525
1538
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
1526
1539
  className: "line-clamp-1 block truncate",
1527
1540
  component: "span",