Overview

Namespaces

  • Azalea
    • Selenium
      • App
        • Charts
        • Components
        • Encounters
        • Home
        • Login
        • Main
        • Messages
        • Patients
        • Scheduler
      • Core
      • EHR
        • UI
          • Charts
          • Documents
          • Encounters
          • Home
          • Messaging
            • Folders
          • Patients
          • Payments
          • Precerts
          • Reports
          • Scheduler
          • Settings
            • General
              • Locations
              • Roles
              • Users
        • User
      • Login
        • UI
      • PHR
        • UI
        • User
      • Toolkit
        • Exception
        • Validation
    • Util
  • None
  • tests
    • integration
      • barebones
        • controllers
          • charts
          • patients
          • system
        • models
          • billing
          • encounters
          • examples
          • messaging
          • rcm
          • system
    • unit
      • barebones
        • lib
        • utilities
          • calculations

Classes

  • AddPatientTest
  • Azalea\Selenium\App\ApplicationTestCase
  • Azalea\Selenium\App\Charts\Chart
  • Azalea\Selenium\App\Charts\ChartAssessment
  • Azalea\Selenium\App\Charts\ChartDiagnosisCodes
  • Azalea\Selenium\App\Charts\ChartListControls
  • Azalea\Selenium\App\Charts\ChartObjective
  • Azalea\Selenium\App\Charts\ChartProcedureCodes
  • Azalea\Selenium\App\Charts\Charts
  • Azalea\Selenium\App\Charts\ChartSubjective
  • Azalea\Selenium\App\Components\CodeLookup
  • Azalea\Selenium\App\Components\CollectionGrid
  • Azalea\Selenium\App\Components\Popup
  • Azalea\Selenium\App\Customers
  • Azalea\Selenium\App\Encounters\Encounter
  • Azalea\Selenium\App\Encounters\EncounterDiagnosisCodes
  • Azalea\Selenium\App\Encounters\EncounterLedger
  • Azalea\Selenium\App\Encounters\EncounterProcedureCodes
  • Azalea\Selenium\App\Encounters\Encounters
  • Azalea\Selenium\App\Home\Home
  • Azalea\Selenium\App\Login\LoginPage
  • Azalea\Selenium\App\Main\MainSearch
  • Azalea\Selenium\App\Messages\Messages
  • Azalea\Selenium\App\Patients
  • Azalea\Selenium\App\Patients\Patient
  • Azalea\Selenium\App\Patients\PatientCharts
  • Azalea\Selenium\App\Patients\PatientEditDemographicsForm
  • Azalea\Selenium\App\Patients\PatientEncounters
  • Azalea\Selenium\App\Patients\PatientFaker
  • Azalea\Selenium\App\Patients\PatientList
  • Azalea\Selenium\App\Patients\PatientListFilters
  • Azalea\Selenium\App\Patients\Patients
  • Azalea\Selenium\App\Providers
  • Azalea\Selenium\App\Scheduler\AppointmentPopup
  • Azalea\Selenium\App\Scheduler\Scheduler
  • Azalea\Selenium\App\Users
  • Azalea\Selenium\Core\BaseTestCase
  • Azalea\Selenium\Core\Browser
  • Azalea\Selenium\Core\Page
  • Azalea\Selenium\Core\User
  • Azalea\Selenium\Core\View
  • Azalea\Selenium\Core\WebDriver
  • Azalea\Selenium\EHR\Application
  • Azalea\Selenium\EHR\EHR
  • Azalea\Selenium\EHR\EHRTestCase
  • Azalea\Selenium\EHR\EMR
  • Azalea\Selenium\EHR\PM
  • Azalea\Selenium\EHR\UI\Charts\ChartsList
  • Azalea\Selenium\EHR\UI\Charts\ChartsListRow
  • Azalea\Selenium\EHR\UI\Charts\ChartsListTab
  • Azalea\Selenium\EHR\UI\CheckboxGrid
  • Azalea\Selenium\EHR\UI\Documents\Documents
  • Azalea\Selenium\EHR\UI\Documents\DocumentsTab
  • Azalea\Selenium\EHR\UI\Encounters\Encounters
  • Azalea\Selenium\EHR\UI\Encounters\EncountersTab
  • Azalea\Selenium\EHR\UI\Grid
  • Azalea\Selenium\EHR\UI\GridRow
  • Azalea\Selenium\EHR\UI\Heading
  • Azalea\Selenium\EHR\UI\Home\Home
  • Azalea\Selenium\EHR\UI\Home\OfficeOverview
  • Azalea\Selenium\EHR\UI\LockScreen
  • Azalea\Selenium\EHR\UI\MainMenu
  • Azalea\Selenium\EHR\UI\MainSearch
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingAllMail
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingInbox
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingSentMail
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingStarred
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingTrashed
  • Azalea\Selenium\EHR\UI\Messaging\Messaging
  • Azalea\Selenium\EHR\UI\Messaging\MessagingCompose
  • Azalea\Selenium\EHR\UI\Messaging\MessagingFolder
  • Azalea\Selenium\EHR\UI\Messaging\MessagingMenu
  • Azalea\Selenium\EHR\UI\Messaging\MessagingReply
  • Azalea\Selenium\EHR\UI\Messaging\MessagingTab
  • Azalea\Selenium\EHR\UI\Messaging\MessagingViewMessage
  • Azalea\Selenium\EHR\UI\Module
  • Azalea\Selenium\EHR\UI\Notifications
  • Azalea\Selenium\EHR\UI\Patients\ChartsListRow
  • Azalea\Selenium\EHR\UI\Patients\ChartsTab
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergies
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergyEditPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergySearchPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientAppointments
  • Azalea\Selenium\EHR\UI\Patients\PatientAssembly
  • Azalea\Selenium\EHR\UI\Patients\PatientCharts
  • Azalea\Selenium\EHR\UI\Patients\PatientChartsList
  • Azalea\Selenium\EHR\UI\Patients\PatientComments
  • Azalea\Selenium\EHR\UI\Patients\PatientDashboard
  • Azalea\Selenium\EHR\UI\Patients\PatientDemographics
  • Azalea\Selenium\EHR\UI\Patients\PatientDemographicsPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientDocuments
  • Azalea\Selenium\EHR\UI\Patients\PatientDocumentsList
  • Azalea\Selenium\EHR\UI\Patients\PatientEncounters
  • Azalea\Selenium\EHR\UI\Patients\PatientEncountersAddPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientHandouts
  • Azalea\Selenium\EHR\UI\Patients\PatientInsurance
  • Azalea\Selenium\EHR\UI\Patients\PatientLabOrders
  • Azalea\Selenium\EHR\UI\Patients\PatientLabOrdersAddView
  • Azalea\Selenium\EHR\UI\Patients\PatientMedications
  • Azalea\Selenium\EHR\UI\Patients\PatientPortal
  • Azalea\Selenium\EHR\UI\Patients\PatientRecalls
  • Azalea\Selenium\EHR\UI\Patients\Patients
  • Azalea\Selenium\EHR\UI\Patients\PatientSearchPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientSection
  • Azalea\Selenium\EHR\UI\Patients\PatientSidebar
  • Azalea\Selenium\EHR\UI\Patients\PatientsList
  • Azalea\Selenium\EHR\UI\Patients\PatientsListRow
  • Azalea\Selenium\EHR\UI\Patients\PatientsListTab
  • Azalea\Selenium\EHR\UI\Patients\PatientsTab
  • Azalea\Selenium\EHR\UI\Patients\PatientTab
  • Azalea\Selenium\EHR\UI\Patients\PatientTasks
  • Azalea\Selenium\EHR\UI\Patients\PatientVitals
  • Azalea\Selenium\EHR\UI\Patients\PatientVitalsAddPopup
  • Azalea\Selenium\EHR\UI\Payments\EDIRemitsTab
  • Azalea\Selenium\EHR\UI\Payments\Payments
  • Azalea\Selenium\EHR\UI\Payments\PaymentsTab
  • Azalea\Selenium\EHR\UI\Payments\UnappliedPaymentsTab
  • Azalea\Selenium\EHR\UI\Popup
  • Azalea\Selenium\EHR\UI\PopupConfirm
  • Azalea\Selenium\EHR\UI\PopupError
  • Azalea\Selenium\EHR\UI\Precerts\Precerts
  • Azalea\Selenium\EHR\UI\Precerts\PrecertsTab
  • Azalea\Selenium\EHR\UI\Reports\AuditLogTab
  • Azalea\Selenium\EHR\UI\Reports\ClinicalQualityMeasuresTab
  • Azalea\Selenium\EHR\UI\Reports\ClinicalQualityMeasuresValueSetsTab
  • Azalea\Selenium\EHR\UI\Reports\MeaningfulUseTab
  • Azalea\Selenium\EHR\UI\Reports\PatientStatementsTab
  • Azalea\Selenium\EHR\UI\Reports\RecordsTab
  • Azalea\Selenium\EHR\UI\Reports\Reports
  • Azalea\Selenium\EHR\UI\Reports\ReportsQueueTab
  • Azalea\Selenium\EHR\UI\Reports\ReportsTab
  • Azalea\Selenium\EHR\UI\Reports\SystemStatisticsTab
  • Azalea\Selenium\EHR\UI\Scheduler\AppointmentsRequestsTab
  • Azalea\Selenium\EHR\UI\Scheduler\AppointmentsTab
  • Azalea\Selenium\EHR\UI\Scheduler\RecallsTab
  • Azalea\Selenium\EHR\UI\Scheduler\Scheduler
  • Azalea\Selenium\EHR\UI\Scheduler\SchedulerTab
  • Azalea\Selenium\EHR\UI\SelectDropdown
  • Azalea\Selenium\EHR\UI\Settings\BillingTab
  • Azalea\Selenium\EHR\UI\Settings\General\GroupsSection
  • Azalea\Selenium\EHR\UI\Settings\General\HandoutsSection
  • Azalea\Selenium\EHR\UI\Settings\General\InsurancesSection
  • Azalea\Selenium\EHR\UI\Settings\General\Locations\LocationRow
  • Azalea\Selenium\EHR\UI\Settings\General\Locations\LocationsList
  • Azalea\Selenium\EHR\UI\Settings\General\LocationsSection
  • Azalea\Selenium\EHR\UI\Settings\General\ProvidersSection
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RoleCreatePopup
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RoleRow
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RolesList
  • Azalea\Selenium\EHR\UI\Settings\General\RolesSection
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UserDetails
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UserRow
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UsersList
  • Azalea\Selenium\EHR\UI\Settings\General\UsersSection
  • Azalea\Selenium\EHR\UI\Settings\GeneralTab
  • Azalea\Selenium\EHR\UI\Settings\InventoryTab
  • Azalea\Selenium\EHR\UI\Settings\MedicalTab
  • Azalea\Selenium\EHR\UI\Settings\PatientTab
  • Azalea\Selenium\EHR\UI\Settings\SchedulerTab
  • Azalea\Selenium\EHR\UI\Settings\Settings
  • Azalea\Selenium\EHR\UI\TabContainer
  • Azalea\Selenium\EHR\UI\TabPanel
  • Azalea\Selenium\EHR\UI\UserAccountMenu
  • Azalea\Selenium\EHR\User\EHRAdminTestingUser
  • Azalea\Selenium\EHR\User\EMRAdminTestingUser
  • Azalea\Selenium\EHR\User\PMAdminTestingUser
  • Azalea\Selenium\Login\LoginPage
  • Azalea\Selenium\Login\LoginTestCase
  • Azalea\Selenium\Login\ResetPasswordPage
  • Azalea\Selenium\Login\UI\LoginForm
  • Azalea\Selenium\Login\UI\ResetPasswordForm
  • Azalea\Selenium\PHR\Application
  • Azalea\Selenium\PHR\PHR
  • Azalea\Selenium\PHR\PHRTestCase
  • Azalea\Selenium\PHR\UI\PopupError
  • Azalea\Selenium\PHR\User\PHRTestingUser
  • Azalea\Selenium\Toolkit\Dom
  • Azalea\Selenium\Toolkit\NestedHashMap
  • Azalea\Selenium\Toolkit\ResourceLoader
  • Azalea\Selenium\Toolkit\SauceLabsTestCase
  • Azalea\Selenium\Toolkit\SeleniumTestCase
  • Azalea\Selenium\Toolkit\TestCase
  • Azalea\Selenium\Toolkit\Validation\ElementExists
  • Azalea\Selenium\Toolkit\Validation\ElementHasText
  • Azalea\Selenium\Toolkit\Validation\ElementVisible
  • Azalea\Selenium\Toolkit\Validation\PageTitle
  • Azalea\Selenium\Toolkit\Validation\ValidationRule
  • Azalea\Selenium\Toolkit\Validation\ViewExists
  • Azalea\Selenium\Toolkit\Validation\WebDriverValidator
  • Azalea\Selenium\Toolkit\View
  • Azalea\Util\Config
  • Azalea\Util\Debug
  • Azalea_Sniffs_WhiteSpace_ScopeClosingBraceSniff
  • BaseModelTestCase
  • ChartAssessmentTest
  • ChartCustomFieldBehaviorsTest
  • ChartDiagnosisTest
  • ChartEncounterDiagnosisTest
  • ChartEncounterProceduresTest
  • ChartInventoryTest
  • ChartObjectiveTest
  • ChartProblemHistoryTest
  • ChartProceduresTest
  • ChartProviderAccessTest
  • ChartSigningTest
  • ChartsListProviderAccessTest
  • ChartSmokingStatusTest
  • ChartSubjectiveTest
  • ConfigTest
  • EncounterClaimsTest
  • EncounterDemographicsTest
  • EncounterDiagnosisTest
  • EncounterGuarantorTest
  • EncounterLedgerTest
  • EncounterProceduresTest
  • ExampleTestCase
  • MessagesLabelsTest
  • PageTest
  • PatentsListTest
  • PathManagerTest
  • PatientAccountSummaryTest
  • PatientBillingActionsTest
  • PatientCommentsTest
  • PatientDashboardAlertsTest
  • PatientDashboardLinkedPatientsTest
  • PatientDemographicsEditTest
  • PatientDocumentsTest
  • PatientPopupCommentsTest
  • PatientProviderAccessTest
  • PatientsListProviderAccessTest
  • PermissionsTest
  • PopupTest
  • SchedulerBlocksTest
  • SchedulerInsuranceBlocksTest
  • SimpePage
  • SimpleView
  • SimpleViewWithArgs
  • SimpleViewWithNoHash
  • TestCase
  • tests\integration\barebones\BarebonesConstants
  • tests\integration\barebones\BarebonesTestCase
  • tests\integration\barebones\controllers\charts\ChartsControllerTest
  • tests\integration\barebones\controllers\patients\PatientsPopupAlertsControllerTest
  • tests\integration\barebones\controllers\system\ClientsControllerTest
  • tests\integration\barebones\models\billing\ClientsFeeSchedulesMapModelTest
  • tests\integration\barebones\models\encounters\AppointmentModelTest
  • tests\integration\barebones\models\encounters\CollectionTest
  • tests\integration\barebones\models\encounters\ConcurrentCollectionTest
  • tests\integration\barebones\models\encounters\EncounterModelTest
  • tests\integration\barebones\models\encounters\EncountersIncompleteReasonModelTest
  • tests\integration\barebones\models\encounters\ModelQueryBuilderTest
  • tests\integration\barebones\models\examples\ExampleModelBasicsTest
  • tests\integration\barebones\models\examples\ExamplesGenericControllerTest
  • tests\integration\barebones\models\messaging\MessageModelTest
  • tests\integration\barebones\models\rcm\RCMStatsGeneralControllerTests
  • tests\integration\barebones\models\system\ClientModelTest
  • tests\unit\barebones\lib\BarebonesTestCase
  • tests\unit\barebones\utilities\ArraysTest
  • tests\unit\barebones\utilities\calculations\PovertyLineTest
  • tests\unit\barebones\utilities\MathTest
  • UrlManagerTest
  • VariantRulesTest
  • VariantsManagerTest
  • ViewTest
  • WebDriverMock

