GithubHelp home page GithubHelp logo

jfairbank / course-cypress-intro-demo-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from testdouble/course-cypress-intro-demo-app

0.0 2.0 2.0 624 KB

Demo application to supplement Test Double's End-to-end Testing with Cypress intro video course

License: MIT License

HTML 2.50% JavaScript 40.05% CSS 0.10% Shell 0.38% Dockerfile 0.23% Ruby 56.74%

course-cypress-intro-demo-app's Introduction

Demo App for End-to-end Testing with Cypress Video Course

This app is a fictitious agile project management solution called yams (yet-another-management-solution). It is used for the follow along End-to-end Testing with Cypress video course.

This app has separate front-end and back-end portions contained in the yams and yams_api folders, respectively.

Running the Back-end

You can run the Ruby on Rails back-end API in one of two ways, either directly on your machine or through Docker. Regardless of your choice, the back-end will run at http://localhost:3001.

Using Docker (preferred)

Make sure you have the latest Docker installed on your machine. Then, follow these steps from your terminal.

$ cd yams_api
$ docker compose build
$ docker compose run --rm web bin/rails db:prepare
$ docker compose up

Running Dependencies Directly

Make sure you have Ruby 2.7.3 and PostgreSQL 13 installed. Then, follow these steps from your terminal.

$ cd yams_api
$ bundle install
$ bin/rails db:prepare
$ bin/rails s

Running the Front-end

You can run the React front-end with Node.js and npm.

We recommend using Node.js 16.3.0 to avoid any issues with building native dependencies, but you will likely be fine with the latest LTS version too.

Follow these steps to install dependencies with npm and start the front-end development server.

$ cd yams
$ npm install
$ npm start

Your default browser should open a new window at http://localhost:3000, and you should see the yams app UI. It should look something like this:

Example screenshot of app

Running Cypress Tests

After following along with the course and initializing cypress for the first time, use these steps to start up the testing environment and run tests.

  1. Start the back-end test environment from your terminal with Docker or Ruby depending on how you previously set up the back-end.

    Docker

    $ cd yams_api
    $ docker compose -f docker-compose.cypress.yml up
    

    Ruby

    $ cd yams_api
    $ bin/rake cypress:start
    
  2. In a separate terminal window/tab, start the front-end dev server.

    $ cd yams
    $ npm start
    
  3. In a separate terminal window/tab, start cypress.

    $ cd yams
    $ npx cypress open
    
  4. Once the cypress app opens, click a spec file to run from the list.

Code of Conduct

This project follows Test Double's code of conduct for all community interactions, including (but not limited to) one-on-one communications, public posts/comments, code reviews, pull requests, and GitHub issues. If violations occur, Test Double will take any action they deem appropriate for the infraction, up to and including blocking a user from the organization's repositories.

course-cypress-intro-demo-app's People

Contributors

jfairbank avatar

Watchers

 avatar  avatar

Forkers

lsparlin ssali01

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.