@saleor/macaw-ui 0.7.1 → 0.7.2

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.1",
2
+ "version": "0.7.2",
3
3
  "license": "CC-BY-4.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
@@ -66,7 +66,7 @@ export const Alert: React.FC<AlertProps> = ({
66
66
  hoverOutline={false}
67
67
  variant="secondary"
68
68
  onClick={() => setVisible(false)}
69
- data-test="close"
69
+ data-test-id="close"
70
70
  >
71
71
  <CloseIcon />
72
72
  </IconButton>
@@ -27,7 +27,7 @@ export const AlertBase: React.FC<AlertBaseProps> = ({
27
27
  [classes.warning]: variant === "warning",
28
28
  [classes.success]: variant === "success",
29
29
  })}
30
- data-test="alert"
30
+ data-test-id="alert"
31
31
  {...rest}
32
32
  >
33
33
  <CardContent>{children}</CardContent>
@@ -30,7 +30,7 @@ export const DialogHeader: React.FC<DialogHeaderProps> = ({
30
30
  className={classes.button}
31
31
  onClick={onClose}
32
32
  aria-label="Close modal"
33
- data-test="close"
33
+ data-test-id="close"
34
34
  >
35
35
  <CloseIcon />
36
36
  </button>
@@ -48,7 +48,7 @@ export const Notification: React.FC<NotificationProps> = ({
48
48
  return (
49
49
  <div
50
50
  className={clsx(classes.snackbarContainer, className)}
51
- data-test="notification"
51
+ data-test-id="notification"
52
52
  data-test-type={type}
53
53
  {...rest}
54
54
  >
@@ -95,7 +95,7 @@ export const Notification: React.FC<NotificationProps> = ({
95
95
  key="action"
96
96
  variant="tertiary"
97
97
  onClick={action.onClick}
98
- data-test="button-action"
98
+ data-test-id="button-action"
99
99
  >
100
100
  {action.label}
101
101
  </Button>
@@ -135,7 +135,7 @@ export const Notification: React.FC<NotificationProps> = ({
135
135
  hoverOutline={false}
136
136
  variant="secondary"
137
137
  className={classes.closeBtn}
138
- data-test="close"
138
+ data-test-id="close"
139
139
  >
140
140
  <CloseIcon />
141
141
  </IconButton>,
@@ -51,7 +51,7 @@ export const PaginationActions = <BProps,>({
51
51
  disableRipple
52
52
  onClick={onPreviousPage}
53
53
  disabled={previousDisabled}
54
- data-test="button-pagination-back"
54
+ data-test-id="button-pagination-back"
55
55
  aria-label="previous page"
56
56
  {...prevIconButtonProps}
57
57
  >
@@ -66,7 +66,7 @@ export const PaginationActions = <BProps,>({
66
66
  disableRipple
67
67
  onClick={onNextPage}
68
68
  disabled={nextDisabled}
69
- data-test="button-pagination-next"
69
+ data-test-id="button-pagination-next"
70
70
  aria-label="next page"
71
71
  {...nextIconButtonProps}
72
72
  >
@@ -46,7 +46,7 @@ export const Savebar: React.FC<SavebarProps> = ({
46
46
  error
47
47
  variant="primary"
48
48
  onClick={onDelete}
49
- data-test="button-bar-delete"
49
+ data-test-id="button-bar-delete"
50
50
  >
51
51
  {labels.delete}
52
52
  </Button>
@@ -58,7 +58,7 @@ export const Savebar: React.FC<SavebarProps> = ({
58
58
  color="text"
59
59
  variant="secondary"
60
60
  onClick={onCancel}
61
- data-test="button-bar-cancel"
61
+ data-test-id="button-bar-cancel"
62
62
  >
63
63
  {labels.cancel}
64
64
  </Button>
@@ -69,7 +69,7 @@ export const Savebar: React.FC<SavebarProps> = ({
69
69
  labels={labels}
70
70
  onClick={onSubmit}
71
71
  transitionState={state}
72
- data-test="button-bar-confirm"
72
+ data-test-id="button-bar-confirm"
73
73
  />
74
74
  </ButtonTooltipDecorator>
75
75
  </ActionBar>
@@ -191,8 +191,7 @@ export const MenuItem: React.FC<MenuItemProps> = ({
191
191
  >
192
192
  <span
193
193
  className={classes.menuItemBtn}
194
- data-test="menu-item-label"
195
- data-test-id={menuItem.id}
194
+ data-test-id={`menu-item-label-${menuItem.id}`}
196
195
  >
197
196
  {menuItem.iconSrc && (
198
197
  <SVG className={classes.icon} src={menuItem.iconSrc} />
@@ -237,8 +236,7 @@ export const MenuItem: React.FC<MenuItemProps> = ({
237
236
  onClick={(event: React.MouseEvent) =>
238
237
  handleClick(event, subMenuItem)
239
238
  }
240
- data-test="submenu-item-label"
241
- data-test-id={subMenuItem.id}
239
+ data-test-id={`submenu-item-label-${subMenuItem.id}`}
242
240
  selected={activeId === subMenuItem.id}
243
241
  {...linkProps}
244
242
  >
@@ -24,8 +24,7 @@ export const MenuItemBtn: React.FC<MenuItemBtnProps> = ({
24
24
  return (
25
25
  <Component
26
26
  className={classes.menuItemBtn}
27
- data-test="menu-item-label"
28
- data-test-id={menuItem.id}
27
+ data-test-id={`menu-item-label-${menuItem.id}`}
29
28
  onClick={() => onClick(menuItem)}
30
29
  {...linkProps}
31
30
  >
@@ -41,7 +41,7 @@ export const UserChipMenu: React.FC<UserChipProps> = ({
41
41
  className={classes.userChip}
42
42
  ref={anchor}
43
43
  onClick={() => setMenuState(!isMenuOpened)}
44
- data-test="userMenu"
44
+ data-test-id="userMenu"
45
45
  state={isMenuOpened ? "active" : "default"}
46
46
  {...props}
47
47
  >