Skip to content

veydecapia/cypress-exercise

Repository files navigation

About The Project

Project contains Automated Test written in TypeScript/JavaScript using Cypress as an open source automation testing framework. My task is to automate testing of way2automation site, covering some of the scenarios with the steps provided.

(back to top)

Built With

(back to top)

Getting Started

To get automated test in your local copy up and running follow these simple example steps.

Prerequisites

To publish and install packages to and from the public npm registry or a private npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer.

Note: to download the latest version of npm, on the command line, run the following command:

npm install -g npm

Please refer to the following

Installation

  1. Clone the repo

    git clone https://github.com/veydecapia/cypress-exercise.git
  2. Install NPM packages. This downloads dependencies defined in a package.json file and generates a node_modules folder with the installed modules.

    npm install

    It would install first the required npm packages.

(back to top)

Usage

  1. To run the created Automated test. Open cypress

    npx cypress open

    This will open the Cypress test runner.
    Click search-course.spec.ts to open and run the whole test suite.

    image


  2. After the test is complete.
    Note: 20 test cases should passed.

    Latest Test Result

    e2e_way2automation

  3. You can view the generated json file under fixtures folder.

    cypress > fixtures > actions.json

    Expected json file to be generated

    image

  4. You can view the generated full page screenshot under screenshots folder.

    cypress > screenshots > specs > search-course.spec.ts

    Expected Full Screenshot

    checkout-page

Steps/Test Cases

Automation exercise using Cypress which covers the below provided steps.

  1. Navigate to the web page
  2. List each of the action name for each categories in JSON format i.e. { interaction: ['draggable',...], widget: ['accordion', ...] }
  3. Get the associated link of the action "Submit Button Clicked" from the category "Dynamic Elements"
  4. Visit the retrieved link
  5. Fill up the dummy registration form by using an email from getnada.com >> Do I need to click the submit button?
  6. Click on the link "EXPLORE LIFETIME MEMBERSHIP"
  7. Scroll to "20+ Courses video library FREE ACCESS"
  8. Navigate to "Automation Architect Selenium with 7 live projects" from the carousel by clicking on the left arrow button
  9. Click on the "Get Started" button
  10. Assert the url page to be equals to "https://www.selenium-tutorial.com/p/automation-architect-in-selenium-7-live-projects"
  11. Search for the course "CucumberParallelWithPageObjects - Project Code"
  12. Click "Start" button
  13. Wait for the page to load and navigate back to url "https://www.selenium-tutorial.com/p/automation-architect-in-selenium-7-live-projects"
  14. Select "Pay in British Pounds"
  15. Assert the value is equals to "£15"
  16. Click on "Enroll in Course"
  17. Assert that the button is changed from "Enroll in Course" to "Processing..."
  18. Assert the page loaded contains "Order Summary"
  19. Click on each of the input boxes
  20. Verify when navigating away on each boxes, an error field will be displayed
  21. Screenshot the entire page.

Other Projects

Please also view and check my Automated browser end to end UI test built using Protractor.

TodoMVC https://github.com/veydecapia/todomvc-exercise

Contact

Your Name - [email protected]

Project Link: https://github.com/veydecapia/cypress-exercise.git

(back to top)

About

My Cypress Automation Exercise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published