public void VerifyErrorMessages()
        {
            strTestCaseNo = "TC002_Reg";
            strtblname    = "automation_shiftadministration";
            strTestType   = "Regression";

            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC02_VerifyErrorMessages");
            FpAdminMenus adminmenus = new FpAdminMenus();

            adminmenus.AdminClick();
            adminmenus.LnkShiftAdministration.Click();

            clsShiftAdministration shiftadmin = new clsShiftAdministration();
            var connection    = new Database.ConnectToMySQL_Fetch_TestData();
            var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType);

            string strTDShiftName  = testdataShift[4];
            string strTDShortCode  = testdataShift[5];
            string strTDStartTime  = testdataShift[6];
            string strTDDuration   = testdataShift[7];
            string strTDCurrencies = testdataShift[8];
            string strTDStatus     = testdataShift[9];


            shiftadmin.VerifyErrorMessages(strTDShiftName, strTDShortCode, strTDStartTime, strTDDuration, strTDCurrencies);
        }
        public void TC03_Admin_AddTemplates()
        {
            var connection     = new Database.ConnectToMySQL_Fetch_TestData();
            var testdataRoster = connection.Select(strtblname, strTestCaseNo, strTestType);
            var TopbarMenu     = new clsMainPage_TopbarMenu();

            var RosterAdministration = new clsRosterAdministration();

            TopbarMenu.NavigatetoRosterAdministration();


            String strTDRosterName         = testdataRoster[4];
            String strTDPane               = testdataRoster[5];
            String strTDTimeZoneorLocation = testdataRoster[6];
            String strTDTimeZone           = testdataRoster[7];
            String strTDLocation           = testdataRoster[8];
            String strTDPeople             = testdataRoster[9];
            String strTDShiftDetails       = testdataRoster[10];
            String strTDStatus             = testdataRoster[11];

            RosterAdministration.AddRosterdetails(strTDRosterName, strTDPane, strTDTimeZoneorLocation, strTDTimeZone, strTDLocation, strTDPeople, strTDShiftDetails, strTDStatus);

            System.Threading.Thread.Sleep(2000);

            String[] rosterdetails = RosterAdministration.RetrieveRosterdetails(strTDRosterName);

            String strfbwebrostername = rosterdetails[0];
            String strfbwebpane       = rosterdetails[1];
            String strfbwebshifttypes = rosterdetails[2];
            String strfbwebstatus     = rosterdetails[3];


            Assert.AreEqual(strTDRosterName, strfbwebrostername);
            Assert.AreEqual(strTDPane, strfbwebpane);
            Assert.AreEqual(strTDShiftDetails, strfbwebshifttypes);
            Assert.AreEqual(strTDStatus, strfbwebstatus);
        }
