Git Product home page Git Product logo

Comments (5)

tannerdolby avatar tannerdolby commented on August 26, 2024 1

👋 @jackdomleo7 !

I'm happy to be assigned this issue as well if its still up for grabs.

from checka11y.css.

jackdomleo7 avatar jackdomleo7 commented on August 26, 2024 1

That would be really useful! Thanks @tannerdolby !

from checka11y.css.

tannerdolby avatar tannerdolby commented on August 26, 2024 1

I haven't got around to this yet, but here is a link for reference when I get started.

https://docs.cypress.io/guides/references/migration-guide

from checka11y.css.

jackdomleo7 avatar jackdomleo7 commented on August 26, 2024 1

Hi @tannerdolby, absolutely no worries (there is no time limit - except for the fact that a person will automatically be unassigned from an issue after 3 months of inactivity 🙂).

That is really interesting and really useful to know! I think based on this, then I agree, we should stick with Cypress because it seems to be the best tool for the job. Thank you.

from checka11y.css.

tannerdolby avatar tannerdolby commented on August 26, 2024

I apologize for the delay on this @jackdomleo7!

I got around to rewriting some of the tests in Jest, turns out the majority of the tests require ::after or ::before Pseudo element selectors which causes quite a big problem because jsdom doesnt support ::before and ::after to allow for getting the content property from a pseudo element. Recreating the browser environment works but if the selectors require grabbing ::before or ::after and specifically content then converting to Jest might require some major workaround as the bulk of tests are asserting against the content property of pseudo elements.

Note: I also tried using Cheerio after reading the test/index.html file but cheerio doesn't support pseudo elements either.

In plain js we can grab the content property using window and getComputedStyle() like this:

const el = document.querySelector(".some-node");
console.log(window.getComputedStyle(el, ":after").content); // the value of content property
console.log(window.getComputedStyle(el, ":after").getPropertyValue("content"); // ditto

This issue of selecting pseudo elements is solved for us when using Cypress as they have the really helpful .after("prop_name") method. This discussion might convince us to just stay with Cypress instead of converting to Jest like we discussed in #117. Let me know your thoughts.

from checka11y.css.

Related Issues (20)

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.