Exceptions

  • Azalea\Selenium\Toolkit\Exception\ElementNotFoundException
  • Azalea\Selenium\Toolkit\Exception\InvalidPageException
  • Azalea\Selenium\Toolkit\Exception\TimeoutException
  • Overview
  • Namespace
  • Class
  1: <?php
  2: use Azalea\Selenium\App\ApplicationTestCase;
  3: use Azalea\Selenium\App\Patients;
  4: use Azalea\Selenium\App\Users;
  5: 
  6: class SchedulerBlocksTest extends ApplicationTestCase
  7: {
  8:     /**
  9:      * Summary:
 10:      * Test basic schedule block rendering: Open blocks, Lock-outs,
 11:      * Lock-out exception, and appointment block.
 12:      */
 13:     public function testBasicSchedulerBlockRendering()
 14:     {
 15:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 16: 
 17:         // Navigate to the Scheduler
 18:         $scheduler = $app->scheduler->navigate()->verifyAndWait();
 19: 
 20:         // Select Location Gerhard Hospital (401)
 21:         $this->wait(1);
 22:         $scheduler->changeLocation(401);
 23: 
 24:         // Select date 03/15/2016
 25:         $scheduler->goToDate(new DateTime("03/15/2016"));
 26:         $this->wait(1);
 27: 
 28:         // force scheudler to render below visible view port
 29:         $scheduler->scrollTo("1100");
 30: 
 31:         /**
 32:          * Expected:
 33:          *  a. Open slots from 11:30 AM to 12:00 PM for Savanna King.
 34:          *  b. Lockout Test slots from 12:00 PM to 12:24 PM for Savanna King.
 35:          *  c. Open slot from 12:25 PM to 12:30 PM (lockout exception) for Savanna King.
 36:          *  d. Consultation slots from 12:30 PM to 1:00 PM for Savanna King.
 37:          */
 38:         $this->spinWait(function ($driver) use ($scheduler) {
 39:             $driver->assertElementNotHasText("#p3554_1125", "Open");
 40: 
 41:             $scheduler->scrollTo("1130");
 42:             $driver->assertElementHasText("#p3554_1130 .sched_opening ", "Open");
 43:             $driver->assertElementHasText("#p3554_1135 .sched_opening ", "Open");
 44:             $driver->assertElementHasText("#p3554_1140 .sched_opening ", "Open");
 45:             $driver->assertElementHasText("#p3554_1145 .sched_opening ", "Open");
 46:             $driver->assertElementHasText("#p3554_1150 .sched_opening ", "Open");
 47:             $driver->assertElementHasText("#p3554_1155 .sched_opening ", "Open");
 48: 
 49:             $scheduler->scrollTo("1200");
 50:             $driver->assertElementHasText("#p3554_1200 .sched_lockout", "Lockout Test");
 51:             $driver->assertElementHasText("#p3554_1205 .sched_lockout", "Lockout Test");
 52:             $driver->assertElementHasText("#p3554_1210 .sched_lockout", "Lockout Test");
 53:             $driver->assertElementHasText("#p3554_1215 .sched_lockout", "Lockout Test");
 54:             $driver->assertElementHasText("#p3554_1220 .sched_lockout", "Lockout Test");
 55: 
 56:             $driver->assertElementHasText("#p3554_1225 .sched_opening", "Open");
 57: 
 58:             $scheduler->scrollTo("1230");
 59:             $driver->assertElementHasText("#p3554_1230 .sched_block", "Consultation");
 60:             $driver->assertElementHasText("#p3554_1235 .sched_block", "Consultation");
 61:             $driver->assertElementHasText("#p3554_1240 .sched_block", "Consultation");
 62:             $driver->assertElementHasText("#p3554_1245 .sched_block", "Consultation");
 63:             $driver->assertElementHasText("#p3554_1250 .sched_block", "Consultation");
 64:             $driver->assertElementHasText("#p3554_1255 .sched_block", "Consultation");
 65: 
 66:             $driver->assertElementNotHasText("#p3554_1255", "Open");
 67: 
 68:             return true;
 69:         });
 70: 
 71:         $this->assertNoErrorPopups();
 72:     }
 73: 
 74:     /**
 75:      * Summary:
 76:      * Test scheduling an appointment on an open block.
 77:      */
 78:     public function testCanScheduleOnOpenBlock()
 79:     {
 80:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 81: 
 82:         // Navigate to the Scheduler
 83:         $scheduler = $app->scheduler->navigate()->verifyAndWait();
 84: 
 85:         // Select Location Gerhard Hospital (401)
 86:         $this->wait(1);
 87:         $scheduler->changeLocation(401);
 88: 
 89:         // Select date 03/16/2016
 90:         $scheduler->goToDate(new DateTime("03/16/2016"));
 91:         $this->wait(1);
 92: 
 93:         // force scheudler to render below visible view port
 94:         $scheduler->scrollTo("1100");
 95: 
 96:         // Attempt to schedule patient Selenium Primary Insurance at 11:30 AM
 97:         $this->querySelector("#p3554_1130 .sched_opening")->click();
 98: 
 99:         // Search for and select patient Selenium Primary Insurance
100:         $this->within("#find_patient_popup", function ($driver) {
101:             $driver->type("autoselect_search", "Selenium Primary Insurance");
102:             $driver->wait(1);
103:             $driver->waitFor('[data-grid-row="0"]')->click();
104:         });
105: 
106:         $this->waitForAjax();
107: 
108:         /**
109:          * Expected:
110:          *  a. Appointment popup appears.
111:          */
112:         $popup = $scheduler->appointmentPopup->verifyAndWait();
113: 
114:         // Cancel the appointment.
115:         $app->popup->last()->press("Cancel");
116:         $this->waitForAjax();
117: 
118:         $this->assertNoErrorPopups();
119:     }
120: 
121:     /**
122:      * Summary:
123:      * Test scheduling an appointment on an appointment block.
124:      */
125:     public function testCanScheduleOnAppointmentBlock()
126:     {
127:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
128: 
129:         // Navigate to the Scheduler
130:         $scheduler = $app->scheduler->navigate()->verifyAndWait();
131: 
132:         // Select Location Gerhard Hospital (401)
133:         $this->wait(1);
134:         $scheduler->changeLocation(401);
135: 
136:         // Select date 03/16/2016
137:         $scheduler->goToDate(new DateTime("03/16/2016"));
138:         $this->wait(1);
139: 
140:         // force scheudler to render below visible view port
141:         $scheduler->scrollTo("1100");
142:         $scheduler->scrollTo("1200");
143: 
144:         // Attempt to schedule patient Selenium Primary Insurance at 12:30 AM
145:         $this->querySelector("#p3554_1230 .sched_block")->click();
146: 
147:         // Search for and select patient Selenium Primary Insurance
148:         $this->within("#find_patient_popup", function ($driver) {
149:             $driver->type("autoselect_search", "Selenium Primary Insurance");
150:             $driver->wait(1);
151:             $driver->waitFor('[data-grid-row="0"]')->click();
152:         });
153: 
154:         $this->waitForAjax();
155: 
156:         /**
157:          * Expected:
158:          *  a. Appointment popup appears.
159:          *  b. Appointment Reason pre-selected to CONSULTATION.
160:          */
161:         $popup = $scheduler->appointmentPopup->verifyAndWait();
162:         // $popup->assertInputHasValue("apt_are_id", 6628);
163:         $value = $popup->getInput("apt_are_id");
164:         $this->assertEquals("CONSULTATION", $popup->getSelectOptionText("apt_are_id", $value));
165: 
166:         // Cancel the appointment.
167:         $app->popup->last()->press("Cancel");
168:         $this->waitForAjax();
169: 
170:         $this->assertNoErrorPopups();
171:     }
172: 
173:     /**
174:      * Summary:
175:      * Test scheduling an appointment on a lock-out block.
176:      */
177:     public function testCannotScheduleOnLockoutBlock()
178:     {
179:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
180: 
181:         // Navigate to the Scheduler
182:         $scheduler = $app->scheduler->navigate()->verifyAndWait();
183: 
184:         // Select Location Gerhard Hospital (401)
185:         $this->wait(1);
186:         $scheduler->changeLocation(401);
187: 
188:         // Select date 03/16/2016
189:         $scheduler->goToDate(new DateTime("03/16/2016"));
190:         $this->wait(1);
191: 
192:         // force scheudler to render below visible view port
193:         $scheduler->scrollTo("1100");
194:         $scheduler->scrollTo("1200");
195: 
196:         // Attempt to schedule patient Selenium Primary Insurance at 12:00 AM
197:         $this->querySelector("#p3554_1200 .sched_lockout")->click();
198: 
199:         /**
200:          * Expected:
201:          *  a. Popup appears with text "What would you like to do? Please select on option below."
202:          *  b. There is an option to Edit Lock-out and Add Exception (admin user).
203:          */
204:         $popup = $app->popup->first();
205:         $popup->assertCanSee("What would you like to do? Please select on option below.");
206:         $popup->assertCanSee("Edit Lock-out");
207:         $popup->assertCanSee("Add Exception");
208:         $popup->press("Cancel");
209: 
210:         $this->assertNoErrorPopups();
211:     }
212: 
213:     /**
214:      * Summary:
215:      * Tests that a patient can be scheduled on open slots and reason slots
216:      * when scheduling in multiple appointment mode.
217:      */
218:     public function testCanScheduleWithMultipleApptMode()
219:     {
220:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
221: 
222:         // Navigate to the Scheduler
223:         $scheduler = $app->scheduler->navigate()->verifyAndWait();
224: 
225:         // Select Location Gerhard Hospital (401)
226:         $this->wait(1);
227:         $scheduler->changeLocation(401);
228: 
229:         // Select date 03/16/2016
230:         $scheduler->goToDate(new DateTime("03/16/2016"));
231:         $this->wait(1);
232: 
233:         // Search for patient Selenium Primary Insurance
234:         $app->home->search->type("search", "Selenium Primary Insurance");
235: 
236:         // Click on autocomplete result for Selenium Primary Insurance
237:         $this->waitFor(".autoCompleteResult")->click();
238:         $this->waitForAjax();
239: 
240:         /**
241:          * Expected:
242:          *  a. Scheduler goes into scheduling mode for
243:          *     Selenium Primary Insurance.
244:          */
245:         $this->spinWait(function () use ($scheduler) {
246:             $scheduler->assertCanSee("Scheduling");
247:             $scheduler->assertCanSee("Selenium Primary Insurance");
248:             return true;
249:         });
250: 
251:         // force scheudler to render below visible view port
252:         $scheduler->scrollTo("1100");
253: 
254:         // Attempt to schedule patient Selenium Primary Insurance at 11:40 AM
255:         // with no Appointment Reason selected.
256:         $this->clickElement("#p3554_1140 .sched_opening");
257:         $this->waitForAjax();
258: 
259:         /**
260:          * Expected:
261:          *  a. Appointment popup appears.
262:          */
263:         $popup = $scheduler->appointmentPopup->verifyAndWait();
264: 
265:         // Cancel the appointment.
266:         $app->popup->last()->press("Cancel");
267:         $this->waitForAjax();
268: 
269:         // Select Appointment Reason "CONSULTATION" (6628)
270:         $scheduler->select("apt_are_id", 6628);
271: 
272:         // Attempt to schedule patient Selenium Primary Insurance at 11:50 AM
273:         $this->clickElement("#p3554_1150 .sched_opening");
274:         $this->waitForAjax();
275: 
276:         /**
277:          * Expected:
278:          *  a. Appointment block is scheduled with reason CONSULTATION.
279:          */
280:         $this->spinWait(function ($driver) {
281:             $driver->assertElementHasText("#p3554_1150 .sched_appointment", "Primary Insurance, Selenium");
282:             return true;
283:         });
284: 
285:         // force scheudler to render below visible view port
286:         $scheduler->scrollTo("1230");
287: 
288:         // Clear Appointment Reason selection
289:         $scheduler->select("apt_are_id", "");
290: 
291:         // Attempt to schedule patient Selenium Primary Insurance at 12:50 AM
292:         // with no Appointment Reason selected on a slot with a reason defined.
293:         $this->clickElement("#p3554_1250 .sched_block");
294:         $this->waitForAjax();
295: 
296:         /**
297:          * Expected:
298:          *  a. Appointment block is scheduled with reason CONSULTATION.
299:          */
300:         $this->spinWait(function ($driver) {
301:             $driver->assertElementHasText("#p3554_1250 .sched_appointment", "Primary Insurance, Selenium");
302:             return true;
303:         });
304: 
305:         // Click (Finish) for multi-scheduling mode
306:         $this->clickElement("#finish_sched");
307: 
308:         // Click on the 11:50 AM scheduled appointment block
309:         $scheduler->scrollTo("1130");
310:         $this->clickElement("#p3554_1150 .sched_appointment");
311:         $this->waitForAjax();
312: 
313:         /**
314:          * Expected:
315:          *  a. Appointment popup appears.
316:          *  b. Appointment Reason is set to CONSULTATION.
317:          */
318:         $popup = $scheduler->appointmentPopup->verifyAndWait();
319:         $popup->assertInputHasValue("apt_are_id", 6628);
320: 
321:         // Delete the appointment.
322:         $popup->select("apt_ast_id", 7);
323: 
324:         $app->popup->last()->press("Submit");
325:         $this->waitForAjax();
326: 
327:         // Click on the 12:50 AM scheduled appointment block
328:         $scheduler->scrollTo("1230");
329:         $this->clickElement("#p3554_1250 .sched_appointment");
330:         $this->waitForAjax();
331: 
332:         /**
333:          * Expected:
334:          *  a. Appointment popup appears.
335:          *  b. Appointment Reason is set to CONSULTATION.
336:          */
337:         $popup = $scheduler->appointmentPopup->verifyAndWait();
338:         $popup->assertInputHasValue("apt_are_id", 6628);
339: 
340:         // Delete the appointment.
341:         $popup->select("apt_ast_id", 7);
342: 
343:         $app->popup->last()->press("Submit");
344:         $this->waitForAjax();
345: 
346:         $this->assertNoErrorPopups();
347:     }
348: }
349: 
350: ?>
API documentation generated by ApiGen