Skip to content

[ComponentTester] ref + innerhtml not working #91

@michaelw85

Description

@michaelw85

I'm submitting a bug report
ref and innerhtml not working when using the component tester.

  • ** Steps to reproduce **
  1. checkout repo: https://github.com/michaelw85/repo-aurelia-test-issue
  2. npm install
  3. au jest

au jest will result in an error for the ref issue.
the innerhtml issue is visible in the jest snapshot.

To verify the icons are actually functioning in a normal app use au run to open the dev-app.

  • Library Version:
    aurelia-testing: 1.0.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    v10.15.0

  • NPM Version:
    6.9.0
  • JSPM OR Webpack AND Version
    Plugin setup created with CLI, default TS configuration

  • Language:
    TS

Current behavior:
When using a ref binding it is undefined in a unit test when using the component tester.
TypeError: Cannot read property 'setAttribute' of undefined (setAttribute is performed on the elements being referenced)

innerhtml is not rendered, here's a jest snapshot:

<my-icon-inner
  au-target-id="2"
  class="au-target"
  name="angle-up"
>
  
  <!-- This SVG should have inner html with a use element -->
  <svg
    au-target-id="1"
    class="au-target"
    innerhtml.bind="use"
  />
  

</my-icon-inner>

Expected/desired behavior:
ref should work when using the component tester.
innerhtml binding should render when using component tester.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions