public void TS01_TC06_ValidateActivityTypesAdminMenu()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC06_ValidateActivityTypesAdminMenu");

                /* Validate Activity Types Page */

                FpAdminMenus AdminMenu = new FpAdminMenus();

                AdminMenu.AdminClick();
                AdminMenu.ActivityTypesClick();
                System.Threading.Thread.Sleep(30000);
                FpActivityTypesPage ActivityTypes = new FpActivityTypesPage();

                PropertiesCollection.driver.SwitchTo().Frame(ActivityTypes.frame);

                try
                {
                    Assert.IsTrue(ActivityTypes.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Activity Types Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Activity Types Page not loaded");
                    throw;
                }
            }
        public void NavigateShiftAdminBeforeSave()
        {
            strTestCaseNo = "TC006_Reg";
            strtblname    = "automation_shiftadministration";
            strTestType   = "Regression";

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

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

            clsShiftAdministration shiftadmin = new clsShiftAdministration();

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

            strShiftName = testdataShift[4];

            shiftadmin.NavigateShiftAdminBeforeSave(strShiftName);
            adminmenus.AdminClick();
            adminmenus.LnkShiftAdministration.Click();
            if (shiftadmin.btnConfirmationOK.Displayed == true && shiftadmin.btnConfirmationOK.Enabled == true)
            {
                shiftadmin.btnConfirmationOK.Click();
            }
        }
        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 CopyShiftAdmin()
        {
            strTestCaseNo = "TC004_Reg";
            strtblname    = "automation_shiftadministration";
            strTestType   = "Regression";

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

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

            clsShiftAdministration shiftadmin = new clsShiftAdministration();

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

            strShiftName = testdataShift[4];

            shiftadmin.CopyShiftdetails(strShiftName);
            string[] shiftdetails = shiftadmin.RetrieveShiftdetails(strShiftName + " (Copy)");

            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(strShiftName + " (Copy)", strfbwebshiftname);
                PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Name validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Name not validated Succesfully");
            }
            try
            {
                Assert.AreEqual(strUpdatedStartdate, strfbwebstarttime);
                PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Start Date validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Start Date not validated Succesfully");
            }
            try
            {
                Assert.AreEqual(strUpdatedDuration, strfbwebDuration);
                PropertiesCollection.test.Log(Status.Pass, strfbwebstarttime + " Copied Shift Duration validated Succesfully");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, strfbwebstarttime + " Copied Shift Duration not validated Succesfully");
            }
            Thread.Sleep(4000);
        }
        public void AddTemplates()
        {
            strTestCaseNo = "TC001";
            strtblname    = "automation_templates";
            strTestType   = "Regression";
            var AdminMenus = new FpAdminMenus();

            AdminMenus.AdminClick();
            AdminMenus.TemplatesClick();
        }
Example #6
0
            public void TS05_PlanningBoard_TC08_DeleteActivityType()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC08_DeleteActivityType");

                FpAdminMenus AdminMenu = new FpAdminMenus();
                AdminMenu.AdminClick();
                AdminMenu.ActivityTypesClick();
                System.Threading.Thread.Sleep(30000);
                System.Threading.Thread.Sleep(30000);
                FpActivityTypesPage ActivityTypes = new FpActivityTypesPage();
                PropertiesCollection.driver.SwitchTo().Frame(ActivityTypes.frame);
                              

                String strTestCaseNo = "TC001";
                String strtblname = "automation_activitytype";
                String strTestType = "Smoke";

                string strTDActivityName = String.Empty;


                /* Get test data from MySQL */

                var connection = new ConnectToMySQL_Fetch_TestData();
                var testdataActivityTypes = connection.Select(strtblname, strTestCaseNo, strTestType);
                                               
                strTDActivityName = testdataActivityTypes[4];
                ActivityTypes.DeleteActivity(strTDActivityName);
                
                String[] Activitydetails = ActivityTypes.RetrieveActivitydetails(strTDActivityName);
                String strFPwebActivityName = Activitydetails[1];
                Console.WriteLine(strFPwebActivityName);
                try
                {

                    Assert.IsNull(strFPwebActivityName);
                    PropertiesCollection.test.Log(Status.Pass, "Activity Type is deleted on Activity Types Admin screen");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Activity Type not deleted");
                    throw;
                }
            }
