Skip to content

Commit

Permalink
API Call
Browse files Browse the repository at this point in the history
  • Loading branch information
ABS RAKIB committed Jul 12, 2024
1 parent fab435f commit bfa46f9
Show file tree
Hide file tree
Showing 14 changed files with 352 additions and 0 deletions.
115 changes: 115 additions & 0 deletions cypress/reports/.jsons/mochawesome_010.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"stats": {
"suites": 1,
"tests": 1,
"passes": 0,
"pending": 0,
"failures": 1,
"start": "2024-07-12T16:13:37.167Z",
"end": "2024-07-12T16:14:40.968Z",
"duration": 63801,
"testsRegistered": 1,
"passPercent": 0,
"pendingPercent": 0,
"other": 0,
"hasOther": false,
"skipped": 0,
"hasSkipped": false
},
"results": [
{
"uuid": "479472e7-4585-43cd-b782-232ec9509d80",
"title": "",
"fullFile": "cypress\\e2e\\place_order_while_checkout.cy.js",
"file": "cypress\\e2e\\place_order_while_checkout.cy.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "93f3a68c-53d2-43d5-8428-7eb0e9422446",
"title": "Place Order: Register while Checkout",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "adds products into the cart, register, and shipping",
"fullTitle": "Place Order: Register while Checkout adds products into the cart, register, and shipping",
"timedOut": null,
"duration": 56070,
"state": "failed",
"speed": null,
"pass": false,
"fail": true,
"pending": false,
"context": "{\n \"title\": \"cypress-mochawesome-reporter-screenshots\",\n \"value\": [\n [\n \"\\\\place_order_while_checkout.cy.js\\\\Place Order Register while Checkout -- adds products into the cart, register, and shipping (failed) (1).png\"\n ]\n ]\n}",
"code": "cy.visit('http://automationexercise.com');\n// Verify home page is visible\ncy.get('.logo a>img').should('be.visible');\n// add product\ncy.get('.product-image-wrapper .choose > ul >li >a').first().click();\n// Verify product detail is opened\ncy.get('.product-information').should('be.visible');\n// Increase quantity to 4\ncy.get('#quantity').clear().type('4');\n// Click 'Add to cart' button\ncy.get('.cart').click();\n// confirm the product\ncy.get('#cartModal > div > div > div.modal-footer > button').click();\n// Click 'View Cart' button\ncy.get('li [href=\"/view_cart\"]').click();\n// Verify cart page is displayed\ncy.get('.cart_info').should('be.visible');\n// Click 'Proceed To Checkout' button\ncy.contains('Proceed To Checkout').click();\n// Click 'Register / Login' button\ncy.get('#checkoutModal > div > div > div.modal-body > p:nth-child(2) > a').click();\n// Fill all details in Signup and create account\ncy.contains('New User Signup!');\ncy.get('[data-qa=\"signup-name\"]').type('Amir Hossain');\ncy.get('[data-qa=\"signup-email\"]').type('amir.swe@gmail.com');\ncy.get('[data-qa=\"signup-button\"]').click();\n// Fill in account details\n// Replace '#input' with the actual selectors for each input field\ncy.get('#id_gender1').type('Mr.');\ncy.get('[data-qa=\"password\"]').type('abubakkar90');\ncy.get('[data-qa=\"days\"]').select('1');\ncy.get('[data-qa=\"months\"]').select('January');\ncy.get('[data-qa=\"years\"]').select('1998');\ncy.get('#newsletter').check();\ncy.get('#optin').check();\ncy.get('[data-qa=\"first_name\"]').type('Amir');\ncy.get('[data-qa=\"last_name\"]').type('Hossain');\ncy.get('[data-qa=\"company\"]').type('Test Company');\ncy.get('[data-qa=\"address\"]').type('123 Test St');\ncy.get('[data-qa=\"address2\"]').type('Apt 4B');\ncy.get('#country').select('Canada');\ncy.get('[data-qa=\"state\"]').type('NY');\ncy.get('[data-qa=\"city\"]').type('New York');\ncy.get('[data-qa=\"zipcode\"]').type('10001');\ncy.get('[data-qa=\"mobile_number\"]').type('1234567890');\ncy.get('[data-qa=\"create-account\"]').click();\ncy.get('[data-qa=\"account-created\"]').contains('Account Created!');\ncy.get('[data-qa=\"continue-button\"]').click();\n// Verify ' Logged in as username' at top\ncy.contains('Logged in as Amir Hossain');\n// Click 'Cart' button again\ncy.get('li [href=\"/view_cart\"]').click();\n// Click 'Proceed To Checkout' button again\ncy.contains('Proceed To Checkout').click();\n// Enter description in comment text area and click 'Place Order'\ncy.get('#ordermsg').type('Test order with registration');\ncy.contains('Place Order').click();\n// Click 'Pay and Confirm Order' button\ncy.get('[data-qa=\"name-on-card\"]').type('Amir Hossain');\ncy.get('[data-qa=\"card-number\"]').type('5655-1814-0058-1255');\ncy.get('[data-qa=\"cvc\"]').type('588');\ncy.get('[data-qa=\"expiry-month\"]').type('08/33');\ncy.get('[data-qa=\"expiry-year\"]').type('2033');\ncy.get('[data-qa = \"pay-button\"]').click();\n// Verify success message 'Your order has been placed successfully!'\ncy.contains('Congratulations! Your order has been confirmed!').should('be.visible');\n// Click 'Delete Account' button\ncy.get('#header > div > div > div > div.col-sm-8 > div > ul > li:nth-child(5) > a').click();\n// Verify 'ACCOUNT DELETED!' and click 'Continue' button\ncy.get('[data-qa=\"account-deleted\"]').contains('Account Deleted!');\ncy.get('[data-qa=\"continue-button\"]').click();",
"err": {
"message": "AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.",
"estack": "AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.\n at Context.eval (webpack:///./cypress/e2e/place_order_while_checkout.cy.js:44:11)",
"diff": null
},
"uuid": "208aa1ae-0708-4e0c-baeb-c308772af6a0",
"parentUUID": "93f3a68c-53d2-43d5-8428-7eb0e9422446",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [],
"failures": [
"208aa1ae-0708-4e0c-baeb-c308772af6a0"
],
"pending": [],
"skipped": [],
"duration": 56070,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": true,
"rootEmpty": true,
"_timeout": 2000
}
],
"meta": {
"mocha": {
"version": "7.0.1"
},
"mochawesome": {
"options": {
"quiet": false,
"reportFilename": "mochawesome",
"saveHtml": false,
"saveJson": true,
"consoleReporter": "spec",
"useInlineDiffs": false,
"code": true
},
"version": "7.1.3"
},
"marge": {
"options": {
"id": "default",
"charts": true,
"reportPageTitle": "custom-title",
"reportDir": "cypress\\reports\\.jsons",
"embeddedScreenshots": true,
"inlineAssets": true,
"saveAllAttempts": true,
"overwrite": false,
"html": false,
"json": true
},
"version": "6.2.0"
}
}
}
111 changes: 111 additions & 0 deletions cypress/reports/.jsons/mochawesome_011.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"stats": {
"suites": 1,
"tests": 1,
"passes": 1,
"pending": 0,
"failures": 0,
"start": "2024-07-12T16:14:49.081Z",
"end": "2024-07-12T16:15:33.942Z",
"duration": 44861,
"testsRegistered": 1,
"passPercent": 100,
"pendingPercent": 0,
"other": 0,
"hasOther": false,
"skipped": 0,
"hasSkipped": false
},
"results": [
{
"uuid": "ba35ac14-48e3-4c08-ad7c-388c3d9b91c2",
"title": "",
"fullFile": "cypress\\e2e\\register_existing_email.cy.js",
"file": "cypress\\e2e\\register_existing_email.cy.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "e317150f-296f-4baa-9ba0-36c828977fb8",
"title": "Register User with existing email",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "Register User with existing email",
"fullTitle": "Register User with existing email Register User with existing email",
"timedOut": null,
"duration": 37289,
"state": "passed",
"speed": "slow",
"pass": true,
"fail": false,
"pending": false,
"context": null,
"code": "// Step 1: Launch browser\n// Cypress automatically launches the browser\n// Step 2: Navigate to url 'http://automationexercise.com'\ncy.visit('http://automationexercise.com');\n// Step 3: Verify that home page is visible successfully\ncy.url().should('include', 'automationexercise');\n// Step 4: Click on 'Signup / Login' button\ncy.contains('Signup / Login').click();\n// Step 5: Verify 'New User Signup!' is visible\ncy.get('#form > div > div > div:nth-child(3) > div > h2').should('contain', 'New User Signup!');\n// Step 6: Enter name and already registered email address\ncy.get('[data-qa=\"signup-name\"]').type('abubakkar');\ncy.get('[data-qa=\"signup-email\"]').type('abu@gmail.com');\n// Step 7: Click 'Signup' button\ncy.get('[data-qa=\"signup-button\"]').click();\n// Step 8: Verify error 'Email Address already exist!' is visible\ncy.get('#form > div > div > div:nth-child(3) > div > form > p').should('contain', 'Email Address already exist!');",
"err": {},
"uuid": "56d71b4b-01e5-495c-aae2-2a99cda39cdd",
"parentUUID": "e317150f-296f-4baa-9ba0-36c828977fb8",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"56d71b4b-01e5-495c-aae2-2a99cda39cdd"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 37289,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": true,
"rootEmpty": true,
"_timeout": 2000
}
],
"meta": {
"mocha": {
"version": "7.0.1"
},
"mochawesome": {
"options": {
"quiet": false,
"reportFilename": "mochawesome",
"saveHtml": false,
"saveJson": true,
"consoleReporter": "spec",
"useInlineDiffs": false,
"code": true
},
"version": "7.1.3"
},
"marge": {
"options": {
"id": "default",
"charts": true,
"reportPageTitle": "custom-title",
"reportDir": "cypress\\reports\\.jsons",
"embeddedScreenshots": true,
"inlineAssets": true,
"saveAllAttempts": true,
"overwrite": false,
"html": false,
"json": true
},
"version": "6.2.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="41.259" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2024-07-12T16:04:08" tests="0" file="cypress\e2e\add_to_cart_from_recommended_items.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Add to cart from Recommended items" timestamp="2024-07-12T16:04:09" tests="1" time="40.822" failures="0">
<testcase name="Add to cart from Recommended items adds a recommended product to cart and verifies" time="34.390" classname="adds a recommended product to cart and verifies">
</testcase>
</testsuite>
</testsuites>
11 changes: 11 additions & 0 deletions cypress/reports/junit/results-2374f77dd758e4c571bde27ad3fd68d9.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="67.231" tests="1" failures="1">
<testsuite name="Root Suite" timestamp="2024-07-12T16:12:23" tests="0" file="cypress\e2e\place_order_registration_before_checkout.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Place Order: Register Before Checkout" timestamp="2024-07-12T16:12:23" tests="1" time="66.700" failures="1">
<testcase name="Place Order: Register Before Checkout Register before cart adds products into the cart, and process shippment" time="0.000" classname="Register before cart adds products into the cart, and process shippment">
<failure message="Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
at Context.eval (webpack:///./cypress/e2e/place_order_registration_before_checkout.cy.js:20:11)]]></failure>
</testcase>
</testsuite>
</testsuites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="44.861" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2024-07-12T16:14:49" tests="0" file="cypress\e2e\register_existing_email.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Register User with existing email" timestamp="2024-07-12T16:14:49" tests="1" time="44.415" failures="0">
<testcase name="Register User with existing email Register User with existing email" time="37.289" classname="Register User with existing email">
</testcase>
</testsuite>
</testsuites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="71.787" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2024-07-12T16:04:57" tests="0" file="cypress\e2e\contact_us.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Contact Us Form" timestamp="2024-07-12T16:04:57" tests="1" time="71.285" failures="0">
<testcase name="Contact Us Form Contact Us Form validation checking...." time="64.633" classname="Contact Us Form validation checking....">
</testcase>
</testsuite>
</testsuites>
11 changes: 11 additions & 0 deletions cypress/reports/junit/results-7593f31e002ada3a14c7f4e533de9caa.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="53.454" tests="1" failures="1">
<testsuite name="Root Suite" timestamp="2024-07-12T16:06:30" tests="0" file="cypress\e2e\download_Invoice_after_purchase_order.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Download Invoice after purchase order" timestamp="2024-07-12T16:06:31" tests="1" time="52.780" failures="1">
<testcase name="Download Invoice after purchase order should allow downloading invoice after successful purchase" time="0.000" classname="should allow downloading invoice after successful purchase">
<failure message="Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
at Context.eval (webpack:///./cypress/e2e/download_Invoice_after_purchase_order.cy.js:20:11)]]></failure>
</testcase>
</testsuite>
</testsuites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="98.862" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2024-07-12T15:59:28" tests="0" file="cypress\e2e\add_product_cart.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Test Case 12: Add Products in Cart" timestamp="2024-07-12T15:59:28" tests="1" time="98.733" failures="0">
<testcase name="Test Case 12: Add Products in Cart Add Products in Cart" time="91.159" classname="Add Products in Cart">
</testcase>
</testsuite>
</testsuites>
15 changes: 15 additions & 0 deletions cypress/reports/junit/results-84ddee2a8ffcadff954e5ab4c112b3da.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="55.679" tests="1" failures="1">
<testsuite name="Root Suite" timestamp="2024-07-12T16:08:43" tests="0" file="cypress\e2e\login_user.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Login User" timestamp="2024-07-12T16:08:43" tests="1" time="55.134" failures="1">
<testcase name="Login User &quot;before all&quot; hook: Registration before login to the system for &quot;should login and delete a user&quot;" time="0.000" classname="&quot;before all&quot; hook: Registration before login to the system for &quot;should login and delete a user&quot;">
<failure message="Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Login User`" type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Login User`
at Context.eval (webpack:///./cypress/e2e/login_user.cy.js:20:11)]]></failure>
</testcase>
</testsuite>
</testsuites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="82.296" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2024-07-12T16:09:48" tests="0" file="cypress\e2e\logout_user.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Logout User" timestamp="2024-07-12T16:09:48" tests="1" time="81.756" failures="0">
<testcase name="Logout User should login and logout a user" time="74.786" classname="should login and logout a user">
</testcase>
</testsuite>
</testsuites>
15 changes: 15 additions & 0 deletions cypress/reports/junit/results-a70cba8761d2e5f4f8107426e01bbe20.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="56.640" tests="1" failures="1">
<testsuite name="Root Suite" timestamp="2024-07-12T16:11:18" tests="0" file="cypress\e2e\place_order_login_before_checkout.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Place Order: Register Before Checkout" timestamp="2024-07-12T16:11:18" tests="1" time="56.131" failures="1">
<testcase name="Place Order: Register Before Checkout &quot;before all&quot; hook: Registration before login to the system and purchase product for &quot;Register before cart adds products into the cart, and process shippment&quot;" time="0.000" classname="&quot;before all&quot; hook: Registration before login to the system and purchase product for &quot;Register before cart adds products into the cart, and process shippment&quot;">
<failure message="Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Place Order: Register Befor...`" type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Place Order: Register Befor...`
at Context.eval (webpack:///./cypress/e2e/place_order_login_before_checkout.cy.js:21:11)]]></failure>
</testcase>
</testsuite>
</testsuites>
11 changes: 11 additions & 0 deletions cypress/reports/junit/results-c1c6050f9b4c118ac33be320d7831bcc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="63.801" tests="1" failures="1">
<testsuite name="Root Suite" timestamp="2024-07-12T16:13:37" tests="0" file="cypress\e2e\place_order_while_checkout.cy.js" time="0.000" failures="0">
</testsuite>
<testsuite name="Place Order: Register while Checkout" timestamp="2024-07-12T16:13:37" tests="1" time="63.298" failures="1">
<testcase name="Place Order: Register while Checkout adds products into the cart, register, and shipping" time="0.000" classname="adds products into the cart, register, and shipping">
<failure message="Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 4000ms: Expected to find element: `#id_gender1`, but never found it.
at Context.eval (webpack:///./cypress/e2e/place_order_while_checkout.cy.js:44:11)]]></failure>
</testcase>
</testsuite>
</testsuites>
Loading

0 comments on commit bfa46f9

Please sign in to comment.