CSR-762 WIP

This commit is contained in:
Katie 2022-10-05 14:58:55 -04:00
parent fe9602200c
commit 7cdb291641
3 changed files with 19 additions and 9 deletions

View file

@ -249,8 +249,16 @@ describe("baseInputButton.vue", () => {
describe("handleEventAction", () => {});
describe("handleSelectionChange", () => {
test.todo("handleChange is called with valueToEmit")
describe("checkbox", () => {
test.todo("modelValue is null => inputButtonClicked is emitted with correct")
test.todo("modelValue is null => valueToEmit is correct value")
test.todo("modelValue is undefined => valueToEmit is correct value")
test.todo("modelValue is empty => valueToEmit is correct value")
test.todo("modelValue is not empty and does not contain this button's value => valueToEmit is correct value")
test.todo("modelValue is not empty and does contain this button's value => valueToEmit is correct value")
})
describe("radio", () => {

View file

@ -97,7 +97,7 @@ export default {
}
} else {
switch (eventType) {
case eventTypes.CLICK:
case eventTypes.CLICK: // TODO KO pushClickEventToGa?
case eventTypes.ENTER:
case eventTypes.SPACE:
this.handleClick(e);
@ -141,13 +141,13 @@ export default {
handleClick(e) {
this.handleSelectionChange(e);
// console.log("addEventToBus: ", this.value?.toString())
// eventBus.addEventToBus("GA", "click", {
// category: this.$route.query[queryStrings.FMG_PAGE],
// action: this.GaActions.CLICKED,
// label: this.value?.toString(),
// pushToLogApp: true,
// valueToLogType: this.valueToLogType,
// });
eventBus.addEventToBus("GA", "click", {
category: this.$route.query[queryStrings.FMG_PAGE],
action: this.GaActions.CLICKED,
label: this.value?.toString(),
pushToLogApp: true,
valueToLogType: this.valueToLogType,
});
this.$emit("inputButtonClicked", this.valueToEmit);
},
// pushClickEventToGA(value) {

View file

@ -262,11 +262,13 @@ export default {
}
},
handleFocus(e) {
console.log("B")
this.$root.handleInputFocus({
groupName: this.groupName,
});
},
handleBlur(e) {
console.log("A")
this.$root.handleInputBlur({
groupName: this.groupName,
onFocusCallback: this.onFocusCallbackForRoot,