GithubHelp home page GithubHelp logo

computer-database-challenge's Introduction

computer-database-challenge

interview challenge for a company

Prerequisites

have node.js installed

Installation

run npm install

Running the test

run npm run test

Debugging

run npm run open

Findings:

I have decided to create tests increasing their complexity until I find a bug, so it took me 4.

First test: adding a computer with only the name

For adding a computer with only the name, the expected result is the alert validation that it was created checking the name is displayed. I used a function to create random values for the name.

Second test: adding a computer with all the data

For the second one, the expected result is that the alert contains the name. I created a function to create date variables for today and next year.

Third test: searching for an already existent computer

I selected Compaq (because there is only one value). The expected Result is that the table displays at least one value with Compaq

Fourth test: adding a computer with all the data and searching for it

The fourth one is a combination of all the previous test in only one, and the expected result is that the table displays the recently created computer. The recently created computer is not existant in the table, so that should be a bug.

Manualy reproduction:

Prerequisites:

1- valid string for the name. 2- Introduced date with format: yyyy-MM-dd. 3- Discontinued date with format: yyyy-MM-dd and after the introduced date.

Steps:

1- navigate to https://computer-database.gatling.io/computers 2- click 'add a new computer' button 3- complete the form with all valid data (name: string, introduced: Date ('yyyy-MM-dd'), Discontinued Date ('yyyy-MM-dd'), Company: select value) and click 'Create this computer' 4- validate the name of the computer is displayed on the alert banner 5- enter the name of the computer in the search field and click the 'Filter by name' button.

Expected result:

The table displays the name of the computer with all the data entered

Actual result:

The table is empty.

Notes:

  • Another evidence is that the number of computers does not increase when you create a new computer.
  • I have found an issue when opening the console, that there is a 404 error, Failed to load resource: the server responded with a status of 404 (Not Found), but I don't know what is the missing resource, this is when I open the console for the first time. I don't think is related to the bug I found.

About the structure:

I ended up using something similar to page object modal and cucumber. Any questions regarding the structure, you can find information in this medium playlist I created a while back: https://maugap.medium.com/list/cypress-for-dummies-01c3e8dca287

computer-database-challenge's People

Contributors

maugap avatar

Watchers

 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.