Skip to content

Commit

Permalink
Fix div test for gateway management mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
npsp-reedestockton committed Nov 14, 2022
1 parent bc8016f commit 586c25c
Showing 1 changed file with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@ const SELECTED_GATEWAY_ID = "Non-default Gateway Id";
const DEFAULT_GATEWAY_ID = "Default Gateway Id";
const DEFAULT_TEMPLATE_ID = "Default Template Id";

jest.mock(
"@salesforce/apex/GE_GiftEntryController.encryptGatewayId",
() => {
return { default: jest.fn() };
},
{ virtual: true }
);

jest.mock(
"@salesforce/apex/GE_GiftEntryController.decryptGatewayId",
() => {
return { default: jest.fn() };
},
{ virtual: true }
);

jest.mock(
"@salesforce/apex/GE_GiftEntryController.getGatewayAssignmentSettings",
() => {
Expand Down Expand Up @@ -228,7 +212,7 @@ describe("c-ge-gateway-select-widget", () => {

it("renders widget contents when not default template", async () => {
GeGatewaySettings.setElevateSettings(null, SELECTED_GATEWAY_ID);
const element = createGeGatewaySelectWidget(PAYMENT_METHOD_MODE);
const element = createGeGatewaySelectWidget(GATEWAY_MANAGEMENT_MODE);
document.body.appendChild(element);
await flushPromises();

Expand All @@ -238,12 +222,12 @@ describe("c-ge-gateway-select-widget", () => {

it("renders widget contents when default template", async () => {
GeGatewaySettings.setElevateSettings(null, DEFAULT_TEMPLATE_ID);
const element = createGeGatewaySelectWidget(PAYMENT_METHOD_MODE);
const element = createGeGatewaySelectWidget(GATEWAY_MANAGEMENT_MODE);
document.body.appendChild(element);
await flushPromises();

expect(element).toBeTruthy();
expect(getDiv(element)).toBeFalsy();
expect(getDiv(element)).toBeTruthy();
});

it("does not display spinner if no gateways found", async () => {
Expand Down

0 comments on commit 586c25c

Please sign in to comment.