public void TC03_FPWeb_Admin_Rostering_ShiftAdministration() { clsLoginPage loginPage = new clsLoginPage(); loginPage.LoginPage(); var TopbarMenu = new clsMainPage_TopbarMenu(); TopbarMenu.NavigatetoShiftAdministration(); var ShiftAdministration = new clsShiftAdministration(); ShiftAdministration.AddShiftdetails("Night", "N", "08:00", "9:00", "BFM"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.EditShiftdetails("Night", "12:00"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.CopyShiftdetails("Night", "Night-Copy", "11:00"); TopbarMenu.NavigatetoShiftAdministration(); ShiftAdministration.DeleteShiftdetails("Night"); // TopbarMenu.Logout(); }
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 TS03_TC01_ShiftAdmin_Addshift() { PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS03_TC01_Smoke_ShiftAdmin_Addshift"); var connection = new ConnectToMySQL_Fetch_TestData(); var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType); var TopbarMenu = new clsMainPage_TopbarMenu(); var ShiftAdministration = new clsShiftAdministration(); TopbarMenu.NavigatetoShiftAdministration(); String strTDShiftName = testdataShift[4]; String strTDShortCode = testdataShift[5]; String strTDStartTime = testdataShift[6]; String strTDDuration = testdataShift[7]; String strTDCurrencies = testdataShift[8]; String strTDStatus = testdataShift[9]; /********* Move to Roster and check if the 'Exit Edit' is enabled***********/ /********* Delete the shift if its already present********/ String[] shiftdetails1 = ShiftAdministration.RetrieveShiftdetails(strTDShiftName); Console.WriteLine(shiftdetails1[0]); if (shiftdetails1[0].IsNullOrEmpty() == false) { ShiftAdministration.DeleteShiftdetails(shiftdetails1[0]); } /**********************************************************/ ShiftAdministration.AddShiftdetails(strTDShiftName, strTDShortCode, strTDStartTime, strTDDuration, strTDCurrencies); String[] shiftdetails = ShiftAdministration.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, "Shift Name: " + strfbwebshiftname + " created and validated"); } catch { PropertiesCollection.test.Log(Status.Fail, "Shift Name is not matching"); throw; } try { Assert.AreEqual(strTDStartTime, strfbwebstarttime); PropertiesCollection.test.Log(Status.Pass, "Shift Start time: " + strfbwebstarttime + " created and validated on Shift Admin Screen"); } catch { PropertiesCollection.test.Log(Status.Fail, "Shift Start time is not matching on Shift Admin screen"); throw; } try { Assert.AreEqual(strTDDuration, strfbwebDuration); PropertiesCollection.test.Log(Status.Pass, "Shift Duration: " + strfbwebDuration + " created and validated on Shift Admin Screen"); } catch { PropertiesCollection.test.Log(Status.Fail, "Shift Duration is not matching on Shift Admin screen"); throw; } try { Assert.AreEqual(strTDCurrencies, strfbwebCurrencies); PropertiesCollection.test.Log(Status.Pass, "Currency: " + strfbwebCurrencies + " created and validated on Shift Admin Screen"); } catch { PropertiesCollection.test.Log(Status.Fail, "Currencies are not matching on Shift Admin screen"); throw; } try { Assert.AreEqual(strTDStatus, strfbwebStatus); PropertiesCollection.test.Log(Status.Pass, "Shift Status Active?: " + strfbwebStatus + " created and validated on Shift Admin screen"); } catch { PropertiesCollection.test.Log(Status.Fail, "Shift Status is not matching"); throw; } }