Merge pull request #889 from Safelite/feature/CSR-934
Removed 'disabledAutofill' prop from dropdown-question to match textb…
This commit is contained in:
commit
f377a113a9
3 changed files with 1 additions and 25 deletions
|
|
@ -48,29 +48,6 @@ describe("dropdownQuestion.vue", () => {
|
||||||
expect(label.text()).toContain(questionText);
|
expect(label.text()).toContain(questionText);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should render the 'questionText' data value with '⁠' after the first character of each word in the label text when disableAutoFill is true.", async () => {
|
|
||||||
// Arrange
|
|
||||||
const wrapper = shallowMount(dropdownQuestion, {
|
|
||||||
propsData: {
|
|
||||||
options: {},
|
|
||||||
disableAutoFill: true,
|
|
||||||
},
|
|
||||||
mixins: [mockMixin],
|
|
||||||
});
|
|
||||||
|
|
||||||
// Mock CMS content ...
|
|
||||||
// Trust me, the below instance of the string "Question Text" actually has the ⁠ in it. You just can't see it
|
|
||||||
// Don't believe me? Copy and paste it into Google. Then inspect the search field element in Dev Tools,
|
|
||||||
// you will see "Q⁠uestion T⁠ext"
|
|
||||||
const expectedQuestionText = "Question Text";
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const label = wrapper.find("label");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(label.text()).toContain(expectedQuestionText);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Should return input id as the id of the select field", async () => {
|
it("Should return input id as the id of the select field", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(dropdownQuestion, {
|
const wrapper = shallowMount(dropdownQuestion, {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ export default {
|
||||||
},
|
},
|
||||||
isDisabled: Boolean,
|
isDisabled: Boolean,
|
||||||
isRequired: Boolean,
|
isRequired: Boolean,
|
||||||
disableAutoFill: Boolean,
|
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
hasError: Boolean,
|
hasError: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ describe("address-questions.vue", () => {
|
||||||
expect(wrapper.vm.$loadScript).not.toHaveBeenCalled();
|
expect(wrapper.vm.$loadScript).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("address field is focused => disable autocomplete", async () => {
|
test("address field is focused => disable autofill", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
let focusEventCallbackFunction;
|
let focusEventCallbackFunction;
|
||||||
autocompleteElement.addEventListener = jest
|
autocompleteElement.addEventListener = jest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue