Пример #1
0
        public void ATC4434_ClientDetailsfromCRMOrganizations()
        {
            #region Start Up Excel
            MyBook = MyApp.Workbooks.Open(DatasourceDir + @"\TenancyRequests.xlsx", 0, false, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
            MySheet = (Excel.Worksheet)MyBook.Sheets[Properties.Settings.Default.ENVIRONMENT.ToString()];
            MyRange = MySheet.UsedRange;
            //Get specific row for the data
            int testDataRows = MyRange.Rows.Count;
            int MyRow = 0;
            for (int i = 2; i <= testDataRows; i++)
            {
                if (MyRange.Cells[i, 1].Value.ToString() == "4434")
                {
                    MyRow = i;
                    break;
                }
            }
            #endregion

            string managingParty = MyRange.Cells[MyRow, TenancyRequestSchema.GetColumnIndex("MANAGING_PARTY")].Value.ToString();

            Homepage homePage = new Homepage();
            homePage.ClickHomeTab();
            homePage.ClickBondManagementTab();
            homePage.ClickBondClientLink();
            BondClientPage bondClientPage = new BondClientPage();
            Table table = new Table(bondClientPage.GetClientOverviewTable());
            Assert.IsFalse(table.GetCellValueExists("Name", managingParty));

            #region Shut down Excel
            MyBook.Save();
            MyBook.Close();
            MyApp.Quit();
            #endregion
        }
Пример #2
0
        public void ATC4434_ClientsDetailsFromCRM()
        {
            Homepage homePage = new Homepage();
            homePage.ClickHomeTab();
            homePage.ClickBondManagementTab();
            homePage.ClickBondClientLink();

            BondClientPage bondClientPage = new BondClientPage();
            Table table = new Table(bondClientPage.GetClientOverviewTable());

            // Verify there are fields to display CRM client number, Name, Client group and none of these fields can be updated
            Assert.IsFalse(table.SetCellValue("CRM client number", 1, "Test 4434"), "CRM client number row value is not editable");
            Assert.IsFalse(table.SetCellValue("Name", 1, "Test 4434"), "Name row value is not editable");
            Assert.IsFalse(table.SetCellValue("Client group", 1, "Test 4434"), "Client groupr row value is not editable");

            // Verify there is a field to display Method of Payment and this field can not be updated
            bondClientPage.ClickGeneralTab();
            Assert.IsTrue(bondClientPage.IsMethodOfPaymentEditable() , "Method Of Payment edit box is not read only!!!");
        }