@bigbinary/neeto-molecules 1.0.29 → 1.0.31

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.
@@ -3393,6 +3393,7 @@ var FormRow = function FormRow(_ref) {
3393
3393
  onCollapse();
3394
3394
  };
3395
3395
  return /*#__PURE__*/React.createElement(Form, {
3396
+ "data-cy": "allowed-ip-range-form",
3396
3397
  formikProps: {
3397
3398
  initialValues: data,
3398
3399
  validateOnBlur: isSubmitted,
@@ -3405,15 +3406,18 @@ var FormRow = function FormRow(_ref) {
3405
3406
  }, /*#__PURE__*/React.createElement(Input, {
3406
3407
  autoFocus: true,
3407
3408
  className: "w-5/12 flex-grow px-3 py-2 text-left",
3409
+ "data-cy": "ip-start-text-field",
3408
3410
  name: "ipStart",
3409
3411
  placeholder: t("neetoMolecules.ipRestriction.ipStart")
3410
3412
  }), /*#__PURE__*/React.createElement(Input, {
3411
3413
  className: "w-5/12 flex-grow px-3 py-2 text-left",
3414
+ "data-cy": "ip-end-text-field",
3412
3415
  name: "ipEnd",
3413
3416
  placeholder: t("neetoMolecules.ipRestriction.ipEnd")
3414
3417
  }), /*#__PURE__*/React.createElement("div", {
3415
3418
  className: "w-5/12 flex-grow px-3 py-2 text-center"
3416
3419
  }, /*#__PURE__*/React.createElement(Button, {
3420
+ "data-cy": "save-changes-button",
3417
3421
  icon: Check,
3418
3422
  style: "text",
3419
3423
  type: "submit",
@@ -3425,6 +3429,7 @@ var FormRow = function FormRow(_ref) {
3425
3429
  return setIsSubmitted(true);
3426
3430
  }
3427
3431
  }), /*#__PURE__*/React.createElement(Button$1, {
3432
+ "data-cy": "ip-cancel-button",
3428
3433
  icon: Close,
3429
3434
  style: "text",
3430
3435
  type: "reset",
@@ -3452,13 +3457,15 @@ var Row = function Row(_ref) {
3452
3457
  setIsDeleteIpRangeAlertOpen(false);
3453
3458
  };
3454
3459
  return /*#__PURE__*/React.createElement("div", {
3455
- className: "neeto-ui-bg-white flex w-full flex-row justify-between px-1 py-2"
3460
+ className: "neeto-ui-bg-white flex w-full flex-row justify-between px-1 py-2",
3461
+ "data-cy": "ip-range-row"
3456
3462
  }, /*#__PURE__*/React.createElement(Tooltip, {
3457
3463
  content: data.ipStart,
3458
3464
  disabled: data.ipStart.length < TRUNCATE_LENGTH,
3459
3465
  position: "top"
3460
3466
  }, /*#__PURE__*/React.createElement(Typography, {
3461
3467
  className: "flex w-4/12 flex-grow items-center px-3 py-2 text-left",
3468
+ "data-cy": "ip-range-start-value",
3462
3469
  style: "body2"
3463
3470
  }, truncate(data.ipStart, TRUNCATE_LENGTH))), /*#__PURE__*/React.createElement(Tooltip, {
3464
3471
  content: data.ipEnd,
@@ -3466,10 +3473,12 @@ var Row = function Row(_ref) {
3466
3473
  position: "top"
3467
3474
  }, /*#__PURE__*/React.createElement(Typography, {
3468
3475
  className: "flex w-4/12 flex-grow items-center px-3 py-2 text-left",
3476
+ "data-cy": "ip-range-end-value",
3469
3477
  style: "body2"
3470
3478
  }, truncate(data.ipEnd, TRUNCATE_LENGTH))), /*#__PURE__*/React.createElement("div", {
3471
3479
  className: "w-4/12 flex-grow px-3 py-2 text-center"
3472
3480
  }, /*#__PURE__*/React.createElement(Button$1, {
3481
+ "data-cy": "ip-range-delete-button",
3473
3482
  icon: Delete,
3474
3483
  style: "text",
3475
3484
  tooltipProps: {
@@ -3492,6 +3501,7 @@ var Row = function Row(_ref) {
3492
3501
  },
3493
3502
  onSubmit: handleDelete
3494
3503
  }), /*#__PURE__*/React.createElement(Button$1, {
3504
+ "data-cy": "ip-range-edit-button",
3495
3505
  icon: Edit,
3496
3506
  style: "text",
3497
3507
  tooltipProps: {
@@ -3518,13 +3528,16 @@ var AllowedIpRanges = function AllowedIpRanges() {
3518
3528
  var _useFetchAllowedIpRan = useFetchAllowedIpRanges(),
3519
3529
  allowedIpRanges = _useFetchAllowedIpRan.data;
3520
3530
  return /*#__PURE__*/React.createElement("div", {
3521
- className: "space-y-4"
3531
+ className: "space-y-4",
3532
+ "data-cy": "allowed-ip-range-container"
3522
3533
  }, /*#__PURE__*/React.createElement("div", {
3523
3534
  className: "flex flex-row items-center"
3524
3535
  }, /*#__PURE__*/React.createElement(Typography, {
3536
+ "data-cy": "allowed-ip-range-heading",
3525
3537
  style: "h3"
3526
3538
  }, t("neetoMolecules.ipRestriction.allowedIpRangeTitle")), /*#__PURE__*/React.createElement(Button$1, {
3527
3539
  className: "ml-2",
3540
+ "data-cy": "add-allowed-ip-range-button",
3528
3541
  disabled: showAddNew,
3529
3542
  icon: Plus,
3530
3543
  size: "small",
@@ -3590,10 +3603,15 @@ var CurrentIp = function CurrentIp() {
3590
3603
  var _useTranslation = useTranslation(),
3591
3604
  t = _useTranslation.t;
3592
3605
  return /*#__PURE__*/React.createElement("div", {
3593
- className: "space-y-1"
3594
- }, /*#__PURE__*/React.createElement(Typography, null, t("neetoMolecules.ipRestriction.currentIpTitle")), /*#__PURE__*/React.createElement(Typography, {
3606
+ className: "space-y-1",
3607
+ "data-cy": "current-ip-container"
3608
+ }, /*#__PURE__*/React.createElement(Typography, {
3609
+ "data-cy": "current-ip-heading"
3610
+ }, t("neetoMolecules.ipRestriction.currentIpTitle")), /*#__PURE__*/React.createElement(Typography, {
3611
+ "data-cy": "current-ip-value",
3595
3612
  weight: "semibold"
3596
3613
  }, isLoading ? "..." : data.ip), /*#__PURE__*/React.createElement(Typography, {
3614
+ "data-cy": "current-ip-description",
3597
3615
  style: "body2"
3598
3616
  }, t("neetoMolecules.ipRestriction.currentIpDescription")));
3599
3617
  };
@@ -3651,15 +3669,18 @@ var IpRestriction = function IpRestriction() {
3651
3669
  /*#__PURE__*/
3652
3670
  // eslint-disable-next-line @bigbinary/neeto/use-neetoui-classes
3653
3671
  React.createElement("div", {
3654
- className: "neeto-ui-bg-white neeto-ui-border-gray-200 mx-auto mb-4 w-full space-y-4 rounded-sm border sm:max-w-screen-sm md:max-w-screen-md lg:max-w-3xl"
3672
+ className: "neeto-ui-bg-white neeto-ui-border-gray-200 neeto-ui-rounded-sm mx-auto mb-4 w-full space-y-4 border sm:max-w-screen-sm md:max-w-screen-md lg:max-w-3xl",
3673
+ "data-cy": "ip-restrictions-card"
3655
3674
  }, /*#__PURE__*/React.createElement("div", {
3656
3675
  className: "space-y-1 p-4"
3657
3676
  }, /*#__PURE__*/React.createElement(Switch, {
3658
3677
  checked: data.isIpRestrictionEnabled,
3678
+ "data-cy": "enable-ip-restriction-switch",
3659
3679
  disabled: isFetching || isUpdating,
3660
3680
  label: t("neetoMolecules.ipRestriction.switchLabel"),
3661
3681
  onChange: handleSwitchButtonChange
3662
3682
  }), /*#__PURE__*/React.createElement(Typography, {
3683
+ "data-cy": "ip-restriction-description",
3663
3684
  style: "body3"
3664
3685
  }, t("neetoMolecules.ipRestriction.description"))), data.isIpRestrictionEnabled && /*#__PURE__*/React.createElement("div", {
3665
3686
  className: "neeto-ui-bg-gray-100 w-full space-y-4 p-4"