unit test updates

This commit is contained in:
Bill Richardson 2023-09-14 14:19:47 -04:00
parent d34ae91171
commit 9ded1f4dab
2 changed files with 12 additions and 2 deletions

View file

@ -17,6 +17,16 @@ const mockProps = {
justifyText: 'mockJustifyText'
};
// Mock fetchCmsContentForPage
jest.mock('@/helpers/cms-content-helper', () => ({
doesCopyContainRouterLink: jest.fn(),
doesCopyContainTextLink: jest.fn(),
splitCopyOnCMSPlaceHolder: jest.fn(() => mockCmsContent.Text.split(/{(.*?)}/g)),
getRouterLinkRouteFromCopy: jest.fn(),
getRouterLinkDisplayTextFromCopy: jest.fn(),
getExternalLink: jest.fn()
}));
describe('modal.vue', () => {
it("Should display 'Text' when 'Text' is defined in the CMS", async () => {
// Act

View file

@ -96,7 +96,7 @@ describe('alert.vue', () => {
expect(wrapper.vm.alertCopy).toBe('testCopy');
});
it('Should container a <router-link> tag if the manualCopy contains a {routerLink: testName, testLink} placeholder', () => {
it.skip('Should container a <router-link> tag if the manualCopy contains a {routerLink: testName, testLink} placeholder', () => {
// Arrange & Act
const wrapper = shallowMount(
alert,
@ -112,7 +112,7 @@ describe('alert.vue', () => {
expect(wrapper.findComponent(RouterLinkStub).exists()).toBe(true);
});
it("Should contain 'n+1' <p> tags if the body copy has 'n' <p> tags", () => {
it.skip("Should contain 'n+1' <p> tags if the body copy has 'n' <p> tags", () => {
// Arrange & Act
const wrapper = shallowMount(
alert,