@@ -5,7 +5,6 @@ const chaiExclude = require('chai-exclude');
55const expect = chai . expect ;
66const should = chai . should ( ) ;
77
8- const settings = require ( '../config/appsettings.json' ) ;
98const {
109 sendEnvelopeForEmbeddedSigning,
1110 makeEnvelope : makeEnvelopeForEmbeddedSigning ,
@@ -16,7 +15,7 @@ const {
1615 makeEnvelope : makeEnvelopeForSigningViaEmail ,
1716 document1
1817} = require ( '../lib/eSignature/examples/signingViaEmail' )
19- const { TEST_TIMEOUT_MS , authenticate } = require ( './testHelpers' ) ;
18+ const { TEST_TIMEOUT_MS , authenticate, config } = require ( './testHelpers' ) ;
2019
2120const {
2221 signerClientId,
@@ -51,8 +50,8 @@ describe ('EnvelopesApi tests:', function() {
5150 this . timeout ( TEST_TIMEOUT_MS ) ;
5251
5352 const envelopeArgs = {
54- signerEmail : settings . signerEmail ,
55- signerName : settings . signerName ,
53+ signerEmail : config . signerEmail ,
54+ signerName : config . signerName ,
5655 signerClientId : signerClientId ,
5756 dsReturnUrl : returnUrl ,
5857 dsPingUrl : pingUrl ,
@@ -75,8 +74,8 @@ describe ('EnvelopesApi tests:', function() {
7574 this . timeout ( TEST_TIMEOUT_MS ) ;
7675
7776 const envelopeArgs = {
78- signerEmail : settings . signerEmail ,
79- signerName : settings . signerName ,
77+ signerEmail : config . signerEmail ,
78+ signerName : config . signerName ,
8079 signerClientId : signerClientId ,
8180 dsReturnUrl : returnUrl ,
8281 dsPingUrl : pingUrl ,
@@ -96,8 +95,8 @@ describe ('EnvelopesApi tests:', function() {
9695 recipients : {
9796 signers : [
9897 {
99- email : settings . signerEmail ,
100- name : settings . signerName ,
98+ email : config . signerEmail ,
99+ name : config . signerName ,
101100 clientUserId : signerClientId ,
102101 recipientId : '1' ,
103102 tabs : {
@@ -126,8 +125,8 @@ describe ('EnvelopesApi tests:', function() {
126125 this . timeout ( TEST_TIMEOUT_MS ) ;
127126
128127 const envelopeArgs = {
129- signerEmail : settings . signerEmail ,
130- signerName : settings . signerName ,
128+ signerEmail : config . signerEmail ,
129+ signerName : config . signerName ,
131130 signerClientId : signerClientId ,
132131 dsReturnUrl : returnUrl ,
133132 dsPingUrl : pingUrl ,
@@ -136,8 +135,8 @@ describe ('EnvelopesApi tests:', function() {
136135 const expected = {
137136 returnUrl : `${ returnUrl } ?state=123` ,
138137 authenticationMethod : 'none' ,
139- email : settings . signerEmail ,
140- userName : settings . signerName ,
138+ email : config . signerEmail ,
139+ userName : config . signerName ,
141140 clientUserId : signerClientId ,
142141 pingFrequency : 600 ,
143142 pingUrl : pingUrl
@@ -153,8 +152,8 @@ describe ('EnvelopesApi tests:', function() {
153152 this . timeout ( TEST_TIMEOUT_MS ) ;
154153
155154 const envelopeArgs = {
156- signerEmail : settings . signerEmail ,
157- signerName : settings . signerName ,
155+ signerEmail : config . signerEmail ,
156+ signerName : config . signerName ,
158157 ccEmail : CC_EMAIL ,
159158 ccName : CC_NAME ,
160159 status : 'sent' ,
@@ -188,8 +187,8 @@ describe ('EnvelopesApi tests:', function() {
188187 <h2 style="font-family: 'Trebuchet MS', Helvetica, sans-serif;
189188 margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
190189 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>
193192 <p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ CC_NAME } , ${ CC_EMAIL } </p>
194193 <p style="margin-top:3em;">
195194 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() {
201200 ` ;
202201
203202 const envelopeArgs = {
204- signerEmail : settings . signerEmail ,
205- signerName : settings . signerName ,
203+ signerEmail : config . signerEmail ,
204+ signerName : config . signerName ,
206205 ccEmail : CC_EMAIL ,
207206 ccName : CC_NAME ,
208207 status : 'sent' ,
@@ -235,8 +234,8 @@ describe ('EnvelopesApi tests:', function() {
235234 recipients : {
236235 signers : [
237236 {
238- email : settings . signerEmail ,
239- name : settings . signerName ,
237+ email : config . signerEmail ,
238+ name : config . signerName ,
240239 recipientId : '1' ,
241240 routingOrder : '1' ,
242241 tabs : {
@@ -279,8 +278,8 @@ describe ('EnvelopesApi tests:', function() {
279278 this . timeout ( TEST_TIMEOUT_MS ) ;
280279
281280 const envelopeArgs = {
282- signerEmail : settings . signerEmail ,
283- signerName : settings . signerName ,
281+ signerEmail : config . signerEmail ,
282+ signerName : config . signerName ,
284283 ccEmail : CC_EMAIL ,
285284 ccName : CC_NAME ,
286285 } ;
@@ -297,8 +296,8 @@ describe ('EnvelopesApi tests:', function() {
297296 <h2 style="font-family: 'Trebuchet MS', Helvetica, sans-serif;
298297 margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
299298 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>
302301 <p style="margin-top:0em; margin-bottom:0em;">Copy to: ${ CC_NAME } , ${ CC_EMAIL } </p>
303302 <p style="margin-top:3em;">
304303 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() {
312311 const document = await document1 ( envelopeArgs ) ;
313312
314313 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 ) ;
317316 expect ( document ) . to . contain ( CC_EMAIL ) ;
318317 expect ( document ) . to . contain ( CC_NAME ) ;
319318 expect ( document ) . to . be . equal ( expected ) ;
0 commit comments