Merge pull request #886 from Safelite/feature/richardson/SSR-1709
Commit for draft comparison
This commit is contained in:
commit
6ef4087b8f
2 changed files with 10 additions and 12 deletions
|
|
@ -16,7 +16,8 @@ import coverageType from '@/constants/coverage-type';
|
|||
|
||||
// Mock so it can be used as an assertion
|
||||
jest.mock('@/helpers/order-helper.js', () => ({
|
||||
submitWorkOrder: jest.fn()
|
||||
submitWorkOrder: jest.fn(),
|
||||
saveSession: jest.fn()
|
||||
}));
|
||||
|
||||
function setupMocks({ customMountOptions = {}, queryString }, mainInitialState = {}, customMixin = null) {
|
||||
|
|
@ -319,14 +320,8 @@ describe('payment-method.vue', () => {
|
|||
describe('forwardButtonAction', () => {
|
||||
test('Pay at the time of service is selected, should call saveWorkOrder', async () => {
|
||||
// Arrange
|
||||
const store = {
|
||||
order: {
|
||||
payment: {
|
||||
paymentMethod: paymentMethods.PAY_AT_TIME_OF_SERVICE
|
||||
}
|
||||
}
|
||||
};
|
||||
const wrapper = setupMocks({}, store);
|
||||
const wrapper = setupMocks({});
|
||||
wrapper.vm.paymentMethod = paymentMethods.PAY_AT_TIME_OF_SERVICE;
|
||||
|
||||
// Act
|
||||
await wrapper.vm.forwardButtonAction();
|
||||
|
|
|
|||
|
|
@ -127,12 +127,13 @@ export default {
|
|||
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
vm.initializeComponent();
|
||||
vm.updateFooterButtonText(vm.customCallToActionButtonCopy);
|
||||
});
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
paymentMethod: this.getPaymentMethodFromStore(),
|
||||
paymentMethod: null,
|
||||
widget: {
|
||||
paymentMethod: 'PaymentMethodWidget',
|
||||
paymentMethodApplePay: 'PaymentMethodWidgetApplePay'
|
||||
|
|
@ -251,8 +252,10 @@ export default {
|
|||
&& serviceLocationReqs
|
||||
&& scheduleReqs
|
||||
&& customerReqs
|
||||
&& contactInfoReqs
|
||||
);
|
||||
&& contactInfoReqs);
|
||||
},
|
||||
initializeComponent() {
|
||||
this.paymentMethod = this.getPaymentMethodFromStore();
|
||||
},
|
||||
getPaymentMethodFromStore() {
|
||||
if (this.isPayInAdvanceDisabled) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue