CSR-762 Fix stash conflicts
This commit is contained in:
parent
ce5727a750
commit
4d90df5f76
3 changed files with 48 additions and 1 deletions
|
|
@ -471,6 +471,26 @@ describe.skip("baseInputButton.vue", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("integration testing", () => {
|
||||
describe("checkbox", () => {
|
||||
test.only("click on both => both are selected", async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupBaseInputButtonWrapper({
|
||||
isMultiSelect: true
|
||||
})
|
||||
// console.log(wrapper.html())
|
||||
|
||||
// Act
|
||||
const buttonWrappers = wrapper.findAllComponents({name: "baseInputButtonWrapper"})
|
||||
console.log(buttonWrappers[0].find("input"))
|
||||
await buttonWrappers[0].find("input").trigger("mousedown.left")
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.value).toEqual(["value1"])
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
function setupMocks({ mockData = {}, shouldShallowMount = true }) {
|
||||
|
|
@ -510,6 +530,19 @@ function setupMocks({ mockData = {}, shouldShallowMount = true }) {
|
|||
}
|
||||
|
||||
function setupBaseInputButtonWrapper({ mockData = {} }) {
|
||||
const originalData = baseInputButton.data();
|
||||
baseInputButton.data = () => {
|
||||
return {
|
||||
...originalData,
|
||||
$route: {
|
||||
query: {
|
||||
fmgPage: "myPage"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
baseInputButton.methods.pushClickEventToGA = jest.fn();
|
||||
|
||||
const baseInputButtonWrapper = {
|
||||
components: { baseInputButton },
|
||||
template:
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleEventAction(eventType, e) {
|
||||
console.log("AHHHHHH")
|
||||
if (this.isMultiSelect) {
|
||||
switch (eventType) {
|
||||
case this.eventTypes.ENTER:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||
|
||||
export default {
|
||||
model: {
|
||||
prop: "modelValue",
|
||||
event: "change",
|
||||
},
|
||||
props: {
|
||||
...inputButtonProps,
|
||||
buttonLabel: [Number, String],
|
||||
|
|
@ -14,6 +18,7 @@ export default {
|
|||
screenReaderOnlyText: String,
|
||||
isWide: Boolean,
|
||||
},
|
||||
<<<<<<< Updated upstream
|
||||
computed: {
|
||||
selectedValue: {
|
||||
get() {
|
||||
|
|
@ -23,9 +28,17 @@ export default {
|
|||
if (this.preHandleAnswerChange) {
|
||||
this.preHandleAnswerChange(e);
|
||||
}
|
||||
=======
|
||||
methods: {
|
||||
handleAnswerChange(e) {
|
||||
console.log("HANDLING IT")
|
||||
if (this.preHandleAnswerChange) {
|
||||
this.preHandleAnswerChange(e);
|
||||
}
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
this.$emit("update:modelValue", e);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue