benigodoi / sudoku-app-base

Example Sudoku React application used for "Testing for Good" Cypress workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sudoku-app-base CI cypress version

Example Sudoku React application used for "Testing for Good" Cypress workshop

Testing for Good workshop

The example application is used during my Cypress v10 Fundamentals free course.

Original Sudoku game copied from https://github.com/raravi/sudoku and you can play it at https://sudoku-raravi.vercel.app/.

Sudoku application running locally

Requirements

You need Node v14+ installed on your local machine. You can check by running:

$ node -v
v16.14.0
$ npm -v
8.11.0

Clone the repository to your local machine and install its dependencies

$ git clone git@github.com:bahmutov/sudoku-app-base.git
$ cd sudoku-app-base
$ npm install

Check the application starts, and verify the application works at the URL localhost:3000

$ npm start
$ open localhost:3000

Check if Cypress opens

$ npx cypress open

If you see the dialog below, you are good to go!

Cypress opens

Topics

This workshop "End-to-End & Component Testing Using Cypress" covers the following topics:

  • installing Cypress and setting up a testing project
  • writing your first full end-to-end test
    • the loads spec
    • the modes spec
    • the hint spec
  • controlling the time in your application to make the tests fast
    • the timer spec
  • writing your first React component test
    • pick the testing framework
    • write the Timer component spec
    • numbers component spec
    • difficulty component spec
    • overlay component spec with network stubbing
    • status section component test with screenshots
    • the Game component vs play E2E test
    • https://slides.com/bahmutov/the-fuzzy-line
  • running Cypress tests on CI using GitHub Actions
  • https://slides.com/bahmutov/test-components-without-fear

The workshop should take 2-3 hours following the instructor's lead.

Small print

Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2022

License: MIT - do anything with the code, but don't blame me if it does not work.

Support: if you find any problems with this module, email / tweet / open issue on Github

About

Example Sudoku React application used for "Testing for Good" Cypress workshop

License:MIT License


Languages

Language:JavaScript 84.2%Language:CSS 13.9%Language:HTML 1.9%Language:Shell 0.0%