Coder Social home page Coder Social logo

Comments (5)

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024

@christophherr that really is unexpected, I had been under the impression that innerText would target the text content of the inner most node. Very strange. Looking into alternatives

from testable-projects-fcc.

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024

And yeah, to your other point, I have to admit I never once even came close to thinking about that in designing these tests

Not sure what the best thing to do about it is though. I have to think on that one

from testable-projects-fcc.

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024

Ok, so both tests 3 and 4 were failing for me when I made this change to my project, and I figured out why. In mine at least, the problem has to do with react and how babel compiles a <p> element vs. a <span> - I THINK (but not totally sure). Ultimately, I believe a span is kept inline, while a <p> ends up on a new line, and innerText was picking up these newline characters, i.e. \n. So in the end, I just added a regex, which eliminates any white space, so that all we will get is the text content itself. This fixed it on my project, but again, this is React and not sure what you're using. I'm pushing the changes in a few, and feel free to use the DEV cdn to see if the changes fixed it on your end.

Thanks!

from testable-projects-fcc.

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024

@christophherr Ok, the changes should be live in a few minutes on the DEV cdn and a few hours on the PROD cdn - can you check and let me know if this fixes the issue on your end and if not re-open?

from testable-projects-fcc.

christophherr avatar christophherr commented on August 12, 2024

@no-stack-dub-sack
Thank you!
The test is passing with p tags now. (using vanilla JS)

Regarding the keyboard layout, QWERTY is by far the most common.
Iยดm not sure if a change would be necessary or even more confusing.
(Looks like ert - dfg - cvb should be the same for QWERTY, QWERTZ, AZERTY and QZERTY.)

from testable-projects-fcc.

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.