From 6f8a380dd35e5ea872ef9fc9dd03ea2087eeca07 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 8 Nov 2022 10:29:36 -0500 Subject: [PATCH 1/3] Update props and clean up code. --- .../textbox-question/textbox-question.vue | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 197e67a63..67446a19f 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -4,7 +4,6 @@ :for="inputId" :aria-label="questionText" class="form-label" - :class="[questionAlignment ? 'mx-auto' : '']" v-html="labelText">
Date: Tue, 8 Nov 2022 11:00:08 -0500 Subject: [PATCH 2/3] Change copy. --- src/common-components/textbox-question/textbox-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 67446a19f..05d17dcd4 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -66,7 +66,7 @@ export default { validationRules: String, cmsWidgetName: String, maxLength: String, - questionAlignment: String, // Left or center. Default is left. + questionAlignment: String, // Left or center. Left is default. cornerStyle: String, // Rounded or square. Square is default. includeSearchIcon: Boolean, }, From 68c500bf72a60f4270528a5d8364fcc72207b40b Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 8 Nov 2022 11:49:04 -0500 Subject: [PATCH 3/3] Update unit test. --- .../textbox-question/textbox-question.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common-components/textbox-question/textbox-question.spec.js b/src/common-components/textbox-question/textbox-question.spec.js index e92ed342d..bfc65da16 100644 --- a/src/common-components/textbox-question/textbox-question.spec.js +++ b/src/common-components/textbox-question/textbox-question.spec.js @@ -53,7 +53,7 @@ describe("textboxQuestion.vue", () => { expect(paragraph.attributes("class")).toContain("rounded-pill"); }); - it.only("Should return text-center class", async () => { + it.only("Should return form-control class", async () => { // Act const wrapper = shallowMount(textboxQuestion, { global: { @@ -70,7 +70,7 @@ describe("textboxQuestion.vue", () => { // Assert const paragraph = wrapper.find("input"); - expect(paragraph.attributes("class")).toContain("text-center"); + expect(paragraph.attributes("class")).toContain("form-control"); }); it("Should render the 'questionText' data value as the label text when disableAutoFill is false.", async () => {