示例#3
0
        public void AddRosterAdmin()
        {
            strTestCaseNo = "TC001_Reg";
            strtblname    = "automation_rosteradministration";
            strTestType   = "Regression";

            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_AddRosterAdmin");
            var connection     = new Database.ConnectToMySQL_Fetch_TestData();
            var testdataRoster = connection.Select(strtblname, strTestCaseNo, strTestType);
            var TopbarMenu     = new clsMainPage_TopbarMenu();

            var RosterAdministration = new clsRosterAdministration();

            TopbarMenu.NavigatetoRosterAdministration();

            String strTDRosterName         = testdataRoster[4];
            String strTDPane               = testdataRoster[5];
            String strTDTimeZoneorLocation = testdataRoster[6];
            String strTDTimeZone           = testdataRoster[7];
            String strTDLocation           = testdataRoster[8];
            String strTDPeople             = testdataRoster[9];
            String strTDShiftDetails       = testdataRoster[10];
            String strTDStatus             = testdataRoster[11];

            Console.WriteLine("RosterName" + strTDRosterName);

            RosterAdministration.AddRosterdetails(strTDRosterName, strTDPane, strTDTimeZoneorLocation, strTDTimeZone, strTDLocation, strTDPeople, strTDShiftDetails, strTDStatus);

            System.Threading.Thread.Sleep(2000);

            String[] rosterdetails = RosterAdministration.RetrieveRosterdetails(strTDRosterName);

            String strfbwebrostername = rosterdetails[0];
            String strfbwebpane       = rosterdetails[1];
            String strfbwebshifttypes = rosterdetails[2];
            String strfbwebstatus     = rosterdetails[3];

            try
            {
                Assert.AreEqual(strTDRosterName, strfbwebrostername);
                PropertiesCollection.test.Log(Status.Pass, strfbwebrostername + " Roster created Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebrostername + " Roster not created Succesfully");
            }
            try
            {
                Assert.AreEqual(strTDPane, strfbwebpane);
                PropertiesCollection.test.Log(Status.Pass, strfbwebpane + " Pane validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Pass, strfbwebpane + " Pane not validated Succesfully");
            }
            try
            {
                Assert.AreEqual(strTDShiftDetails, strfbwebshifttypes);
                PropertiesCollection.test.Log(Status.Pass, strfbwebshifttypes + " Shift Type Validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Pass, strfbwebshifttypes + " Shift Type not Validated Succesfully");
            }
            try
            {
                Assert.AreEqual(strTDStatus, strfbwebstatus);
                PropertiesCollection.test.Log(Status.Pass, strfbwebstatus + " Status validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Pass, strfbwebstatus + " Status not validated Succesfully");
            }
        }
示例#4
0
            public void TS03_TC02_RosterAdmin_AddRoster()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS03_TC02_RosterAdmin_AddRoster");
                String strtblname     = "automation_rosteradministration";
                var    connection     = new Database.ConnectToMySQL_Fetch_TestData();
                var    testdataRoster = connection.Select(strtblname, strTestCaseNo, strTestType);
                var    TopbarMenu     = new clsMainPage_TopbarMenu();

                var RosterAdministration = new clsRosterAdministration();

                TopbarMenu.NavigatetoRosterAdministration();

                String strTDRosterName         = testdataRoster[4];
                String strTDPane               = testdataRoster[5];
                String strTDTimeZoneorLocation = testdataRoster[6];
                String strTDTimeZone           = testdataRoster[7];
                String strTDLocation           = testdataRoster[8];
                String strTDPeople             = testdataRoster[9];
                String strTDShiftDetails       = testdataRoster[10];
                String strTDStatus             = testdataRoster[11];

                /********* Delete the Roster if its already present************/

                String[] rosterdetails1 = RosterAdministration.RetrieveRosterdetails(strTDRosterName);

                Console.WriteLine(rosterdetails1[0]);
                if (rosterdetails1[0].IsNullOrEmpty() == false)
                {
                    RosterAdministration.DeleteRosterdetails(rosterdetails1[0]);
                }

                /***************************************************************/

                RosterAdministration.AddRosterdetails(strTDRosterName, strTDPane, strTDTimeZoneorLocation, strTDTimeZone, strTDLocation, strTDPeople, strTDShiftDetails, strTDStatus);

                System.Threading.Thread.Sleep(6000);

                String[] rosterdetails = RosterAdministration.RetrieveRosterdetails(strTDRosterName);

                String strfbwebrostername = rosterdetails[0];
                String strfbwebpane       = rosterdetails[1];
                String strfbwebshifttypes = rosterdetails[2];
                String strfbwebstatus     = rosterdetails[3];

                try
                {
                    Assert.AreEqual(strTDRosterName, strfbwebrostername);
                    PropertiesCollection.test.Log(Status.Pass, "Roster Name: " + strfbwebrostername + " created and validated on Roster Admin Screen");
                }
                catch (AssertFailedException e)
                {
                    PropertiesCollection.test.Log(Status.Fail, "Roster Name is not matching");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDPane, strfbwebpane);
                    PropertiesCollection.test.Log(Status.Pass, "Pane: " + strfbwebpane + " created and validated on Roster Admin Screen");
                }
                catch (AssertFailedException e)
                {
                    PropertiesCollection.test.Log(Status.Fail, "Pane is not matching");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDShiftDetails, strfbwebshifttypes);
                    PropertiesCollection.test.Log(Status.Pass, "Shift Types: " + strfbwebrostername + " created and validated on Roster Admin Screen");
                }
                catch (AssertFailedException e)
                {
                    PropertiesCollection.test.Log(Status.Fail, "Shift Types is not matching");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDStatus, strfbwebstatus);
                    PropertiesCollection.test.Log(Status.Pass, "Roster : " + strfbwebrostername + " Status is validated ");
                }
                catch (AssertFailedException e)
                {
                    PropertiesCollection.test.Log(Status.Fail, "Roster Status is not matching");
                    throw;
                }
            }
        public void AddShiftAdmin()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_AddShiftAdmin");
            FpAdminMenus adminmenus = new FpAdminMenus();

            adminmenus.AdminClick();
            adminmenus.LnkShiftAdministration.Click();

            clsShiftAdministration shiftadmin = new clsShiftAdministration();

            strTestCaseNo = "TC001_Reg";
            strtblname    = "automation_shiftadministration";
            strTestType   = "Regression";

            var connection    = new Database.ConnectToMySQL_Fetch_TestData();
            var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType);

            string strTDShiftName  = testdataShift[4];
            string strTDShortCode  = testdataShift[5];
            string strTDStartTime  = testdataShift[6];
            string strTDDuration   = testdataShift[7];
            string strTDCurrencies = testdataShift[8];
            string strTDStatus     = testdataShift[9];

            shiftadmin.AddShiftdetails(strTDShiftName, strTDShortCode, strTDStartTime, strTDDuration, strTDCurrencies);
            string[] shiftdetails = shiftadmin.RetrieveShiftdetails(strTDShiftName);

            string strfbwebshiftname  = shiftdetails[0];
            string strfbwebshortcode  = shiftdetails[1];
            string strfbwebstarttime  = shiftdetails[2];
            string strfbwebDuration   = shiftdetails[3];
            string strfbwebCurrencies = shiftdetails[4];
            string strfbwebStatus     = shiftdetails[5];

            try {
                Assert.AreEqual(strTDShiftName, strfbwebshiftname);
                PropertiesCollection.test.Log(Status.Pass, strfbwebshiftname + " Shift created Succesfully");
            }
            catch {
                PropertiesCollection.test.Log(Status.Fail, strfbwebshiftname + " Shift not created Succesfully");
                throw;
            }
            try
            {
                Assert.AreEqual(strTDStartTime, strfbwebstarttime);
                PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Shift Start time validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Shift Start Time not validated Succesfully");
                throw;
            }
            try
            {
                Assert.AreEqual(strTDDuration, strfbwebDuration);
                PropertiesCollection.test.Log(Status.Pass, strfbwebDuration + " Shift Duration validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebDuration + " Shift Duration not validated Succesfully");
                throw;
            }
            try
            {
                Assert.AreEqual(strTDCurrencies, strfbwebCurrencies);
                PropertiesCollection.test.Log(Status.Pass, strfbwebDuration + " Shift Currencies validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebCurrencies + " Shift Currencies not validated Succesfully");
                throw;
            }
            try
            {
                Assert.AreEqual(strTDStatus, strfbwebStatus);
                PropertiesCollection.test.Log(Status.Pass, strfbwebDuration + " Shift Status validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebStatus + " Shift Status not validated Succesfully");
                throw;
            }
        }