public void ChooseTabAndVerify(AccountTab accountTab) { ChooseTab(accountTab); UIUtil.DefaultProvider.WaitForAJAXRequest(); UIUtil.DefaultProvider.WaitForPageToLoad(); VerifyTab(accountTab); }
private void Form1_Load(object sender, EventArgs e) { ImperaturData oNewSystem = null; bool CreateNewSystem = ShowSystemLoad(); ImperaturContainer.SystemNotificationEvent += ImperaturContainer_SystemNotificationEvent; oWaitLoadingSystem = new dialog.WaitDialog(); oWaitLoadingSystem.Show(); oWaitLoadingSystem.Refresh(); if (CreateNewSystem) { oWaitLoadingSystem.SetSystemNotificationText("Creating the new system..."); oWaitLoadingSystem.Refresh(); oNewSystem = CreateNewImperaturMarket(oNewSystem); } if (oNewSystem != null) { oWaitLoadingSystem.SetSystemNotificationText("Loading the Imperatur Market system..."); oWaitLoadingSystem.Refresh(); m_Ic = (ImperaturMarket)ImperaturContainer.BuildImperaturContainer(oNewSystem); } else { oWaitLoadingSystem.SetSystemNotificationText("Loading the Imperatur Market system..."); oWaitLoadingSystem.Refresh(); m_Ic = (ImperaturMarket)ImperaturContainer.BuildImperaturContainer(SystemLocation); } oWaitLoadingSystem.SetSystemNotificationText("Loading is done, opening the system for you"); oWaitLoadingSystem.Refresh(); m_Ic.SystemNotificationEvent += M_Ic_SystemNotificationEvent; oWaitLoadingSystem.Close(); //this far we save the systemlocation to the clients application folder for easy access //SystemLocationCacheFile SaveSystemLocationToCache(oNewSystem); this.toolStripStatusLabel_system.Text = string.Format("{0} | {1} | {2}", m_Ic.GetSystemData().SystemDirectory, m_Ic.GetSystemData().SystemCurrency, m_Ic.SystemExchangeStatus.ToString()); if (m_Ic.SystemExchangeStatus.ToString() == "Closed") { toolStripStatusLabel_system.BackColor = Color.IndianRed; } else { toolStripStatusLabel_system.BackColor = this.BackColor; } //add the controls to the different areas m_oAccountTab = new AccountTab(m_Ic.GetAccountHandler(), m_Ic.GetTradeHandler(), m_Ic.OrderQueue); m_oAccountTab.Dock = DockStyle.Fill; tabPage_account.Controls.Add(m_oAccountTab); m_Ic.QuoteUpdateEvent += M_Ic_QuoteUpdateEvent; this.checkBox_automaticTrading.Checked = m_Ic.GetSystemData().IsAutomaticMaintained; }
private AccountDetailViewModel CreateAccountDetailViewModel(AccountTab accountTab = AccountTab.UpdateAccount) { var client = GetUserClient(); var user = client.GetCurrentUser(); var userCode = client.GetSingleUserGroupName(); return(new AccountDetailViewModel { UpdateUserViewModel = Mapper.Map <UpdateUserViewModel>(user), UpdatePasswordViewModel = null, UpdateContactViewModel = Mapper.Map <UpdateContactViewModel>(user), UpdateTwoFactorVerificationViewModel = CreateUpdateTwoFactorVerificationViewModel(user), UserCodeViewModel = new UserCodeViewModel { UserCode = userCode }, UserRolesViewModel = new UserRolesViewModel { Roles = user.Roles }, ActualTab = accountTab }); }
public void VerifyTab(AccountTab accountTab) { bool isCorrect = false; switch (accountTab) { case AccountTab.Info: //Verify presence of contact, billing, and defaults sections if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_uclMA_pnlContactInfo", LocateBy.Id) && UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_uclMA_pnlBillingInfo", LocateBy.Id) && UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_uclMA_pnlDefaults", LocateBy.Id)) isCorrect = true; break; case AccountTab.Reports: //Verify presence of account activity and payment sections if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlAcctActivity", LocateBy.Id) && UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlPayments", LocateBy.Id)) isCorrect = true; break; case AccountTab.XEventReports: //Verify presence of standard and custom XEvent Report list if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_listXEventReports_pnlStandardXReports", LocateBy.Id) && UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_listXEventReports_pnlCustomXEventReports", LocateBy.Id)) isCorrect = true; break; case AccountTab.Hotels: //Verify presence of hotel templates list if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlHotels", LocateBy.Id)) isCorrect = true; break; case AccountTab.Users: //Verify presence of user list if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlUsers", LocateBy.Id)) isCorrect = true; break; case AccountTab.Roles: //Verify presence of system roles list and custom roles list if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlSystemRoles", LocateBy.Id) && UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlCustomRoles", LocateBy.Id)) isCorrect = true; break; case AccountTab.Gateways: //Verify presence of merchant gateway list if (UIUtil.DefaultProvider.IsElementPresent("ctl00_ctl00_cphDialog_cpMgrMain_pnlCustomerMerchants", LocateBy.Id)) isCorrect = true; break; } Assert.That(isCorrect); }
public void ChooseTab(AccountTab accountTab) { UIUtil.DefaultProvider.WaitForDisplayAndClick(string.Format(AccountTabLocator, GetAccountTabName(accountTab)), LocateBy.XPath); UIUtil.DefaultProvider.WaitForAJAXRequest(); }
/// <summary> /// Return the string name of an Account Tab /// </summary> /// <param name="accountTab"></param> /// <returns></returns> private string GetAccountTabName(AccountTab accountTab) { string tabName = accountTab.ToString(); switch (accountTab) { case AccountTab.Info: tabName = "Account Information"; break; case AccountTab.Reports: tabName = "Account Reports"; break; case AccountTab.XEventReports: tabName = "Cross-Event Reports"; break; case AccountTab.Gateways: tabName = "Payment Gateways"; break; } return tabName; }
private void SetTab(AccountTab tab) { AccountDetailsPanel.Visible = tab == AccountTab.Details; pnlActivityLog.Visible = (tab == AccountTab.ActivityLog || tab == AccountTab.SubAccounts); SubAccountsPanel.Visible = tab == AccountTab.SubAccounts; LogViewer.Visible = tab == AccountTab.ActivityLog; }
// // GET: /Account/UserProfile public IActionResult UserProfile(AccountTab actualTab = AccountTab.UpdateAccount) { var viewmodel = CreateAccountDetailViewModel(actualTab); return(View(viewmodel)); }
private IActionResult Index(string error = null, bool updatedUserInfo = false, AccountTab tab = AccountTab.Dashboard) { var model = new IndexVM { User = SystemUser, Error = error, UpdatedUserInfo = updatedUserInfo, Tab = tab, Products = UnitOfWork.StoredProcedures.GetFavouriteProductInfo(SystemUser.Id), OrderDetails = UnitOfWork.StoredProcedures.GetOrderDetails(SystemUser.Id) }; return(View("Index", model)); }
public IActionResult Index(AccountTab tab = AccountTab.Dashboard) { return(Index(null, tab: tab)); }