@magento/venia-ui 11.5.0-alpha.1 → 11.5.0-beta.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.
@@ -65,7 +65,8 @@ const CreateAccount = props => {
65
65
  handleSubmit,
66
66
  isDisabled,
67
67
  initialValues,
68
- recaptchaWidgetProps
68
+ recaptchaWidgetProps,
69
+ minimumPasswordLength
69
70
  } = talonProps;
70
71
 
71
72
  return (
@@ -155,7 +156,7 @@ const CreateAccount = props => {
155
156
  data-cy="OrderConfirmationPage-CreateAccount-password"
156
157
  validate={combine([
157
158
  isRequired,
158
- [hasLengthAtLeast, 8],
159
+ [hasLengthAtLeast, minimumPasswordLength],
159
160
  validatePassword
160
161
  ])}
161
162
  validateOnBlur
@@ -14,7 +14,11 @@ jest.mock('@apollo/client', () => ({
14
14
  }
15
15
  ]),
16
16
  useQuery: jest.fn().mockImplementation(() => ({
17
- data: {},
17
+ data: {
18
+ storeConfig: {
19
+ minimum_password_length: 8 // or whatever value is expected
20
+ }
21
+ },
18
22
  loading: false,
19
23
  error: null
20
24
  }))
@@ -35,8 +35,10 @@ const CreateAccount = props => {
35
35
  handleCancelKeyPress,
36
36
  isDisabled,
37
37
  initialValues,
38
- recaptchaWidgetProps
38
+ recaptchaWidgetProps,
39
+ minimumPasswordLength
39
40
  } = talonProps;
41
+ console.log('minimumPasswordLength==', minimumPasswordLength);
40
42
  const { formatMessage } = useIntl();
41
43
  const classes = useStyle(defaultClasses, props.classes);
42
44
 
@@ -164,7 +166,7 @@ const CreateAccount = props => {
164
166
  })}
165
167
  validate={combine([
166
168
  isRequired,
167
- [hasLengthAtLeast, 8],
169
+ [hasLengthAtLeast, minimumPasswordLength],
168
170
  validatePassword
169
171
  ])}
170
172
  validateOnBlur
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magento/venia-ui",
3
- "version": "11.5.0-alpha.1",
3
+ "version": "11.5.0-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -80,7 +80,7 @@
80
80
  "peerDependencies": {
81
81
  "@apollo/client": "~3.5.0",
82
82
  "@magento/babel-preset-peregrine": "~1.3.3",
83
- "@magento/peregrine": "14.4.1-alpha.1",
83
+ "@magento/peregrine": "14.4.1-beta.1",
84
84
  "@magento/pwa-buildpack": "~11.5.3",
85
85
  "apollo-cache-persist": "~0.1.1",
86
86
  "braintree-web-drop-in": "~1.33.3",