示例#1
0
        public void EditRoom()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            #region CREATE THIS USING WEB SERVICES
            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("Rm60");
            schoolRoomPage.EnterLongName("Test for Room 60");
            schoolRoomPage.EnterTelephoneNo("9527725936");
            schoolRoomPage.EnterRoomArea("10000");
            schoolRoomPage.EnterMaxaxGroupSize("10000");
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved"));
            #endregion
            //Search room to edit
            SearchAndClickRoom(schoolRoomPage, "RM60", "Test for Room 60");
            //SearchResults.WaitForResults();
            ////Perform the actual test here i.e. Edit searched room
            schoolRoomPage.ReEnterShortName("ERM61");
            schoolRoomPage.ReEnterLongName("Test for Edit Room 61");
            schoolRoomPage.ReEnterTelephoneNo("9999999999");
            schoolRoomPage.ReEnterRoomArea("99999");
            schoolRoomPage.ReEnterMaxaxGroupSize("9999");
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved"));
            //Currently deleting the created room here itself in this test.
            schoolRoomPage.DeleteRoomRecord();
        }
示例#2
0
        public void ValidationDuplicateRoomLongName()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("TT1");
            schoolRoomPage.EnterLongName("DU Room Long Name");
            schoolRoomPage.Save();
            schoolRoomPage.WaitForCreateButttonToAppear();
            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.WaitForCancelButttonToAppear();
            schoolRoomPage.EnterShortName("TT2");
            schoolRoomPage.EnterLongName("DU Room Long Name");
            schoolRoomPage.Save();
            IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
            schoolRoomPage.ClickCancelButton();
            schoolRoomPage.ClickDontSaveButton();
            schoolRoomPage.EnterShortNameSearchPanel("TT1");
            schoolRoomPage.EnterLongNameSearchPanel("DU Room Long Name");
            schoolRoomPage.ClickSeachRoomButton();
            SearchResults.WaitForResults();
            schoolRoomPage.ClickSearchResults();
            schoolRoomPage.DeleteRoomRecord();
        }
示例#3
0
        public void RoomLongNameMaxFieldLength()
        {
            RoomPage schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.WaitForCancelButttonToAppear();
            Assert.IsTrue(schoolRoomPage.Longname.GetAttribute("maxlength") == "32");
        }
示例#4
0
        public void ValidationActiveCheck()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.WaitForCancelButttonToAppear();
            var checkbox = WebContext.WebDriver.FindElement(RoomElements.CheckBoxActive);

            Assert.That(checkbox.GetAttribute("checked") != null);
        }
示例#5
0
        public void ValidationRoomLongName()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("V20");
            schoolRoomPage.EnterLongName("");
            schoolRoomPage.Save();
            IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
示例#6
0
        public void ValidationInactiveCheck()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("INA09");
            schoolRoomPage.EnterLongName("Test for inactive 09");
            schoolRoomPage.UncheckActiveCheckBox();
            var includeInactiveRoomCheckbox = WebContext.WebDriver.FindElement(RoomElements.IncludeInactiveRooms);

            Assert.That(includeInactiveRoomCheckbox.GetAttribute("checked") == null);
        }
示例#7
0
        public void ValidationGroupSizeBelowLimit0()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("VA26");
            schoolRoomPage.EnterLongName("Group less than 0");
            schoolRoomPage.EnterMaxaxGroupSize("-1");
            schoolRoomPage.Save();
            IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
示例#8
0
        public void ValidationAreaBelowLimit()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("VA26");
            schoolRoomPage.EnterLongName("Area Exceed Limit");
            schoolRoomPage.EnterRoomArea("-1");
            schoolRoomPage.Save();
            IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
示例#9
0
        public void CreateRoom()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("CRM22");
            schoolRoomPage.EnterLongName("Test for Create Room 22");
            schoolRoomPage.EnterTelephoneNo("9527725936");
            schoolRoomPage.EnterRoomArea("10000");
            schoolRoomPage.EnterMaxaxGroupSize("10000");
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("school room record saved"));
            //Currently deleting the created room here itself in this test.
            SearchAndClickRoom(schoolRoomPage, "CRM22", "Test for Create Room 22");
            schoolRoomPage.DeleteRoomRecord();
        }
示例#10
0
        public void CreateInactiveRoom()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("INA09");
            schoolRoomPage.EnterLongName("Test for inactive 09");
            schoolRoomPage.UncheckActiveCheckBox();
            var includeInactiveRoomCheckbox = WebContext.WebDriver.FindElement(RoomElements.IncludeInactiveRooms);

            Assert.That(includeInactiveRoomCheckbox.GetAttribute("checked") == null);
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("school room record saved"));
            //Currently deleting the created room here itself in this test.
            schoolRoomPage.DeleteRoomRecord();
        }
示例#11
0
        public void SearchRoomByShortName()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            #region CREATE THIS USING WEB SERVICES
            //CREATE ROOM TO SEARCH
            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("SRT00");
            schoolRoomPage.EnterLongName("Search RM Short Name 00");
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved"));
            #endregion
            //Actual test i.e. Search the room by Room Short Name by created by the Web Service
            schoolRoomPage.EnterShortNameSearchPanel("SRT00");
            schoolRoomPage.ClickSeachRoomButton();
            SearchResults.WaitForResults();
            Assert.IsTrue(SearchResults.HasResults(1));
            //Currently deleting the created room here itself in this test.
            schoolRoomPage.DeleteRoomRecord();
        }
示例#12
0
        public void DeleteRoom()
        {
            var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage();

            #region CREATE THIS USING WEB SERVICES
            schoolRoomPage.CreateSchoolRoom();
            schoolRoomPage.EnterShortName("DL88");
            schoolRoomPage.EnterLongName("Test for Delete Room 88");
            schoolRoomPage.EnterTelephoneNo("9527725936");
            schoolRoomPage.EnterRoomArea("10000");
            schoolRoomPage.EnterMaxaxGroupSize("10000");
            schoolRoomPage.Save();
            Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved"));
            #endregion
            schoolRoomPage.DeleteRoomRecord();
            schoolRoomPage.EnterShortNameSearchPanel("DL88");
            schoolRoomPage.EnterLongNameSearchPanel("Test for Delete Room 88");
            schoolRoomPage.ClickSeachRoomButton();
            Assert.IsTrue(SearchResults.HasResults(0));
        }