@financial-times/n-conversion-forms 45.1.0 → 45.2.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "branch": "",
3
3
  "repo": "n-conversion-forms",
4
- "version": "e6f991fa97c43b0b96fe36ab96fdf35fc877333b",
5
- "tag": "v45.1.0",
6
- "buildNumber": "18109"
4
+ "version": "7cb3814b5ef6dccca5d29636c4cf6cf98eb37b52",
5
+ "tag": "v45.2.0",
6
+ "buildNumber": "18122"
7
7
  }
@@ -1,5 +1,102 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Confirmation renders appropriately if a confirmation email has been sent 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 o3-type-body-base">
25
+ Go to your
26
+ <a href="https://www.ft.com/myaccount/personal-details"
27
+ target="_blank"
28
+ rel="noopener noreferrer"
29
+ data-trackable="yourAccount"
30
+ >
31
+ account settings
32
+ </a>
33
+ to view or edit your account. If you need to get in touch call us on
34
+ <a href="tel:+442077556248">
35
+ +44 (0) 207 755 6248
36
+ </a>
37
+ . Or contact us for additional support.
38
+ </p>
39
+ </div>
40
+ <p class="ncf__paragraph o3-type-body-base">
41
+ We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. See our
42
+ <a href="http://help.ft.com/help/legal-privacy/terms-conditions/"
43
+ target="_top"
44
+ rel="noopener"
45
+ >
46
+ Terms &amp; Conditions
47
+ </a>
48
+ for details on how to cancel.
49
+ </p>
50
+ </div>
51
+ `;
52
+
53
+ exports[`Confirmation renders appropriately if a confirmation email has not been sent 1`] = `
54
+ <div class="ncf ncf__wrapper">
55
+ <div class="ncf__center">
56
+ <div class="ncf__icon ncf__icon--tick ncf__icon--large">
57
+ </div>
58
+ <p class="ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation">
59
+ You are now subscribed to:
60
+ </p>
61
+ <h1 class="ncf__header ncf__header--confirmation">
62
+ </h1>
63
+ </div>
64
+ <p class="ncf__paragraph">
65
+ Here’s a summary of your subscription:
66
+ </p>
67
+ <div class="ncf__headed-paragraph">
68
+ <h3 class="ncf__header">
69
+ Something not right?
70
+ </h3>
71
+ <p class="ncf__paragraph o3-type-body-base">
72
+ Go to your
73
+ <a href="https://www.ft.com/myaccount/personal-details"
74
+ target="_blank"
75
+ rel="noopener noreferrer"
76
+ data-trackable="yourAccount"
77
+ >
78
+ account settings
79
+ </a>
80
+ to view or edit your account. If you need to get in touch call us on
81
+ <a href="tel:+442077556248">
82
+ +44 (0) 207 755 6248
83
+ </a>
84
+ . Or contact us for additional support.
85
+ </p>
86
+ </div>
87
+ <p class="ncf__paragraph o3-type-body-base">
88
+ We will automatically renew your subscription using the payment method provided unless you cancel before your renewal date. See our
89
+ <a href="http://help.ft.com/help/legal-privacy/terms-conditions/"
90
+ target="_top"
91
+ rel="noopener"
92
+ >
93
+ Terms &amp; Conditions
94
+ </a>
95
+ for details on how to cancel.
96
+ </p>
97
+ </div>
98
+ `;
99
+
3
100
  exports[`Confirmation renders appropriately if is 'Evergreen' subscription term type 1`] = `
4
101
  <div class="ncf ncf__wrapper">
5
102
  <div class="ncf__center">
