diff --git a/addon/services/liveagent.js b/addon/services/liveagent.js index 4f7f4f86..e89ab1f8 100644 --- a/addon/services/liveagent.js +++ b/addon/services/liveagent.js @@ -73,8 +73,8 @@ export default class LiveAgentService extends Service { svc.settings.storageDomain = domain; } - svc.snippetSettingsFile.extraPrechatFormDetails = extraPrechatFormDetails; - svc.snippetSettingsFile.extraPrechatInfo = extraPrechatInfo; + svc.settings.extraPrechatFormDetails = extraPrechatFormDetails; + svc.settings.extraPrechatInfo = extraPrechatInfo; svc.init( salesforceURL, diff --git a/tests/unit/services/liveagent-test.js b/tests/unit/services/liveagent-test.js index 14907e29..e2de0f50 100644 --- a/tests/unit/services/liveagent-test.js +++ b/tests/unit/services/liveagent-test.js @@ -13,11 +13,10 @@ module('Unit | Service | liveagent', function (hooks) { hooks.afterEach(clear); test('it boots', function (assert) { - assert.expect(9); + assert.expect(8); window.embedded_svc = { settings: {}, - snippetSettingsFile: {}, init() { assert.strictEqual(arguments.length, 6); assert.strictEqual(arguments[0], 'test://salesforceURL'); @@ -48,20 +47,16 @@ module('Unit | Service | liveagent', function (hooks) { loadingText: 'Loading', offlineSupportMinimizedText: 'Contact Us', prepopulatedPrechatFields: {}, - }); - - assert.deepEqual(window.embedded_svc.snippetSettingsFile, { extraPrechatFormDetails: [], extraPrechatInfo: [], }); }); test('it boots with custom options', function (assert) { - assert.expect(9); + assert.expect(8); window.embedded_svc = { settings: {}, - snippetSettingsFile: {}, init() { assert.strictEqual(arguments.length, 6); assert.strictEqual(arguments[0], 'test://salesforceURL'); @@ -109,20 +104,16 @@ module('Unit | Service | liveagent', function (hooks) { field: 'custom://prepopulatedPrechatFields', }, storageDomain: 'custom://domain', - }); - - assert.deepEqual(window.embedded_svc.snippetSettingsFile, { extraPrechatFormDetails: ['custom://extraPrechatFormDetails'], extraPrechatInfo: ['custom://extraPrechatInfo'], }); }); test('it does not boot in FastBoot', function (assert) { - assert.expect(2); + assert.expect(1); window.embedded_svc = { settings: {}, - snippetSettingsFile: {}, init() { assert.ok(false); }, @@ -134,6 +125,5 @@ module('Unit | Service | liveagent', function (hooks) { service.boot(); assert.deepEqual(window.embedded_svc.settings, {}); - assert.deepEqual(window.embedded_svc.snippetSettingsFile, {}); }); });