start of unit test for navigation

This commit is contained in:
Katie Kroell 2024-02-01 14:02:20 -05:00
parent bb31f47fe8
commit cb246a9055

View file

@ -9,7 +9,7 @@ import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
import { mount } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing';
import bailoutMessage from '@/constants/bailoutMessage';
// import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
jest.mock('@/helpers/layout-helper.js', () => jest.fn());
@ -351,19 +351,23 @@ describe('TPAConfirmation.vue', () => {
);
});
});
// TODO: Add tests for forward navigation to carrier URL - card SSR-1107
describe('Navigation', () => {
// test('Forward button action, navigate forward with CLICKED_FORWARD scenario', () => {
// // Arrange
// const { wrapper } = getMountedComponent({});
test.only('Forward button action, navigate forward with CLICKED_FORWARD scenario', () => {
// Arrange
const initialStore = {
issConfig: {
successReturnURL: 'testURL'
}
};
const { wrapper } = getMountedComponent(initialStore);
// // Act
// wrapper.vm.forwardButtonAction();
// Act
wrapper.vm.forwardButtonAction();
// // Assert
// expect(wrapper.vm.$router.navigate)
// .toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD);
// });
// Assert
expect(wrapper.vm.navigateForward)
.toHaveBeenCalled();
});
});
});
});