示例#1
0
        public void CustomerSettingsCogsSellSideActive()
        {
            SettingsPage settingsPage = new SettingsPage();
            DataRow      customerRow  = dbAccess.GetUnsyncedCustomerRow();
            string       customerId   = customerRow["CustomerId"].ToString();

            settingsPage.ClickCustomerSettingsGeneralLink()
            .SearchCustomer(customerId);
            Assert.AreEqual(settingsPage.CustomerIdSearchResults[0].Text, "No customers found");
            Pages.Optimizer.AccountsPage optimizerAccountsPageElements = new Pages.Optimizer.AccountsPage();
            optimizerAccountsPageElements.SyncCustomerWithTlrg(customerId);
            settingsPage = new SettingsPage()
                           .Refresh()
                           .ClickCustomerSettingsGeneralLink()
                           .SearchAndSelectCustomer(customerId);
            Assert.That(settingsPage.CogsActiveSellSideCheck.Displayed, Is.True);
        }
示例#2
0
        public void CustomerSettingsSyncNewCustomer()
        {
            SettingsPage settingsPage = new SettingsPage();
            DataRow      customerRow  = dbAccess.GetUnsyncedCustomerRow();
            string       customerId   = customerRow["CustomerId"].ToString();

            settingsPage.ClickCustomerSettingsGeneralLink()
            .SearchCustomer(customerId);
            Assert.AreEqual(settingsPage.CustomerIdSearchResults[0].Text, "No customers found");
            Pages.Optimizer.AccountsPage optimizerAccountsPageElements = new Pages.Optimizer.AccountsPage();
            optimizerAccountsPageElements.SyncCustomerWithTlrg(customerId);
            settingsPage = new SettingsPage();
            customerRow  = dbAccess.GetSyncedCustomerRow(customerId);
            string isTlrgEnabled = customerRow["IsTLRGEnabled"].ToString();

            Assert.IsTrue(Convert.ToBoolean(isTlrgEnabled));
            settingsPage.Refresh()
            .ClickCustomerSettingsGeneralLink()
            .SearchCustomer(customerId);
            Assert.AreEqual(settingsPage.CustomerIdSearchResults[0].Text, customerId);
        }