public void AddPackageForCustomerTradingGroup() { var loginPage = new LoginTabPageObject(driver); var loginTenantnPage = new LoginTenantTabPageObject(driver); var mainPageHeaders = new MainMenuPageObject(driver); var packagesScreen = new PackagesScreenPageObject(driver); var priceManagmentDropDown = new PriceManagmentDropDownPageObject(driver); var addPackagePopup = new AddPackagePopupPageObject(driver); // login flow loginPage.Login(creds.Email, creds.Password); loginTenantnPage.ChooseFirstTenant(); mainPageHeaders.ClickPricingManagementHeader(); priceManagmentDropDown.ClickPackages(); packagesScreen.ClickAddPackageBtn(); packagesScreen.ClickActionDeleteButton(); // add package flow addPackagePopup.ClickCustomerType(); addPackagePopup.SetAccountTypeTradingGroup(); Thread.Sleep(100); addPackagePopup.SetTradingGroupCompany(); addPackagePopup.SetPeriodOngoing(); addPackagePopup.SetStartDate(); addPackagePopup.SetEndDate(); Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; string description = "Add Package For Customer Single Company Trading Group Ongoing. Timestamp: " + unixTimestamp; addPackagePopup.SetDescription(description); addPackagePopup.SetBudget(); addPackagePopup.SetTarget(); addPackagePopup.ClickSaveBtn(); }
public void AddPackageForCustomerParentAccount() { var loginPage = new LoginTabPageObject(driver); var loginTenantnPage = new LoginTenantTabPageObject(driver); var mainPageHeaders = new MainMenuPageObject(driver); var packagesScreen = new PackagesScreenPageObject(driver); var priceManagmentDropDown = new PriceManagmentDropDownPageObject(driver); var addPackagePopup = new AddPackagePopupPageObject(driver); // login flow loginPage.Login(creds.Email, creds.Password); loginTenantnPage.ChooseFirstTenant(); mainPageHeaders.ClickPricingManagementHeader(); priceManagmentDropDown.ClickPackages(); packagesScreen.ClickAddPackageBtn(); // add package flow addPackagePopup.ClickCustomerType(); addPackagePopup.SetAccountTypeParentAccount(); Thread.Sleep(100); addPackagePopup.SetParentAccountCompany(); addPackagePopup.SetPeriodOngoing(); addPackagePopup.SetStartDate(); addPackagePopup.SetEndDate(); Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; string description = "Add Package For Customer Single Company Parent Account Ongoing. Timestamp: " + unixTimestamp; addPackagePopup.SetDescription(description); addPackagePopup.SetBudget(); addPackagePopup.SetTarget(); addPackagePopup.ClickSaveBtn(); Thread.Sleep(100); packagesScreen.ClickOrderById(); Thread.Sleep(100); packagesScreen.ClickOrderById(); Thread.Sleep(1000); var actualResult = driver.FindElement(By.XPath("//*[@id=\"gridPackageOverview\"]/div/div[2]/kendo-grid/div/kendo-grid-list/div/div[1]/table/tbody/tr[1]/td[6]")).Text; Assert.AreEqual(description, actualResult); }