Exemple #1
0
        public void OpenedBookingSmokeTest()
        {
            //•	Record E - A name record with an open booking
            Toolbar toolbar = new Toolbar(Toolbar.getPath());
            toolbar.WaitUntilLoads();
            toolbar.OpenNames();

            NamesTable namesTable = new NamesTable(NamesTable.getPath());
            namesTable.AddInmate(inmateRecordE, "10101987", "M");
            namesTable.Close();

            toolbar.StartBooking();
            NameQuickSearch inmateNameQuickSearch = new NameQuickSearch(NameQuickSearch.getPath());
            inmateNameQuickSearch.LastNameQuickSearchTextBox.TextValue = inmateRecordE;
            inmateNameQuickSearch.SearchButton.Click();
            inmateNameQuickSearch.FindCell(inmateRecordE).Click();
            inmateNameQuickSearch.SelectNameButton.Click();
        
            StartBooking startBooking = new StartBooking(StartBooking.getPath());
            startBooking.StartNewButton.Click();
            startBooking.LocationTextBox.PressKeys("Block A Cell FP1-1");
            startBooking.LocationTextBox.PressKeys("{enter}");
            startBooking.ProceedButton.Click();

            Validate.Exists(BookingChecklist.getPath(), _searchTime);
            BookingChecklist bookingChecklist = new BookingChecklist(BookingChecklist.getPath());
            Assert.AreEqual(bookingChecklist.LastNameText.TextValue, inmateRecordE);

            toolbar.StartBooking();

            inmateNameQuickSearch = new NameQuickSearch(NameQuickSearch.getPath());
            inmateNameQuickSearch.LastNameQuickSearchTextBox.TextValue = inmateRecordE;
            inmateNameQuickSearch.SearchButton.Click();
            inmateNameQuickSearch.FindCell(inmateRecordE).Click();
            inmateNameQuickSearch.SelectNameButton.Click();

            //VALIDATE:
            SpillmanMessageBox msgBox = new SpillmanMessageBox(SpillmanMessageBox.getPath());
            Assert.IsTrue(msgBox.Visible);

            msgBox.ViewButton.Click();

            //VALIDATE:The Booking screen opens to the booking record for Record E. 
            Validate.Exists(Booking.getPath(), _searchTime);
            Booking booking = new Booking(Booking.getPath());

            booking.LastNameText.Click();
            Assert.That(booking.LastNameText.Visible);
            Assert.That(booking.LastNameText.Enabled);
            Assert.AreEqual(booking.LastNameText.TextValue, inmateRecordE);


        }
Exemple #2
0
        public void BookingJuvenileSmokeTest()
        {
            //•	Record B - A name record where the DOB places the individual under the Module.Jail.adultAge setting (18)
            Toolbar toolbar = new Toolbar(Toolbar.getPath());
            toolbar.WaitUntilLoads();   
            toolbar.OpenNames();

            NamesTable namesTable = new NamesTable(NamesTable.getPath());
            namesTable.AddInmate(inmateRecordB,"10102005","M");
            namesTable.Close();

            //Test Step: Start a new booking for Record B. 
            toolbar.StartBooking();

            Validate.Exists(NameQuickSearch.getPath(), _searchTime);
            NameQuickSearch inmateNameQuickSearch = new NameQuickSearch(NameQuickSearch.getPath());
            inmateNameQuickSearch.LastNameQuickSearchTextBox.TextValue = inmateRecordB;
            inmateNameQuickSearch.SearchButton.Click();
            inmateNameQuickSearch.FindCell(inmateRecordB).Click();
            inmateNameQuickSearch.SelectNameButton.Click();

            StartBooking startBooking = new StartBooking(StartBooking.getPath());
            startBooking.StartNewButton.Click();
            
            //VALIDATE:The Juvenile Instructions dialog opens and shows the text you added in setup. 
            SpillmanMessageBox msgBox = new SpillmanMessageBox(SpillmanMessageBox.getPath());
            Assert.IsTrue(msgBox.Visible);
            Assert.IsTrue(msgBox.HasText("This person is a juvenile"));

            msgBox.Close();
            startBooking.Close();
        }