Formatting and unit test fixes
This commit is contained in:
parent
a48c018e90
commit
fdaae873ef
3 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { shallowMount } from "@vue/test-utils";
|
import { shallowMount } from "@vue/test-utils";
|
||||||
import salesforceWebchat from "./salesforce-webchat.vue";
|
import salesforceWebchat from "./salesforce-webchat.vue";
|
||||||
import * as devHelper from "./salesforce-helper-dev";
|
import * as devHelper from "./salesforce-helper-dev";
|
||||||
import * as qaHelper from "./salesforce-helper-qa";
|
import * as sysHelper from "./salesforce-helper-sys";
|
||||||
import * as prodHelper from "./salesforce-helper-prod";
|
import * as prodHelper from "./salesforce-helper-prod";
|
||||||
import { applicationConfig } from "../../constants/application-config";
|
import { applicationConfig } from "../../constants/application-config";
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ describe("salesforceWebchat.vue", () => {
|
||||||
|
|
||||||
applicationConfig.CURRENT_ENVIRONMENT = "QA";
|
applicationConfig.CURRENT_ENVIRONMENT = "QA";
|
||||||
wrapper = shallowMount(salesforceWebchat);
|
wrapper = shallowMount(salesforceWebchat);
|
||||||
const mockQa = jest.spyOn(qaHelper, "initializeSalesforceWebchatForSys");
|
const mockQa = jest.spyOn(sysHelper, "initializeSalesforceWebchatForSys");
|
||||||
wrapper.vm.initializeSalesforceWebchat();
|
wrapper.vm.initializeSalesforceWebchat();
|
||||||
expect(mockQa).toHaveBeenCalled();
|
expect(mockQa).toHaveBeenCalled();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
||||||
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
||||||
|
import { initializeSalesforceWebchatForSys } from "./salesforce-helper-sys";
|
||||||
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
||||||
import { applicationConfig } from "@/constants/application-config";
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
import { webchatHelper } from "@/helpers/webchat-helper";
|
import { webchatHelper } from "@/helpers/webchat-helper";
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,7 @@ export default {
|
||||||
});
|
});
|
||||||
if (
|
if (
|
||||||
window.embeddedservice_bootstrap.utilAPI &&
|
window.embeddedservice_bootstrap.utilAPI &&
|
||||||
typeof window.embeddedservice_bootstrap.utilAPI.launchChat ===
|
typeof window.embeddedservice_bootstrap.utilAPI.launchChat === "function"
|
||||||
"function"
|
|
||||||
) {
|
) {
|
||||||
window.embeddedservice_bootstrap.utilAPI.launchChat();
|
window.embeddedservice_bootstrap.utilAPI.launchChat();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue