Coder Social home page Coder Social logo

Comments (8)

guygolanIL avatar guygolanIL commented on July 19, 2024 1

Sorry no.
Im desperately searching for a webComponent testing lib to integrate with our mocha setup with no avail

from showroom.

guygolanIL avatar guygolanIL commented on July 19, 2024

I wonder if you solved your issue.

from showroom.

prateekjadhwani avatar prateekjadhwani commented on July 19, 2024

Nope, sorry.
If you have any suggestions, i would love to hear them.

from showroom.

prateekjadhwani avatar prateekjadhwani commented on July 19, 2024

Lol... same
I totally understand your pain.
I have been searching for months.

from showroom.

eavichay avatar eavichay commented on July 19, 2024

@prateekjadhwani
your component does not have static get observedAttributes and therefore does not reacts to changes in the attribute.

Could you try again?

also, anything related to DOM should not be reached from the constructor (unless there is a shadow root).

You can try reproducing this without the test runner, just start showroom and browse to localhost:3000

from showroom.

eavichay avatar eavichay commented on July 19, 2024

@prateekjadhwani Did that work for you?

from showroom.

prateekjadhwani avatar prateekjadhwani commented on July 19, 2024

Sorry @eavichay I havent tried it. I will give it a try this weekend.
Are there more examples in the documentation that I can reference? As in for complex and nested components?

from showroom.

eavichay avatar eavichay commented on July 19, 2024

@prateekjadhwani

in your showroom file /.showroom/my-component.showroom.js add to the default export outerHTML property with anything you want.

for example:

<div>
<my-component>
<my-nested-component></my-nested-component>
</my-component>
</div>```

Showroom will identify your component within the markup and attach listeners/commands to it. The nested component, however will not be part of the scenario. You can add custom methods to interact with it if required.

from showroom.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.