Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug introduced from 1.1.4 and later #1845

Copy link
Copy link
Closed
@ravjsdev

Description

@ravjsdev
Issue body actions

Subject of the issue

My unit tests suddenly started breaking from 1.1.4 and later

Steps to reproduce

since updating to 1.1.4 (or greater) my unit tests are now breaking - I have a custom component (renderer) which renders form components (e.g. input, text area, checkbox etc) dynamically using a config provided via props. The component iterates through the config and renders the inputs (mapping them to appropriate vue components) - now in my test when i do the following:

...
const dynamicFormConfig = ['text-area', 'text-input'];

const options = merge({
    propsData: {
      dynamicFormConfig,
    },
    store,
    localVue,
  }, params.options);

textInput = mount(RendererComponent, options).findComponent({` name: 'MyTextInput' });

expect(textInput.exists()).toBe(true); 

i should get true, but now my tests fail with false.

Expected behaviour

I should get true from the test expectation but now im getting false. When i downgrade to 1.1.3 everything works fine and the tests pass.

Actual behaviour

The test now fails. (i.e. textInput.exist() returns false)

Possible Solution

Revert the breaking change introduced in 1.1.4 (Djaler:fix/find-functional-component)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.