SHARE
TWEET

Untitled

a guest Mar 17th, 2020 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = require("../config/main-config");
  2. var dataGenerators = require("../utils/dataGenerators");
  3. import Form_PO from "../page-objects/Form_PO";
  4. import allureReporter from "@wdio/allure-reporter";
  5. import Base_PO from "../page-objects/Base_PO";
  6.  
  7. describe("End to End Guest Checkout Test", () => {
  8.   beforeEach(function() {
  9.     Form_PO.open();
  10.   });
  11.  
  12.   it("Checkout", () => {
  13.     expect(browser.getUrl()).to.contain("https://skinbeautyessentials.com/");
  14.       console.log("Search product");  
  15.     $(Form_PO.searchField).setValue("Daily Essential Enzymes 500 mg. - 240 Capsules");
  16.     $(Form_PO.searchCTA).click();
  17.     $(Form_PO.CLPImage).click();
  18.     $(Form_PO.addToCart).click();
  19.     Form_PO.goToCart();
  20.     expect(browser.getUrl()).to.contain("https://skinbeautyessentials.com/index.php?route=checkout/cart");
  21.     Form_PO.cartCheckoutCTA.click();
  22.     Form_PO.guestRadioButton.click();
  23.     Form_PO.goToShippingCTA.click();
  24.     allureReporter.addStep('Shipping page');
  25.     Form_PO.submitAllInformationViaContactUsForm(
  26.       "John",
  27.       "Doe",
  28.       "os@gmail.com",
  29.       "3333333333",
  30.       "666 Quicksilver road",
  31.       "Northbrook",
  32.       "60062",
  33.       "United States",
  34.       "Illinois"
  35.     );
  36.     Form_PO.billingDetailsSubmitButton.click();
  37.     Form_PO.deliveryDetailsSubmitButton.click();
  38.     Form_PO.paymentMethodSubmitButton.click();
  39.     Form_PO.submitCheckout.click();
  40.     allureReporter.addStep('Payment gate');
  41.       Form_PO.submitAllInformationViaContactUsFormPayment(
  42.       "John",
  43.       "Doe",
  44.       "666 Quicksilver road",
  45.       "United States",
  46.       "Northbrook",
  47.       "60062",
  48.       "3333333333",
  49.       "os@gmail.com",
  50.       "City",
  51.       "4444333322221111",
  52.       "09",
  53.       "2025",
  54.       "123"
  55.     );
  56.     $(Form_PO.submitPaymentGate).click();
  57.   });
  58. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top