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 }) {
|
function setupMocks({ mockData = {}, shouldShallowMount = true }) {
|
||||||
|
|
@ -510,6 +530,19 @@ function setupMocks({ mockData = {}, shouldShallowMount = true }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupBaseInputButtonWrapper({ mockData = {} }) {
|
function setupBaseInputButtonWrapper({ mockData = {} }) {
|
||||||
|
const originalData = baseInputButton.data();
|
||||||
|
baseInputButton.data = () => {
|
||||||
|
return {
|
||||||
|
...originalData,
|
||||||
|
$route: {
|
||||||
|
query: {
|
||||||
|
fmgPage: "myPage"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
baseInputButton.methods.pushClickEventToGA = jest.fn();
|
||||||
|
|
||||||
const baseInputButtonWrapper = {
|
const baseInputButtonWrapper = {
|
||||||
components: { baseInputButton },
|
components: { baseInputButton },
|
||||||
template:
|
template:
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleEventAction(eventType, e) {
|
handleEventAction(eventType, e) {
|
||||||
|
console.log("AHHHHHH")
|
||||||
if (this.isMultiSelect) {
|
if (this.isMultiSelect) {
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case this.eventTypes.ENTER:
|
case this.eventTypes.ENTER:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
model: {
|
||||||
|
prop: "modelValue",
|
||||||
|
event: "change",
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
...inputButtonProps,
|
...inputButtonProps,
|
||||||
buttonLabel: [Number, String],
|
buttonLabel: [Number, String],
|
||||||
|
|
@ -14,6 +18,7 @@ export default {
|
||||||
screenReaderOnlyText: String,
|
screenReaderOnlyText: String,
|
||||||
isWide: Boolean,
|
isWide: Boolean,
|
||||||
},
|
},
|
||||||
|
<<<<<<< Updated upstream
|
||||||
computed: {
|
computed: {
|
||||||
selectedValue: {
|
selectedValue: {
|
||||||
get() {
|
get() {
|
||||||
|
|
@ -23,9 +28,17 @@ export default {
|
||||||
if (this.preHandleAnswerChange) {
|
if (this.preHandleAnswerChange) {
|
||||||
this.preHandleAnswerChange(e);
|
this.preHandleAnswerChange(e);
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
methods: {
|
||||||
|
handleAnswerChange(e) {
|
||||||
|
console.log("HANDLING IT")
|
||||||
|
if (this.preHandleAnswerChange) {
|
||||||
|
this.preHandleAnswerChange(e);
|
||||||
|
}
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
|
||||||
this.$emit("update:modelValue", e);
|
this.$emit("update:modelValue", e);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
Loading…
Reference in a new issue