public void TC06_RosterAdmin_DeleteRoster()
        {
            string[] list;
            var      connection = new ConnectToMySQL_Fetch_TestData();

            list = connection.Select(strtblname, strTestCaseNo, strTestType);
            var TopbarMenu           = new clsMainPage_TopbarMenu();
            var RosterAdministration = new clsRosterAdministration();

            TopbarMenu.NavigatetoRosterAdministration();
            RosterAdministration.DeleteRosterdetails(list[4]);
        }
Esempio n. 2
0
        public void DeleteRosterAdmin()
        {
            string strTestCaseNo = "TC004_Reg";

            strTestType = "Regression";
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC04_DeleteRosterAdmin");
            string[] list;
            var      connection = new ConnectToMySQL_Fetch_TestData();

            list = connection.Select(strtblname, strTestCaseNo, strTestType);
            var TopbarMenu           = new clsMainPage_TopbarMenu();
            var RosterAdministration = new clsRosterAdministration();

            TopbarMenu.NavigatetoRosterAdministration();
            RosterAdministration.DeleteRosterdetails(list[4]);
        }
Esempio n. 3
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;
                }
            }