Coder Social home page Coder Social logo

"The <header> element with id='header' should always be at the top of the viewport" step failing when using Bootstrap class navbar-fixed-top about testable-projects-fcc HOT 3 CLOSED

freecodecamp avatar freecodecamp commented on August 12, 2024
"The
element with id='header' should always be at the top of the viewport" step failing when using Bootstrap class navbar-fixed-top

from testable-projects-fcc.

Comments (3)

Christian-Paul avatar Christian-Paul commented on August 12, 2024

@kev0587 Thanks for the detailed bug report!

While technically the old test was working properly (the header element in your project wasn't at the top of the viewport, though the nav element was), the test should definitely be changed to accommodate for how bootstrap and other libraries achieve this.

I don't want to check for library specific classes, since we'd have to take every popular library/version into consideration, and I'd rather verify that some element that's serving as a navbar is actually at the top rather than assuming the user implemented the library's class properly.

That being said, I think the best way to go about testing this is to obtain the positions of the header element and its children, and to use the element whose position is closest to the top for our test.

from testable-projects-fcc.

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

@Christian-Paul are you going to take this one on?

from testable-projects-fcc.

Christian-Paul avatar Christian-Paul commented on August 12, 2024

@no-stack-dub-sack Yup, working on it now

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.