コード例 #1
0
        public void CheckVatIdIsNotRequiredField()
        {
            productsPage     = new ProductsPage(CmdDriver.Driver);
            yourOrderPage    = new YourOrderPage(CmdDriver.Driver);
            contactInfoPage  = new ContactInfoPage(CmdDriver.Driver);
            orderSummaryPage = new OrderSummaryPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check Vat id is not a required field");
            extentReportUtils.addTestLog(Status.Info, "CheckVatIdIsNotRequiredField");

            productsPage.ClickAcceptAllCookies();

            // Click on Buy Now button per Product name
            productsPage.ClickBuyNowButtonByProductName(ProductsEnum.DEVCRAFT_UI);

            yourOrderPage.ClickAcceptAllCookies();

            // Assert there is at least one product at the page
            Assert.AreEqual(1, yourOrderPage.GetProductsCountFromPage());

            // Navigate user to the next page - Contact Info Page
            yourOrderPage.ClickContinueButton();

            ContactInfo contactInfo = new ContactInfo();

            contactInfo.Address.Country = "Bulgaria";
            contactInfo.Address.City    = "Sofia";
            contactInfo.Address.ZipCode = "1000";
            contactInfo.VatId           = "";

            // Fill Billing Information
            contactInfoPage.FillBillingInformation(contactInfo);

            // Assert error message for vat id is NOT displayed
            Assert.IsFalse(contactInfoPage.IsVatIdErrorMessageDisplayed());

            // Navigate user to next page
            contactInfoPage.ClickContinueButton();

            // Assert at Order summary page
            Assert.AreEqual("Order Summary", orderSummaryPage.GetHeaderText());
        }
コード例 #2
0
        public void CheckBillingInformationWithState()
        {
            productsPage     = new ProductsPage(CmdDriver.Driver);
            yourOrderPage    = new YourOrderPage(CmdDriver.Driver);
            contactInfoPage  = new ContactInfoPage(CmdDriver.Driver);
            orderSummaryPage = new OrderSummaryPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check Billing information with state");
            extentReportUtils.addTestLog(Status.Info, "CheckBillingInformationWithState");

            productsPage.ClickAcceptAllCookies();

            // Click on Buy Now button per Product name
            productsPage.ClickBuyNowButtonByProductName(ProductsEnum.DEVCRAFT_UI);

            yourOrderPage.ClickAcceptAllCookies();

            // Assert there is at least one product at the page
            Assert.AreEqual(1, yourOrderPage.GetProductsCountFromPage());

            // Navigate user to the next page - Contact Info Page
            yourOrderPage.ClickContinueButton();

            ContactInfo contactInfo = new ContactInfo();

            // Fill Billing Information
            contactInfoPage.FillBillingInformation(contactInfo);

            // Assert Vat field is not displayed
            Assert.IsFalse(contactInfoPage.IsVatIdFieldDisplayed());

            // Navigate user to next page
            contactInfoPage.ClickContinueButton();

            // Assert at Order summary page
            Assert.AreEqual("Order Summary", orderSummaryPage.GetHeaderText());
        }
コード例 #3
0
        public void CheckBillingInformationWithVat()
        {
            productsPage     = new ProductsPage(CmdDriver.Driver);
            yourOrderPage    = new YourOrderPage(CmdDriver.Driver);
            contactInfoPage  = new ContactInfoPage(CmdDriver.Driver);
            orderSummaryPage = new OrderSummaryPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check Billing information with state");
            extentReportUtils.addTestLog(Status.Info, "CheckBillingInformationWithState");

            productsPage.ClickAcceptAllCookies();

            // Click on Buy Now button per Product name
            productsPage.ClickBuyNowButtonByProductName(ProductsEnum.DEVCRAFT_UI);

            yourOrderPage.ClickAcceptAllCookies();

            // Assert there is at least one product at the page
            Assert.AreEqual(1, yourOrderPage.GetProductsCountFromPage());

            // Navigate user to the next page - Contact Info Page
            yourOrderPage.ClickContinueButton();

            ContactInfo contactInfo = new ContactInfo();

            contactInfo.Address.Country = "Bulgaria";
            contactInfo.Address.City    = "Sofia";
            contactInfo.Address.ZipCode = "1000";
            contactInfo.VatId           = "BG160026043";

            // Fill Billing Information
            contactInfoPage.FillBillingInformation(contactInfo);
            contactInfoPage.ClickContinueButton();

            // Assert at Order summary page
            Assert.AreEqual("Order Summary", orderSummaryPage.GetHeaderText());
        }