Code Monkey home page Code Monkey logo

Comments (7)

percyhanna avatar percyhanna commented on June 20, 2024

rquery supports class and attribute selectors, as well as union (a, b), descendent (a b), and child (a > b) syntax.

If these aren't working for you then there's potentially something else going on. As noted in #14, rquery doesn't currently support shallow rendering.

from rquery.

BlueVajra avatar BlueVajra commented on June 20, 2024

does rquery class selectors only allow one class? For instance, in my rquery test, I examine the component and see these props

props:
      { className: 'button disabled',
        onClick: [Object],
        children: [Object] }

when I try either of these I get true

expect($component.find('.button')).to.have.length(1);
expect($component.find('.disabled')).to.have.length(1);

yet when I try to use the following, I get false

expect($component.find('.button.disabled')).to.have.length(1);

I tried the union syntax you mentioned ('.button, .disabled'), but no luck there

from rquery.

percyhanna avatar percyhanna commented on June 20, 2024

Hmm, it should support chained class names. See test here.

from rquery.

BlueVajra avatar BlueVajra commented on June 20, 2024

ok, thanks... must be something weird going on... I will dig around and see what I can figure out.

from rquery.

percyhanna avatar percyhanna commented on June 20, 2024

Is className being passed to a composite component? If so, that might be the problem.

from rquery.

percyhanna avatar percyhanna commented on June 20, 2024

For example:

  • DOM component: <div className="my-class" />
  • Composite component: <MyComponent className="my-class" />

It could be that .my-class won't match className on a composite component, I don't think there's a test for that scenario.

from rquery.

percyhanna avatar percyhanna commented on June 20, 2024

Closing for now until more details are provided.

from rquery.

Related Issues (12)

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.