CSR-563 | Mock out a mixin - added another alert test
This commit is contained in:
parent
36079109c7
commit
c094ff5f49
2 changed files with 18 additions and 0 deletions
|
|
@ -331,6 +331,11 @@ function setupMocks({
|
||||||
// lookupVin: jest.fn(() => Promise.resolve(lookupVinResponse)),
|
// lookupVin: jest.fn(() => Promise.resolve(lookupVinResponse)),
|
||||||
|
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
dynamicStrings() {
|
||||||
|
return {ROUTER_LINK: "routerLink:"}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// mountOptions.propsData = {
|
// mountOptions.propsData = {
|
||||||
// modelValue: modelValueProp,
|
// modelValue: modelValueProp,
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,19 @@ describe("alert.vue", () => {
|
||||||
expect(wrapper.find('router-link').exists()).toBe(true);
|
expect(wrapper.find('router-link').exists()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("Should contain 'n+1' <p> tags if the body copy has 'n' <p> tags", () =>{
|
||||||
|
// Arrange & Act
|
||||||
|
const wrapper = shallowMount(alert, setupMocks({
|
||||||
|
propsData: {
|
||||||
|
manualHeadline: 'testHeader',
|
||||||
|
manualCopy: '<p>testCopy with a {routerLink: testName, testLink} inside of it</p><p>and two paragraphs</p>'
|
||||||
|
},
|
||||||
|
stubs: ['router-link'],
|
||||||
|
}));
|
||||||
|
// Assert
|
||||||
|
expect(wrapper.findAll('p').length === 3).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
it("Should call scrollIntoView() when the clientBoundingRect is not entirely in the viewport (out of view top)", () => {
|
it("Should call scrollIntoView() when the clientBoundingRect is not entirely in the viewport (out of view top)", () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
var viewPortHeight = 200;
|
var viewPortHeight = 200;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue