Formatting
This commit is contained in:
parent
61a83f4815
commit
26f20b8d5a
3 changed files with 20 additions and 23 deletions
|
|
@ -23,9 +23,7 @@ let cmsContent;
|
|||
|
||||
describe("Payment Method Question", () => {
|
||||
beforeEach(() => {
|
||||
cmsContent = {
|
||||
|
||||
};
|
||||
cmsContent = {};
|
||||
});
|
||||
|
||||
describe("Side image", () => {
|
||||
|
|
@ -33,45 +31,45 @@ describe("Payment Method Question", () => {
|
|||
// Arrange
|
||||
const props = generateDefaultProps();
|
||||
const { wrapper } = setupMocks({
|
||||
propsData: props
|
||||
propsData: props,
|
||||
});
|
||||
|
||||
|
||||
// Act
|
||||
const showSideImage = wrapper.vm.shouldDisplaySideImage;
|
||||
|
||||
|
||||
expect(showSideImage).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
it("Does not render side image if no image is present", () => {
|
||||
// Arrange
|
||||
let props = generateDefaultProps();
|
||||
|
||||
props.buttonImage = testConstants.images.NONE;
|
||||
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
propsData: props
|
||||
propsData: props,
|
||||
});
|
||||
|
||||
|
||||
// Act
|
||||
const showSideImage = wrapper.vm.shouldDisplaySideImage;
|
||||
|
||||
|
||||
expect(showSideImage).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
it("Does not render side image if inline", () => {
|
||||
// Arrange
|
||||
let props = generateDefaultProps();
|
||||
|
||||
props.buttonLabel = testConstants.content.withInline;
|
||||
props.altText = testConstants.content.withInline;
|
||||
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
propsData: props
|
||||
propsData: props,
|
||||
});
|
||||
|
||||
|
||||
// Act
|
||||
const showSideImage = wrapper.vm.shouldDisplaySideImage;
|
||||
|
||||
|
||||
expect(showSideImage).toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
v-bind="$props"
|
||||
buttonWrapperClasses="list-group base-input-button list-button rounded-3 d-flex flex-column w-100 mb-2"
|
||||
v-model="selectedValue">
|
||||
<div
|
||||
class="button-content list-button-content d-flex flex-row py-3 px-4">
|
||||
<div class="button-content list-button-content d-flex flex-row py-3 px-4">
|
||||
<img
|
||||
v-if="shouldDisplaySideImage"
|
||||
:id="buttonImageId"
|
||||
|
|
@ -121,4 +120,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const testConstants = {
|
|||
image: "imageB",
|
||||
subWidget: "subWidgetB",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ describe("Payment Method Question", () => {
|
|||
altText: testConstants.cms.answers.optionB.text,
|
||||
groupName: "payment-method",
|
||||
value: testConstants.cms.answers.optionB.name,
|
||||
buttonImage: testConstants.cms.answers.optionB.image
|
||||
}
|
||||
buttonImage: testConstants.cms.answers.optionB.image,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ describe("Payment Method Question", () => {
|
|||
|
||||
function generateDefaultProps() {
|
||||
return {
|
||||
modelValue: "modelValue"
|
||||
modelValue: "modelValue",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue