public void P20_1_tc_26288_Add_Test_to_Cart() { CommonSection.Administer.ContentManagement.Tests(); TestsPage.ClickCreateNew(); TestwizardPage.CreateNewTest(TestTitle + "_TC26288"); _test.Log(Status.Info, "A New test created"); TestwizardPage.addCosttoTest("5"); _test.Log(Status.Info, "Upload any Image file to content"); TestwizardPage.checkin(); CommonSection.Logout(); LoginPage.LoginAs("srlearner103").WithPassword("").Login(); CommonSection.SearchCatalog(TestTitle + "_TC26288"); SearchResultsPage.ClickCourseTitle(TestTitle + "_TC26288"); Assert.IsTrue(ContentDetailsPage.OverviewTab.isAddtoCartbuttondisplay()); _test.Log(Status.Pass, "Verify Add to Cart button display"); ContentDetailsPage.OverviewTab.click_AddtoCart(); Assert.IsTrue(ContentDetailsPage.OverviewTab.AddtoCartportlet.isTestAddedtoCart()); CommonSection.ClickShoppingCart(); ShoppingCartPage.CompletePurchaseProcess(); OrderPage.Click_Purchased_Content(TestTitle + "_TC26288"); Assert.IsTrue(ContentDetailsPage.OverviewTab.Costportlet.isViewOrderlinkDisplay()); _test.Log(Status.Pass, "Verify view order link display on Add to Cart portlet"); ContentDetailsPage.OverviewTab.Costportlet.ClickViewOrderlink(); Assert.IsTrue(OrderDetailsPage.VerifyPurchasedContent(TestTitle + "_TC26288")); TC26378 = true; }
public void P20_1_a01_Add_SCROM_Course_to_Cart_26227() { CommonSection.CreteNewScorm(scormtitle + "TC26227"); _test.Log(Status.Info, "Creating New Scorm"); Assert.IsTrue(ContentDetailsPage.IsContentCreated()); _test.Log(Status.Pass, "Verify New Scorm Course is Created"); Assert.IsTrue(ContentDetailsPage.isCostNSalesTaxAccordiandisplayed()); _test.Log(Status.Pass, "Verify Cost and Sales Tax Accordian Display"); ContentDetailsPage.Accordians.ClickEdit_CostNSalesTax(); _test.Log(Status.Info, "Click on Cost & SalesTax Accordian Edit button"); Assert.IsTrue(CostPage.VerifyDifferentPortlets()); _test.Log(Status.Pass, "Verify the Manage Sales Tax, Default Cost, Alternate Costs, Pricing Schedules sections are displayed"); CostPage.DefaultCostAs("15").Save(); _test.Log(Status.Info, "Enter Defailt Cost and Click Save"); Assert.IsTrue(CostPage.Successmessage("The default cost was saved.")); _test.Log(Status.Pass, "Verfy Default cost is saved"); ContentDetailsPage.Click_Check_in(); CommonSection.Logout(); LoginPage.LoginAs("srlearner101").WithPassword("").Login(); CommonSection.SearchCatalog('"' + scormtitle + "TC26227" + '"'); // Search for Bundle that has Promotional Video _test.Log(Status.Info, "Searched" + scormtitle + "TC26227" + "from Catalog"); SearchResultsPage.ClickCourseTitle(scormtitle + "TC26227"); // Click on Bundle Title _test.Log(Status.Info, "Clicked searched course title"); Assert.IsTrue(ContentDetailsPage.isAddToCartButtonDisplayed()); //57254 AC6 ContentDetailsPage.ClickAddtoCart_GeneralCourse(); //StringAssert.AreEqualIgnoringCase("Success\r\nThe item was added to the cart.\r\n×", Driver.getSuccessMessage(), "Error message is different"); Assert.IsTrue(ContentDetailsPage.ClickAddtoCartPortlet.isAddedtocardinfodisplay()); Assert.IsTrue(CommonSection.isCountincrease_ShopingCart()); CommonSection.ClickShoppingCart(); ShoppingCartPage.CompletePurchaseProcess(); OrderPage.Click_PurchasedContentTitle(); Assert.IsTrue(ContentDetailsPage.OverviewTab.Costportlet.isViewOrderlinkDisplay()); ContentDetailsPage.OverviewTab.Costportlet.ClickViewOrderlink(); Assert.IsTrue(OrderDetailsPage.VerifyPurchasedContent(scormtitle + "TC26227")); TC26372 = true; TC57930 = true; }
public void E2E04() { APIndexPage indexPage = new APIndexPage(Driver, Url); Login(indexPage); //Orders OrdersHomePage ordersHomePage = indexPage.Header.ClickOnOrders(); ordersHomePage.SetFromDate("11/01/2019"); ordersHomePage.SetToDate("12/26/2019"); ordersHomePage.ClickOnSearchButton(); //Assert.IsTrue(ordersHomePage.ValidateDatesAreInSearchRange("11/01/2019", "12/26/2019"), "Dates aren't correct"); OrderDetailsPage orderDetailsPage = ordersHomePage.ClickOnOrderButtonByIndex(0); orderDetailsPage.ClickOnReorderButton(); orderDetailsPage.ClickOnAddToCartButton(); APCartPage cartPage = orderDetailsPage.Header.ClickOnViewCart(); cartPage.GetQuantityInput(); //Edit Payment at Checkout APCheckoutPage checkoutPage = cartPage.ProceedToCheckOut(); checkoutPage.UserInfoIsPopulated(); AddressModel addressModel = GetAddressModel(); checkoutPage.SetAddressElement(AddressInputs.StreetAddress, addressModel.street); checkoutPage.SetAddressElement(AddressInputs.City, addressModel.city); checkoutPage.SetAddressElement(AddressInputs.State, addressModel.state); checkoutPage.SetAddressElement(AddressInputs.Postal, addressModel.postal); checkoutPage.SetAddressElement(AddressInputs.ATTN, "Tundra Restaurant Supply"); checkoutPage.NextStep(); checkoutPage.ClickEditAction(EditActions.SecureBillingInformation); checkoutPage.ClickOnAssingNewCard(); SetCreditCard(checkoutPage); checkoutPage.NextStep(); OrderConfirmationPage orderConfirmationPage = checkoutPage.PlaceOrderSubmitClick(); orderConfirmationPage.ClickOnContinueShoppingButton(ContinueShoppingButtons.ContinueShopping); }
[Test, Order(18)]//dependent on TC26025 public void b18_View_Document_Purchase_Details_26379() { ContentDetailsPage.ClickShoppingCart(); _test.Log(Status.Info, "Click on Shopping Cart"); ShoppingCartPage.Checkout(); _test.Log(Status.Info, "Click Checkout"); CheckoutPage.UseThisPaymentMethod(); _test.Log(Status.Info, "Click Use This Payment Method"); CheckoutPage.AcceptTermsandCondition(); _test.Log(Status.Info, "Click Accept Terms and Condition"); CheckoutPage.PlaceOrder(); _test.Log(Status.Info, "Click Place Order"); Assert.IsTrue(Driver.comparePartialString("Thank you for your order! Your order has been successfully processed. You will receive an email confirmation shortly.", ContentDetailsPage.OrderReciptSuccessMessage())); _test.Log(Status.Pass, "Verify Order Processed Success Message"); OrderReceiptPage.ViewOrder(); _test.Log(Status.Pass, "Click View Order"); OrderPage.ClickOrderedItemViewDetails(DocumentTitle + "TC26205"); _test.Log(Status.Pass, "Click View Details for Purchased Content"); Assert.IsTrue(OrderDetailsPage.VerifyPurchasedContent(DocumentTitle + "TC26205")); _test.Log(Status.Pass, "verify Puschased Content"); }
private void LoadPage(int pageIndex) { if (pageIndex >= 0 && pageIndex < pages.Count) { this.tableLayoutPanel.SuspendLayout(); // Disable the current page if (currentPage != null) { currentPage.Enabled = false; } // Set the new current page currentPage = pages[pageIndex]; // Update the view model for the current page's title this.ViewModel.SelectedPageTitle = currentPage.Text; btnUp.Visible = btnPageUp.Visible = btnDown.Visible = btnPageDown.Visible = currentPage.PageRequiresNavigationButtons(); btnClear.Enabled = currentPage.IsClearEnabled(); currentPage.BringToFront(); // Give focus to the new page and select the first control in tab order currentPage.Enabled = true; currentPage.OnActivate(); currentPage.Focus(); currentPage.SelectNextControl(null, true, true, true, false); // Work around for apparent TableLayout bug that isn't collapsing the AutoSize row containing the arrow buttons // when they are invisible. We want the page to fill up the space used by the arrow buttons. tableLayoutPanel.SetRowSpan(this.panel, btnUp.Visible ? 1 : 2); // Update state of arrow buttons UpdateButtons(); this.tableLayoutPanel.ResumeLayout(); } }