GithubHelp home page GithubHelp logo

testing-dom-button's Introduction

Study Notes

| JavaScript in the Browser | Simple Dev Server | DOM Testing | Jest Mocks |

Exercises

Working in pairs:

  1. Create a webpage that has:
  • A H1 tag
  • A H2 tag
  • A Header that contains a list of navigation items, styled to be horizontal across the top of the screen
  • A section which contains three paragraphs, each paragraph should correspond to an item on your header
  1. Create the following events on your webpage
  • If a user clicks on the h1 tag, the background should change colour, if they move their mouse out of the space the background should return to the original colour.
  • If a user hovers over a h2 tag replace the words inside it to contain a greeting
  • If someone types a letter whilst viewing the webpage a new paragraph should be created and that letter should be added to it.
  • If someone clicks on one of the navigation items the styling of the connecting paragraph should change to be more bold and be a larger font size. If they click again on the same navigation item, the paragraph should revert to original styling.
  1. Testing
  • Take a look at the test suite in the demo code
  • Try adding some Jest tests for the existing features in your webpage
  • Add test(s) for a feature that you have not yet implemented - maybe an easter egg!
  • Use your new test(s) to help you add the new feature

testing-dom-button's People

Watchers

Sidar Ozbek avatar

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.