@@ -8,6 +8,7 @@ export function Confirmation({
8
8
  isTrial = false,
9
9
  isB2cPartnership = false,
10
10
  b2cPartnershipCopy = [],
11
+ sendConfirmationEmail = true,
11
12
  isEvergreenSubscriptionTermType = true,
12
13
  offer = '',
13
14
  email = EMAIL_DEFAULT_TEXT,
@@ -69,7 +70,7 @@ export function Confirmation({
69
70
  </div>
70
71
 
71
72
  {nextActionTop}
72
- {!isB2cPartnershipCopyAvailable && (
73
+ {sendConfirmationEmail && !isB2cPartnershipCopyAvailable && (
73
74
  <p className="ncf__paragraph">
74
75
  We’ve sent confirmation to {email}. Make sure you check your spam
75
76
  folder if you don’t receive it.
@@ -136,6 +137,7 @@ Confirmation.propTypes = {
136
137
  isTrial: PropTypes.bool,
137
138
  isB2cPartnership: PropTypes.bool,
138
139
  b2cPartnershipCopy: PropTypes.array,
140
+ sendConfirmationEmail: PropTypes.bool,
139
141
  isEvergreenSubscriptionTermType: PropTypes.bool,
140
142
  offer: PropTypes.string.isRequired,
141
143
  email: PropTypes.string,
@@ -41,7 +41,23 @@ describe('Confirmation', () => {
41
41
  it("renders appropriately if is 'Termed' subscription term type", () => {
42
42
  const props = {
43
43
  isEvergreenSubscriptionTermType: false,
44
- isTermedSubscriptionTermType: true,
44
+ isTermedSubscriptionTermType: false,
45
+ };
46
+
47
+ expect(Confirmation).toRenderCorrectly(props);
48
+ });
49
+
50
+ it('renders appropriately if a confirmation email has been sent', () => {
51
+ const props = {
52
+ sendConfirmationEmail: true,
53
+ };
54
+
55
+ expect(Confirmation).toRenderCorrectly(props);
56
+ });
57
+
58
+ it('renders appropriately if a confirmation email has not been sent', () => {
59
+ const props = {
60
+ sendConfirmationEmail: false,
45
61
  };
46
62
 
47
63
  expect(Confirmation).toRenderCorrectly(props);
@@ -65,6 +65,7 @@ Basic.args = {
65
65
 
66
66
  export const TermedSubscriptionTermType = (args) => <Confirmation {...args} />;
67
67
  TermedSubscriptionTermType.args = {
68
+ sendConfirmationEmail: false,
68
69
  isTermedSubscriptionTermType: true,
69
70
  offer: 'Single-term subscription',
70
71
  details: [
@@ -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$sendConfirmation = _ref.sendConfirmationEmail,
22
+ sendConfirmationEmail = _ref$sendConfirmation === void 0 ? true : _ref$sendConfirmation,
21
23
  _ref$isEvergreenSubsc = _ref.isEvergreenSubscriptionTermType,
22
24
  isEvergreenSubscriptionTermType = _ref$isEvergreenSubsc === void 0 ? true : _ref$isEvergreenSubsc,
23
25
  _ref$offer = _ref.offer,
@@ -72,7 +74,7 @@ function Confirmation(_ref) {
72
74
  className: "ncf__paragraph--reduced-padding ncf__paragraph--subscription-confirmation"
73
75
  }, "You are now subscribed to:"), /*#__PURE__*/_react["default"].createElement("h1", {
74
76
  className: "ncf__header ncf__header--confirmation"
75
- }, offer)), nextActionTop, !isB2cPartnershipCopyAvailable && /*#__PURE__*/_react["default"].createElement("p", {
77
+ }, offer)), nextActionTop, sendConfirmationEmail && !isB2cPartnershipCopyAvailable && /*#__PURE__*/_react["default"].createElement("p", {
76
78
  className: "ncf__paragraph"
77
79
  }, "We\u2019ve sent confirmation to ", email, ". Make sure you check your spam folder if you don\u2019t receive it."), isB2cPartnershipCopyAvailable ? /*#__PURE__*/_react["default"].createElement("p", {
78
80
  className: "ncf__paragraph"
@@ -105,6 +107,7 @@ Confirmation.propTypes = {
105
107
  isTrial: _propTypes["default"].bool,
106
108
  isB2cPartnership: _propTypes["default"].bool,
107
109
  b2cPartnershipCopy: _propTypes["default"].array,
110
+ sendConfirmationEmail: _propTypes["default"].bool,
108
111
  isEvergreenSubscriptionTermType: _propTypes["default"].bool,
109
112
  offer: _propTypes["default"].string.isRequired,
110
113
  email: _propTypes["default"].string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-conversion-forms",
3
- "version": "45.1.0",
3
+ "version": "45.2.0",
4
4
  "description": "Containing jsx components and styles for forms included on Accounts and Acquisition apps (next-signup, next-profile, next-retention, etc).",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {