Esempio n. 1
0
            public void AddActivityType()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_AddActivityType");
                FpActivityTypesPage activityTypesPage = new FpActivityTypesPage();

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

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

                string strTDShortCode        = testdataActivityBoard[3];
                string strTDActivityTypeName = testdataActivityBoard[4];
                string strTDColour           = testdataActivityBoard[5];

                activityTypesPage.AddActivitydetails(strTDShortCode, strTDActivityTypeName, strTDColour);

                Thread.Sleep(5000);
                string[] strFPActivityName = activityTypesPage.RetrieveActivitydetails(strTDActivityTypeName);

                try
                {
                    Assert.AreEqual(strFPActivityName[1], strTDActivityTypeName);
                    PropertiesCollection.test.Log(Status.Pass, "ADD ACTIVITY TYPE => Activity Type: " + strTDActivityTypeName + " created and validated");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "ADD ACTIVITY TYPE => Activity Type creation has failed");
                }
            }
Esempio n. 2
0
            public void DeleteActivityType()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC05_DeleteActivityType");
                FpActivityTypesPage activityTypesPage = new FpActivityTypesPage();

                strTestCaseNo = "TC005_Reg";
                strtblname    = "automation_activitytype";
                strTestType   = "Regression";

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

                strTDActivityTypeName = testdataActivityBoard[4];

                activityTypesPage.DeleteActivity(strTDActivityTypeName);
                string[] strActivityTypesName = activityTypesPage.RetrieveActivitydetails(strTDActivityTypeName);
                Console.WriteLine("Activity type name retrieved from web is: " + strActivityTypesName[1]);

                Thread.Sleep(4000);

                try
                {
                    Assert.AreNotEqual(strActivityTypesName[1], strTDActivityTypeName);
                    PropertiesCollection.test.Log(Status.Pass, "DELETE ACTIVITY TYPE => Acitivity type: " + strTDActivityTypeName + " has been deleted successfully.");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "DELETE ACTIVITY TYPE => Acitivity type: " + strTDActivityTypeName + "  Deletion has failed");
                }
            }
Esempio n. 3
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;
                }
            }
Esempio n. 4
0
           public void TS05_PlanningBoard_TC01_AddActivityTypes()
           {
               PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC01_AddActivityTypes");

               FpActivityTypesPage ActivityTypes = new FpActivityTypesPage();

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

                string strTDActivityShortCode = String.Empty;
                string strTDActivityName = String.Empty;
                string strTDActivityColour = String.Empty;

                /* Get test data from MySQL */

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

                strTDActivityShortCode = testdataActivityTypes[3];
                strTDActivityName = testdataActivityTypes[4];
                strTDActivityColour = testdataActivityTypes[5];

                ActivityTypes.AddActivitydetails(strTDActivityShortCode, strTDActivityName, strTDActivityColour);
                 //ActivityTypes.AddActivitydetails(strTDActivityShortCode, strTDActivityName);
                String[] strFPwebActivityName = ActivityTypes.RetrieveActivitydetails(strTDActivityName);

                try
                {
                    Assert.AreEqual(strTDActivityName, strFPwebActivityName[1]);
                    PropertiesCollection.test.Log(Status.Pass, "Activity: " + strFPwebActivityName[1] + " created and validated");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Activity Name: " + strTDActivityName +"and" + strFPwebActivityName[1] + "is not matching");
                    throw;
                }

            }