Example #7
0
            public void TS05_PlanningBoard_TC07_DeletePlanningBoard()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC07_DeletePlanningBoard");

                FpAdminMenus AdminMenu = new FpAdminMenus();
                AdminMenu.AdminClick();
                AdminMenu.DefinePlanningBoardsClick();
                System.Threading.Thread.Sleep(30000);
                FpDefinePlanningBoardsPage PlanningBoard = new FpDefinePlanningBoardsPage();
                PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.frame);

                String strTestCaseNo = "TC001";
                String strtblname = "automation_defineplanningboard";
                String strTestType = "Smoke";

                /* Get test data from MySQL */

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

                string strTDPlanningBoardName = testdataDefinePlanningBoard[3];
                string strTDOrganisationGroup = testdataDefinePlanningBoard[5];

                PlanningBoard.DeletePlanningBoard(strTDPlanningBoardName, strTDOrganisationGroup);


                String[] PlanningBoarddetails = PlanningBoard.RetrievePlanningBoarddetails(strTDPlanningBoardName);

                String strFPwebPlanningBoardName = PlanningBoarddetails[1];

                try
                {

                    Assert.IsNull(strFPwebPlanningBoardName);
                    PropertiesCollection.test.Log(Status.Pass, "Planning Board is deleted on Define Planning Board Admin screen");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Planning Board not deleted");
                    throw;
                }

            }
        public void DeleteShiftAdmin()
        {
            strTestCaseNo = "TC005_Reg";
            strtblname    = "automation_shiftadministration";
            strTestType   = "Regression";

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

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

            clsShiftAdministration shiftadmin = new clsShiftAdministration();

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

            strShiftName = testdataShift[4];

            shiftadmin.DeleteShiftdetails(strShiftName);
            shiftadmin.DeleteShiftdetails(strShiftName + " (Copy)");
        }
            public void TS01_TC02_ValidateFlightProAdminMenus()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC02_ValidateFlightProAdminMenus");

                /* Validate Strip Sub Groups Page */

                FpAdminMenus AdminMenu = new FpAdminMenus();

                AdminMenu.AdminClick();
                AdminMenu.StripSubGroupsClick();
                System.Threading.Thread.Sleep(30000);
                FpStripSubGroupsPage StripSubGroups = new FpStripSubGroupsPage();

                try
                {
                    Assert.IsTrue(StripSubGroups.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Strip Sub Groups Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Strip Sub Groups Page not loaded");
                    throw;
                }

                /* Validate Catalogue Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.CatalogueAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpCatalogueAdministrationPage CatalogueAdministration = new FpCatalogueAdministrationPage();

                try
                {
                    Assert.IsTrue(CatalogueAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Catalogue Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Catalogue Administration Page not loaded");
                    throw;
                }

                /* Validate Organisation Group Settings Page */

                AdminMenu.AdminClick();
                AdminMenu.OrganisationGroupSettingsClick();
                System.Threading.Thread.Sleep(30000);
                FpOrganisationGroupSettingsPage OrganisationGroupSettings = new FpOrganisationGroupSettingsPage();

                try
                {
                    Assert.IsTrue(OrganisationGroupSettings.IsTitleDisplayed());
                    PropertiesCollection.test.Log(Status.Pass, "Organisation Group Settings Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Organisation Group Settings Page not loaded");
                    throw;
                }

                /* Validate Budget Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.BudgetAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpBudgetAdministrationPage BudgetAdministration = new FpBudgetAdministrationPage();

                try
                {
                    Assert.IsTrue(BudgetAdministration.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Budget Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Budget Administration Page not loaded");
                    throw;
                }

                /* Validate Asset Type Settings Page */

                AdminMenu.AdminClick();
                AdminMenu.AssetTypeSettingsClick();
                System.Threading.Thread.Sleep(30000);
                FpAssetTypeSettingsPage AssetTypeSettings = new FpAssetTypeSettingsPage();

                try
                {
                    Assert.IsTrue(AssetTypeSettings.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Asset Type Settings Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Asset Type Settings Page not loaded");
                    throw;
                }

                /* Validate Asset Type Systems Page */

                System.Threading.Thread.Sleep(30000);
                AdminMenu.AdminClick();
                AdminMenu.AssetTypeSystemsClick();
                System.Threading.Thread.Sleep(30000);
                FpAssetTypeSystemsPage AssetTypeSystems = new FpAssetTypeSystemsPage();

                try
                {
                    Assert.IsTrue(AssetTypeSystems.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Asset Type Systems Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Asset Type Systems Page not loaded");
                    throw;
                }

                /* Validate Roster Administration Page */


                AdminMenu.AdminClick();
                AdminMenu.RosterAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpRosterAdministrationPage RosterAdministration = new FpRosterAdministrationPage();

                try
                {
                    Assert.IsTrue(RosterAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Roster Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Roster Administration Page not loaded");
                    throw;
                }

                /* Validate Shift Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.ShiftAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpShiftAdministrationPage ShiftAdministration = new FpShiftAdministrationPage();

                try
                {
                    Assert.IsTrue(ShiftAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Shift Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Shift Administration Page not loaded");
                    throw;
                }

                /* Validate Templates Page */

                AdminMenu.AdminClick();
                AdminMenu.TemplatesClick();
                System.Threading.Thread.Sleep(30000);
                FpTemplatesPage Templates = new FpTemplatesPage();

                try
                {
                    Assert.IsTrue(Templates.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Templates Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Templates Page not loaded");
                    throw;
                }

                /* Validate Syllabi Page */

                AdminMenu.AdminClick();
                AdminMenu.SyllabiClick();
                System.Threading.Thread.Sleep(30000);
                FpSyllabiPage Syllabi = new FpSyllabiPage();

                try
                {
                    Assert.IsTrue(Syllabi.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Syllabi Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Syllabi Page not loaded");
                    throw;
                }

                /* Validate Courses Page */

                AdminMenu.AdminClick();
                AdminMenu.CoursesClick();
                System.Threading.Thread.Sleep(30000);
                FpCoursesPage Courses = new FpCoursesPage();

                try
                {
                    Assert.IsTrue(Courses.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Courses Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Courses Page not loaded");
                    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;
            }
        }