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 salesforceWebchat from "./salesforce-webchat.vue";
|
||||
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 { applicationConfig } from "../../constants/application-config";
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ describe("salesforceWebchat.vue", () => {
|
|||
|
||||
applicationConfig.CURRENT_ENVIRONMENT = "QA";
|
||||
wrapper = shallowMount(salesforceWebchat);
|
||||
const mockQa = jest.spyOn(qaHelper, "initializeSalesforceWebchatForSys");
|
||||
const mockQa = jest.spyOn(sysHelper, "initializeSalesforceWebchatForSys");
|
||||
wrapper.vm.initializeSalesforceWebchat();
|
||||
expect(mockQa).toHaveBeenCalled();
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
// Supporting files
|
||||
import { initializeSalesforceWebchatForDev } from "./salesforce-helper-dev";
|
||||
import { initializeSalesforceWebchatForQa } from "./salesforce-helper-qa";
|
||||
import { initializeSalesforceWebchatForSys } from "./salesforce-helper-sys";
|
||||
import { initializeSalesforceWebchatForProd } from "./salesforce-helper-prod";
|
||||
import { applicationConfig } from "@/constants/application-config";
|
||||
import { webchatHelper } from "@/helpers/webchat-helper";
|
||||
|
|
|
|||
|
|
@ -157,8 +157,7 @@ export default {
|
|||
});
|
||||
if (
|
||||
window.embeddedservice_bootstrap.utilAPI &&
|
||||
typeof window.embeddedservice_bootstrap.utilAPI.launchChat ===
|
||||
"function"
|
||||
typeof window.embeddedservice_bootstrap.utilAPI.launchChat === "function"
|
||||
) {
|
||||
window.embeddedservice_bootstrap.utilAPI.launchChat();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue