@@ -5,7 +5,6 @@ const chaiExclude = require('chai-exclude');
5
5
const expect = chai . expect ;
6
6
const should = chai . should ( ) ;
7
7
8
- const settings = require ( '../config/appsettings.json' ) ;
9
8
const {
10
9
sendEnvelopeForEmbeddedSigning,
11
10
makeEnvelope : makeEnvelopeForEmbeddedSigning ,
@@ -16,7 +15,7 @@ const {
16
15
makeEnvelope : makeEnvelopeForSigningViaEmail ,
17
16
document1
18
17
} = require ( '../lib/eSignature/examples/signingViaEmail' )
19
- const { TEST_TIMEOUT_MS , authenticate } = require ( './testHelpers' ) ;
18
+ const { TEST_TIMEOUT_MS , authenticate, config } = require ( './testHelpers' ) ;
20
19
21
20
const {
22
21
signerClientId,
@@ -51,8 +50,8 @@ describe ('EnvelopesApi tests:', function() {
51
50
this . timeout ( TEST_TIMEOUT_MS ) ;
52
51
53
52
const envelopeArgs = {
54
- signerEmail : settings . signerEmail ,
55
- signerName : settings . signerName ,
53
+ signerEmail : config . signerEmail ,
54
+ signerName : config . signerName ,
56
55
signerClientId : signerClientId ,
57
56
dsReturnUrl : returnUrl ,
58
57
dsPingUrl : pingUrl ,
@@ -75,8 +74,8 @@ describe ('EnvelopesApi tests:', function() {
75
74
this . timeout ( TEST_TIMEOUT_MS ) ;
76
75
77
76
const envelopeArgs = {
78
- signerEmail : settings . signerEmail ,
79
- signerName : settings . signerName ,
77
+ signerEmail : config . signerEmail ,
78
+ signerName : config . signerName ,
80
79
signerClientId : signerClientId ,
81
80
dsReturnUrl : returnUrl ,
82
81
dsPingUrl : pingUrl ,
@@ -96,8 +95,8 @@ describe ('EnvelopesApi tests:', function() {
96
95
recipients : {
97
96
signers : [
98
97
{
99
- email : settings . signerEmail ,
100
- name : settings . signerName ,
98
+ email : config . signerEmail ,
99
+ name : config . signerName ,
101
100
clientUserId : signerClientId ,
102
101
recipientId : '1' ,
103
102
tabs : {
@@ -126,8 +125,8 @@ describe ('EnvelopesApi tests:', function() {
126
125
this . timeout ( TEST_TIMEOUT_MS ) ;
127
126
128
127
const envelopeArgs = {
129
- signerEmail : settings . signerEmail ,
130
- signerName : settings . signerName ,
128
+ signerEmail : config . signerEmail ,
129
+ signerName : config . signerName ,
131
130
signerClientId : signerClientId ,
132
131
dsReturnUrl : returnUrl ,
133
132
dsPingUrl : pingUrl ,
@@ -136,8 +135,8 @@ describe ('EnvelopesApi tests:', function() {
136
135
const expected = {
137
136
returnUrl : `${ returnUrl } ?state=123` ,
138
137
authenticationMethod : 'none' ,
139
- email : settings . signerEmail ,
140
- userName : settings . signerName ,
138
+ email : config . signerEmail ,
139
+ userName : config . signerName ,
141
140
clientUserId : signerClientId ,
142
141
pingFrequency : 600 ,
143
142
pingUrl : pingUrl
@@ -153,8 +152,8 @@ describe ('EnvelopesApi tests:', function() {
153
152
this . timeout ( TEST_TIMEOUT_MS ) ;
154
153
155
154
const envelopeArgs = {
156
- signerEmail : settings . signerEmail ,
157
- signerName : settings . signerName ,
155
+ signerEmail : config . signerEmail ,
156
+ signerName : config . signerName ,
158
157
ccEmail : CC_EMAIL ,
159
158
ccName : CC_NAME ,
160
159
status : 'sent' ,
@@ -188,8 +187,8 @@ describe ('EnvelopesApi tests:', function() {
188
187
<h2 style="font-family: 'Trebuchet MS', Helvetica, sans-serif;
189
188
margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
190
189
color: darkblue;">Order Processing Division</h2>
191
- <h4>Ordered by ${ settings . signerName } </h4>
192
- <p style="margin-top:0em; margin-bottom:0em;">Email: ${ settings . signerEmail } </p>
190
+ <h4>Ordered by ${ config . signerName } </h4>
191
+ <p style="margin-top:0em; margin-bottom:0em;">Email: ${ config . signerEmail } </p>
193
192
<p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ CC_NAME } , ${ CC_EMAIL } </p>
194
193
<p style="margin-top:3em;">
195
194
Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
@@ -201,8 +200,8 @@ describe ('EnvelopesApi tests:', function() {
201
200
` ;
202
201
203
202
const envelopeArgs = {
204
- signerEmail : settings . signerEmail ,
205
- signerName : settings . signerName ,
203
+ signerEmail : config . signerEmail ,
204
+ signerName : config . signerName ,
206
205
ccEmail : CC_EMAIL ,
207
206
ccName : CC_NAME ,
208
207
status : 'sent' ,
@@ -235,8 +234,8 @@ describe ('EnvelopesApi tests:', function() {
235
234
recipients : {
236
235
signers : [
237
236
{
238
- email : settings . signerEmail ,
239
- name : settings . signerName ,
237
+ email : config . signerEmail ,
238
+ name : config . signerName ,
240
239
recipientId : '1' ,
241
240
routingOrder : '1' ,
242
241
tabs : {
@@ -279,8 +278,8 @@ describe ('EnvelopesApi tests:', function() {
279
278
this . timeout ( TEST_TIMEOUT_MS ) ;
280
279
281
280
const envelopeArgs = {
282
- signerEmail : settings . signerEmail ,
283
- signerName : settings . signerName ,
281
+ signerEmail : config . signerEmail ,
282
+ signerName : config . signerName ,
284
283
ccEmail : CC_EMAIL ,
285
284
ccName : CC_NAME ,
286
285
} ;
@@ -297,8 +296,8 @@ describe ('EnvelopesApi tests:', function() {
297
296
<h2 style="font-family: 'Trebuchet MS', Helvetica, sans-serif;
298
297
margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
299
298
color: darkblue;">Order Processing Division</h2>
300
- <h4>Ordered by ${ settings . signerName } </h4>
301
- <p style="margin-top:0em; margin-bottom:0em;">Email: ${ settings . signerEmail } </p>
299
+ <h4>Ordered by ${ config . signerName } </h4>
300
+ <p style="margin-top:0em; margin-bottom:0em;">Email: ${ config . signerEmail } </p>
302
301
<p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ CC_NAME } , ${ CC_EMAIL } </p>
303
302
<p style="margin-top:3em;">
304
303
Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
@@ -312,8 +311,8 @@ describe ('EnvelopesApi tests:', function() {
312
311
const document = await document1 ( envelopeArgs ) ;
313
312
314
313
should . exist ( document ) ;
315
- expect ( document ) . to . contain ( settings . signerEmail ) ;
316
- expect ( document ) . to . contain ( settings . signerName ) ;
314
+ expect ( document ) . to . contain ( config . signerEmail ) ;
315
+ expect ( document ) . to . contain ( config . signerName ) ;
317
316
expect ( document ) . to . contain ( CC_EMAIL ) ;
318
317
expect ( document ) . to . contain ( CC_NAME ) ;
319
318
expect ( document ) . to . be . equal ( expected ) ;
0 commit comments