@financial-times/n-conversion-forms 32.7.1 → 32.8.0
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/.toolkitstate/ci.json +2 -2
- package/components/__snapshots__/confirmation.spec.js.snap +54 -0
- package/components/confirmation.jsx +10 -5
- package/components/confirmation.spec.js +6 -0
- package/components/confirmation.stories.js +18 -0
- package/dist/confirmation.jsx +5 -2
- package/package.json +1 -1
package/.toolkitstate/ci.json
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Confirmation renders appropriately if is 'Termed' subscription term type 1`] = `
|
|
4
|
+
<div class="ncf ncf__wrapper">
|
|
5
|
+
<div class="ncf__center">
|
|
6
|
+
<div class="ncf__icon ncf__icon--tick ncf__icon--large">
|
|
7
|
+
</div>
|
|
8
|
+
<p class="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
|
|
9
|
+
You are now subscribed to:
|
|
10
|
+
</p>
|
|
11
|
+
<h1 class="ncf__header ncf__header--confirmation">
|
|
12
|
+
</h1>
|
|
13
|
+
</div>
|
|
14
|
+
<p class="ncf__paragraph">
|
|
15
|
+
We’ve sent confirmation to your email. Make sure you check your spam folder if you don’t receive it.
|
|
16
|
+
</p>
|
|
17
|
+
<p class="ncf__paragraph">
|
|
18
|
+
Here’s a summary of your subscription:
|
|
19
|
+
</p>
|
|
20
|
+
<div class="ncf__headed-paragraph">
|
|
21
|
+
<h3 class="ncf__header">
|
|
22
|
+
Something not right?
|
|
23
|
+
</h3>
|
|
24
|
+
<p class="ncf__paragraph">
|
|
25
|
+
Go to your
|
|
26
|
+
<a class="ncf__link ncf__link--external"
|
|
27
|
+
href="https://www.ft.com/myaccount/personal-details"
|
|
28
|
+
target="_blank"
|
|
29
|
+
rel="noopener noreferrer"
|
|
30
|
+
data-trackable="yourAccount"
|
|
31
|
+
>
|
|
32
|
+
account settings
|
|
33
|
+
</a>
|
|
34
|
+
to view or edit your account. If you need to get in touch call us on
|
|
35
|
+
<a href="tel:+442077556248"
|
|
36
|
+
class="ncf__link ncf__link--external"
|
|
37
|
+
>
|
|
38
|
+
+44 (0) 207 755 6248
|
|
39
|
+
</a>
|
|
40
|
+
. Or contact us for additional support.
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
<p class="ncf__paragraph">
|
|
44
|
+
See our
|
|
45
|
+
<a class="ncf__link ncf__link--external"
|
|
46
|
+
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
47
|
+
target="_top"
|
|
48
|
+
rel="noopener"
|
|
49
|
+
>
|
|
50
|
+
Terms & Conditions
|
|
51
|
+
</a>
|
|
52
|
+
for details on how to cancel.
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
`;
|
|
56
|
+
|
|
3
57
|
exports[`Confirmation renders appropriately if is B2C Partnership 1`] = `
|
|
4
58
|
<div class="ncf ncf__wrapper">
|
|
5
59
|
<div class="ncf__center">
|
|
@@ -8,6 +8,7 @@ export function Confirmation({
|
|
|
8
8
|
isTrial = false,
|
|
9
9
|
isB2cPartnership = false,
|
|
10
10
|
b2cPartnershipCopy = [],
|
|
11
|
+
isTermedSubscriptionTermType = false,
|
|
11
12
|
offer = '',
|
|
12
13
|
email = EMAIL_DEFAULT_TEXT,
|
|
13
14
|
details = null,
|
|
@@ -116,8 +117,12 @@ export function Confirmation({
|
|
|
116
117
|
</p>
|
|
117
118
|
</div>
|
|
118
119
|
<p className="ncf__paragraph">
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
{
|
|
121
|
+
!isTermedSubscriptionTermType
|
|
122
|
+
? 'We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. '
|
|
123
|
+
: ''
|
|
124
|
+
}
|
|
125
|
+
{'See our '}
|
|
121
126
|
<a
|
|
122
127
|
className="ncf__link ncf__link--external"
|
|
123
128
|
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
@@ -125,10 +130,9 @@ export function Confirmation({
|
|
|
125
130
|
rel="noopener"
|
|
126
131
|
>
|
|
127
132
|
Terms & Conditions
|
|
128
|
-
</a>
|
|
129
|
-
for details on how to cancel.
|
|
133
|
+
</a>
|
|
134
|
+
{' for details on how to cancel.'}
|
|
130
135
|
</p>
|
|
131
|
-
|
|
132
136
|
{nextActionBottom}
|
|
133
137
|
</div>
|
|
134
138
|
);
|
|
@@ -138,6 +142,7 @@ Confirmation.propTypes = {
|
|
|
138
142
|
isTrial: PropTypes.bool,
|
|
139
143
|
isB2cPartnership: PropTypes.bool,
|
|
140
144
|
b2cPartnershipCopy: PropTypes.array,
|
|
145
|
+
isTermedSubscriptionTermType: PropTypes.bool,
|
|
141
146
|
offer: PropTypes.string.isRequired,
|
|
142
147
|
email: PropTypes.string,
|
|
143
148
|
details: PropTypes.arrayOf(
|
|
@@ -29,6 +29,12 @@ describe('Confirmation', () => {
|
|
|
29
29
|
expect(Confirmation).toRenderCorrectly(props);
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
it("renders appropriately if is 'Termed' subscription term type", () => {
|
|
33
|
+
const props = { isTermedSubscriptionTermType: true };
|
|
34
|
+
|
|
35
|
+
expect(Confirmation).toRenderCorrectly(props);
|
|
36
|
+
});
|
|
37
|
+
|
|
32
38
|
it('renders with custom email', () => {
|
|
33
39
|
const props = { offer: OFFER_TEXT, email: 'test@example.com' };
|
|
34
40
|
|
|
@@ -64,3 +64,21 @@ Basic.args = {
|
|
|
64
64
|
nextActionBottom,
|
|
65
65
|
newsletterScheduleExplainer,
|
|
66
66
|
};
|
|
67
|
+
|
|
68
|
+
export const TermedSubscriptionTermType = (args) => <Confirmation {...args} />;
|
|
69
|
+
TermedSubscriptionTermType.args = {
|
|
70
|
+
isTermedSubscriptionTermType: true,
|
|
71
|
+
offer: 'Single-term subscription',
|
|
72
|
+
details: [
|
|
73
|
+
{
|
|
74
|
+
title: 'End date',
|
|
75
|
+
data: 'February 2, 2024',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: 'One-time payment',
|
|
79
|
+
data: 'GBP 19.00',
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
nextActionTop,
|
|
83
|
+
nextActionBottom,
|
|
84
|
+
};
|
package/dist/confirmation.jsx
CHANGED
|
@@ -18,6 +18,8 @@ function Confirmation(_ref) {
|
|
|
18
18
|
isB2cPartnership = _ref$isB2cPartnership === void 0 ? false : _ref$isB2cPartnership,
|
|
19
19
|
_ref$b2cPartnershipCo = _ref.b2cPartnershipCopy,
|
|
20
20
|
b2cPartnershipCopy = _ref$b2cPartnershipCo === void 0 ? [] : _ref$b2cPartnershipCo,
|
|
21
|
+
_ref$isTermedSubscrip = _ref.isTermedSubscriptionTermType,
|
|
22
|
+
isTermedSubscriptionTermType = _ref$isTermedSubscrip === void 0 ? false : _ref$isTermedSubscrip,
|
|
21
23
|
_ref$offer = _ref.offer,
|
|
22
24
|
offer = _ref$offer === void 0 ? '' : _ref$offer,
|
|
23
25
|
_ref$email = _ref.email,
|
|
@@ -95,17 +97,18 @@ function Confirmation(_ref) {
|
|
|
95
97
|
className: "ncf__link ncf__link--external"
|
|
96
98
|
}, "+44 (0) 207 755 6248"), ". Or contact us for additional support.")), /*#__PURE__*/_react["default"].createElement("p", {
|
|
97
99
|
className: "ncf__paragraph"
|
|
98
|
-
},
|
|
100
|
+
}, !isTermedSubscriptionTermType ? 'We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. ' : '', 'See our ', /*#__PURE__*/_react["default"].createElement("a", {
|
|
99
101
|
className: "ncf__link ncf__link--external",
|
|
100
102
|
href: "http://help.ft.com/help/legal-privacy/terms-conditions/",
|
|
101
103
|
target: "_top",
|
|
102
104
|
rel: "noopener"
|
|
103
|
-
}, "Terms & Conditions"), '
|
|
105
|
+
}, "Terms & Conditions"), ' for details on how to cancel.'), nextActionBottom);
|
|
104
106
|
}
|
|
105
107
|
Confirmation.propTypes = {
|
|
106
108
|
isTrial: _propTypes["default"].bool,
|
|
107
109
|
isB2cPartnership: _propTypes["default"].bool,
|
|
108
110
|
b2cPartnershipCopy: _propTypes["default"].array,
|
|
111
|
+
isTermedSubscriptionTermType: _propTypes["default"].bool,
|
|
109
112
|
offer: _propTypes["default"].string.isRequired,
|
|
110
113
|
email: _propTypes["default"].string,
|
|
111
114
|
details: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.8.0",
|
|
4
4
|
"description": "Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|