Example #1
0
        public void TestActivityIncentiveTemp()
        {
            LoginPage lpage = new LoginPage(ObjectRepository.Driver);
            HomePage  hPage = lpage.LoginApplication(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword());
            ManageIncentivePrograms mIPage = hPage.OpenManageIncentivePrograms();
            NewProgram npPage = mIPage.ClickNewProgram();
            ActivityIncentiveTemplate aiPage = npPage.CreateActivityIncentiveTemplate();

            aiPage.SelectProgramName("Test", "Test");
            aiPage.SelectProgramVisibilityStartDate("28", "October", "2015");
            aiPage.SelectProgramVisibilityEndDate("01", "October", "2002");
            aiPage.SelectProgramStartDate("26", "April", "2002");
            aiPage.SelectProgramEndDate("30", "November", "2015");
            aiPage.SelectProgramLastSubmitDate("01", "December", "2015");
            aiPage.SelectProgramCloseDates("31", "December", "2015");
            aiPage.AddPoints("1001", "22", "Hello1");
            aiPage.AddPointType("test", "100");
            aiPage.AddProgramIncentive("CODE1", "TPE1", "TesTing", "100");
            aiPage.AddEligibleGroup("test");
            aiPage.CheckValidationField(true, false, true, false, false);
            aiPage.ClickFinish();
            mIPage.SelectItemPerList("100");
            mIPage.VerifyIncentiveGridEntry("//div[@id='ManageIncentiveProgramsGrid']/div/div[position()=3]", "Test", "24/04/2002", "01/10/2002", "Pending");
            Thread.Sleep(1000);
            Logout();
        }
        public void TestSalesIncentiveTemp()
        {
            LoginPage lpage = new LoginPage(ObjectRepository.Driver);
            HomePage  hPage = lpage.LoginApplication(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword());
            ManageIncentivePrograms mIPage = hPage.OpenManageIncentivePrograms();
            NewProgram npPage = mIPage.ClickNewProgram();
            SalesIncentiveTemplateBasic sitPage = npPage.CreateSalesIncentiveTemplate();

            sitPage.SelectProgramName("Test", "Test");
            sitPage.SelectProgramVisibilityStartDate("05", "April", "2002");
            sitPage.SelectProgramVisibilityEndDate("01", "October", "2002");
            sitPage.SelectProgramStartDate("26", "April", "2002");
            sitPage.SelectProgramEndDate("30", "November", "2015");
            sitPage.SelectProgramLastSubmitDate("01", "December", "2015");
            sitPage.SelectProgramCloseDates("31", "December", "2015");
            sitPage.AddPoints("1001", "22");
            sitPage.AddPointType("test", "100");
            sitPage.AddProdProgramIncentive("10", "prodSku", "ProdDesc", "PordFamily", "ProdClass", "ProdLine", "ProdType", "unitSoldMAx", "unitSoldMin");
            sitPage.AddEligibleGroup("test", true, "test");
            sitPage.OpenValidationField();
            sitPage.AddInvoiceNoValidation(true, true, true);
            // Similarly for other validation
            sitPage.AddClaimAuditValidation(true, "100", true);
            Thread.Sleep(4000);
        }