Add Test for Afterpay alert

This commit is contained in:
Bill Richardson 2024-03-13 14:01:05 -04:00
parent 1371f9856b
commit 3c6740e665

View file

@ -468,4 +468,21 @@ describe('payment-page.vue', () => {
expect(creditCardErrorAlert.isVisible()).toBeTruthy();
});
});
describe('AfterPay Error Alert', () => {
test('show after pay error alert', () => {
// Arrange
const queryString = {
[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT]: paymentMethods.AFTERPAY
};
const wrapper = setupMocks({ queryString });
// Act
// Assert
const afterPayErrorAlert = wrapper.find('[name="payInAdvanceAfterPayErrorAlert"]');
expect(afterPayErrorAlert.exists()).toBeTruthy();
expect(afterPayErrorAlert.isVisible()).toBeTruthy();
});
});
});