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\Customers;
  4: use Azalea\Selenium\App\Patients;
  5: use Azalea\Selenium\App\Users;
  6: 
  7: class ChartObjectiveTest extends ApplicationTestCase
  8: {
  9:     public function supportsCustomer($cus_id)
 10:     {
 11:         // Azalea EHR, Azalea EMR customers only
 12:         return (Customers::isEhrCustomer($cus_id) || Customers::isEmrCustomer($cus_id));
 13:     }
 14: 
 15:     /**
 16:      * Summary:
 17:      * Objective Notes field can be Edited, Cancelled, and Saved.
 18:      */
 19:     public function testCanEditObjectiveNotesField()
 20:     {
 21:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 22: 
 23:         // Open Patient Record for Camila C. Fisher (QAA74) > Charts section.
 24:         $chartView = $app->patients->get(Patients::CAMILA_FISHER_ID)->charts->navigate()->addChart();
 25: 
 26:         // Click on the HPI field. In the HPI field, type "This is some text."
 27:         $chartView->objective->editObjectiveNotes();
 28:         $this->keys("This is some text.");
 29: 
 30:         $chartView->objective->notes->assertCanSee("This is some text.");
 31: 
 32:         // Click the Cancel button for the Objective Notes field
 33:         $chartView->objective->cancelObjectiveNotes();
 34: 
 35:         /**
 36:          * Expected outcome:
 37:          * a. The Objective Notes field is cleared
 38:          */
 39:         $this->spinWait(function () use ($chartView) {
 40:             $chartView->objective->notes->assertCanNotSee("This is some text.");
 41:             return true;
 42:         });
 43: 
 44:         $this->wait(1);
 45: 
 46:         // Click on the Objective Notes field. In the Objective Notes field, type "This is some text."
 47:         $chartView->objective->editObjectiveNotes();
 48:         $this->keys("This is some more text.");
 49: 
 50:         $chartView->objective->notes->assertCanSee("This is some more text.");
 51: 
 52:         // Click the Save button for the Objective Notes field
 53:         $chartView->objective->saveObjectiveNotes();
 54: 
 55:         /**
 56:          * Expected outcome:
 57:          * a. The Objective Notes field has the text "This is some more text."
 58:          */
 59:         $this->spinWait(function () use ($chartView) {
 60:             $chartView->objective->notes->assertCanSee("This is some more text.");
 61:             return true;
 62:         });
 63: 
 64:         // Save the Chart
 65:         $chartView->save();
 66: 
 67:         /**
 68:          * Expected outcome:
 69:          * a. The Objective Notes field has the text "This is some more text."
 70:          */
 71:         $this->spinWait(function () use ($chartView) {
 72:             $chartView->objective->notes->assertCanSee("This is some more text.");
 73:             return true;
 74:         });
 75: 
 76:         // cancel the chart to clean up
 77:         $chartView->cancel();
 78: 
 79:         $this->assertNoErrorPopups();
 80:     }
 81: 
 82:     /**
 83:      * Summary:
 84:      * Vitals can be added, edited, and removed from the Chart's
 85:      * objective section. Height can be displayed in inches,
 86:      * feet & inches, and centimeters.
 87:      */
 88:     public function testAddEditDeleteVitals()
 89:     {
 90:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 91: 
 92:         // Open Patient Record for Camila C. Fisher (QAA74) > Charts section.
 93:         $chartView = $app->patients->get(Patients::CAMILA_FISHER_ID)->charts->navigate()->addChart();
 94: 
 95:         // Press the + Vitals button in the Objective section
 96:         $chartView->objective->addVitals();
 97: 
 98:         // Fill in the vitals information
 99:         // Select "Inches" for the height display
100:         $chartView->popups->vitals->verifyAndWait()->setInput(array(
101:             "espv_height_ft_in" => "in",
102:             "espv_height_in" => 60,
103:             "espv_weight_lbs" => 150,
104:             "espv_blood_pressure_mm" => 80,
105:             "espv_blood_pressure_hg" => 120,
106:             "espv_temp" => 98,
107:             "espv_pulse" => 90,
108:             "espv_resp_rate" => 75,
109:             "espv_pulse_oximetry" => 50,
110:             "espv_notes" => "These are some notes"
111:         ));
112: 
113:         // Click Save
114:         $app->popup->last()->press("Save");
115: 
116:         // Get a reference to the vitals grid
117:         $vitalsGrid = $chartView->objective->vitals->grid;
118: 
119:         /*
120:          * Expected outcome:
121:          * a. New vitals appear in the vitals grid.
122:          */
123:         $vitalsGrid->waitForRowCount(1);
124:         $this->spinWait(function () use ($vitalsGrid) {
125:             $vitalsGrid->assertCanSee("60");
126:             $vitalsGrid->assertCanSee("150");
127:             $vitalsGrid->assertCanSee("80");
128:             $vitalsGrid->assertCanSee("120");
129:             $vitalsGrid->assertCanSee("98");
130:             $vitalsGrid->assertCanSee("90");
131:             $vitalsGrid->assertCanSee("75");
132:             $vitalsGrid->assertCanSee("50");
133:             $vitalsGrid->assertCanSee("These are some notes");
134:             return true;
135:         });
136: 
137:         // Add another set of vitals
138:         $chartView->objective->addVitals();
139: 
140:         // Select "Inches" for the height display
141:         $chartView->popups->vitals->verifyAndWait()->setInput(array(
142:             "espv_height_ft_in" => "in",
143:             "espv_height_in" => 61,
144:             "espv_weight_lbs" => 151,
145:             "espv_blood_pressure_mm" => 81,
146:             "espv_blood_pressure_hg" => 121,
147:             "espv_temp" => 99,
148:             "espv_pulse" => 91,
149:             "espv_resp_rate" => 76,
150:             "espv_pulse_oximetry" => 51,
151:             "espv_notes" => "These are some more notes"
152:         ));
153: 
154:         // Click Save
155:         $app->popup->last()->press("Save");
156: 
157:         /*
158:          * Expected outcome:
159:          * a. New vitals appear in the vitals grid.
160:          */
161:         $vitalsGrid->waitForRowCount(2);
162:         $this->spinWait(function () use ($vitalsGrid) {
163:             $vitalsGrid->assertCanSee("61");
164:             $vitalsGrid->assertCanSee("151");
165:             $vitalsGrid->assertCanSee("81");
166:             $vitalsGrid->assertCanSee("121");
167:             $vitalsGrid->assertCanSee("99");
168:             $vitalsGrid->assertCanSee("91");
169:             $vitalsGrid->assertCanSee("76");
170:             $vitalsGrid->assertCanSee("51");
171:             $vitalsGrid->assertCanSee("These are some more notes");
172:             return true;
173:         });
174: 
175:         // Click on the first row to edit the vitals
176:         $chartView->objective->vitals->grid->waitForRowAt(0)->click();
177: 
178:         // Select "Inches" for the height display
179:         $chartView->popups->vitals->verifyAndWait()->setInput(array(
180:             "espv_height_ft_in" => "in",
181:             "espv_height_in" => 62,
182:             "espv_weight_lbs" => 153,
183:             "espv_blood_pressure_mm" => 83,
184:             "espv_blood_pressure_hg" => 123,
185:             "espv_temp" => 99,
186:             "espv_pulse" => 93,
187:             "espv_resp_rate" => 77,
188:             "espv_pulse_oximetry" => 53,
189:             "espv_notes" => "These are some edited notes"
190:         ));
191: 
192:         // Click Save
193:         $app->popup->last()->press("Save");
194: 
195:         /*
196:          * Expected outcome:
197:          * a. Vitals are updated in the grid.
198:          */
199:         $this->spinWait(function () use ($vitalsGrid) {
200:             $vitalsGrid->assertCanSee("62");
201:             $vitalsGrid->assertCanSee("153");
202:             $vitalsGrid->assertCanSee("83");
203:             $vitalsGrid->assertCanSee("123");
204:             $vitalsGrid->assertCanSee("99");
205:             $vitalsGrid->assertCanSee("93");
206:             $vitalsGrid->assertCanSee("77");
207:             $vitalsGrid->assertCanSee("53");
208:             $vitalsGrid->assertCanSee("These are some edited notes");
209:             return true;
210:         });
211: 
212:         // Click on the first row to edit the vitals
213:         $chartView->objective->vitals->grid->waitForRowAt(0)->click();
214: 
215:         // Select "Feet & Inches" for the height display
216:         $chartView->popups->vitals->verifyAndWait()->select("espv_height_ft_in", "ft");
217: 
218:         // Click Save
219:         $app->popup->last()->press("Save");
220: 
221:         /*
222:          * Expected outcome:
223:          * a. Height (62in) is displayed as 5 ft. 2 in.
224:          */
225:         $this->spinWait(function () use ($chartView) {
226:             $chartView->objective->vitals->grid->assertCanSee("5 ft. 2.00 in.");
227:             return true;
228:         });
229: 
230:         // Click on the first row to edit the vitals
231:         $chartView->objective->vitals->grid->waitForRowAt(0)->click();
232: 
233:         // Select "Centimeters" for the height display
234:         $chartView->popups->vitals->verifyAndWait()->select("espv_height_ft_in", "cm");
235: 
236:         // Click Save
237:         $app->popup->last()->press("Save");
238: 
239:         /*
240:          * Expected outcome:
241:          * a. Height (62in) is displayed as 157.480 cm
242:          */
243:         $this->spinWait(function () use ($chartView) {
244:             $chartView->objective->vitals->grid->assertCanSee("157.480 cm");
245:             return true;
246:         });
247: 
248: 
249:         // Click on the first row to edit the vitals
250:         $chartView->objective->vitals->grid->waitForRowAt(0)->click();
251: 
252:         // Select "Pounds & Ounces" for the weight display
253:         $chartView->popups->vitals->verifyAndWait()->select("espv_weight_lbs_ozs", "ozs");
254: 
255:         // Enter 153 lbs and 8 ounces
256:         $chartView->popups->vitals->setInput(array(
257:             "espv_weight_lbs" => "153",
258:             "espv_weight_ozs" => "8"
259:         ));
260: 
261:         // Click Save
262:         $app->popup->last()->press("Save");
263: 
264:         /*
265:          * Expected outcome:
266:          * a. Weight is displayed as 153 lbs. 8.0 oz.
267:          */
268:         $this->spinWait(function () use ($chartView) {
269:             $chartView->objective->vitals->grid->assertCanSee("153 lbs. 8.00 oz.");
270:             return true;
271:         });
272: 
273: 
274:         // Click on the first row to edit the vitals
275:         $chartView->objective->vitals->grid->waitForRowAt(0)->click();
276: 
277:         // Select "Kilograms" for the weight display
278:         $chartView->popups->vitals->verifyAndWait()->select("espv_weight_lbs_ozs", "kg");
279: 
280:         // Click Save
281:         $app->popup->last()->press("Save");
282: 
283:         /*
284:          * Expected outcome:
285:          * a. Weight is displayed as 69.626 kg
286:          */
287:         $this->spinWait(function () use ($chartView) {
288:             $chartView->objective->vitals->grid->assertCanSee("69.626 kg");
289:             return true;
290:         });
291: 
292: 
293:         // Delete both vitals
294: 
295:         /*
296:          * Expected outcome:
297:          * a. Both vital rows are removed from the grid.
298:          */
299: 
300:         // Remvoe the first row of vitals
301:         $chartView->objective->vitals->grid->first()->querySelector('[data-button-class="delete"]')->click();
302:         //  Click Yes to confirm.
303:         $app->popup->confirmYes();
304: 
305:         $chartView->objective->vitals->grid->waitForRowCount(1);
306: 
307:         // Remove the last row of vitals
308:         $chartView->objective->vitals->grid->first()->querySelector('[data-button-class="delete"]')->click();
309:         //  Click Yes to confirm.
310:         $app->popup->confirmYes();
311: 
312:         $chartView->objective->vitals->grid->waitForEmpty();
313: 
314:         /*
315:          * Expected outcome:
316:          * a. Both vital rows are removed from the grid.
317:          */
318: 
319:         // cancel the chart to clean up
320:         $chartView->cancel();
321: 
322:         $this->assertNoErrorPopups();
323:     }
324: 
325:     /**
326:      * Summary:
327:      * Image annotations can be added to the Objective section of the chart and
328:      * subsequently edited and removed.
329:      */
330:     public function testAddEditRemoveImageAnnotation()
331:     {
332:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
333: 
334:         // Open Patient Record for Camila C. Fisher (QAA74) > Charts section.
335:         $chartView = $app->patients->get(Patients::CAMILA_FISHER_ID)->charts->navigate()->addChart();
336: 
337:         // Press the + Image Annotation button in the Objective section
338:         $chartView->objective->addImageAnnotation();
339: 
340:         $chartView->popups->images->verifyAndWait();
341:         $chartView->popups->images->grid->waitForRowAt(0);
342: 
343:         // Search for "Body Diagrams"
344:         $chartView->popups->images->type("autoselect_search", "Body Diagrams");
345:         $this->spinWait(function () use ($chartView) {
346:             return $chartView->popups->images->grid->see("Body Diagrams");
347:         });
348: 
349:         // Click on the "Body Diagrams" row
350:         $chartView->popups->images->grid->waitForRowAt(0)->click();
351: 
352:         /**
353:          * Expected outcome:
354:          * a. Body Diagrams image annotation field is added ot the chart.
355:          */
356: 
357:         $this->spinWait(function () use ($chartView) {
358:             $chartView->objective->images->assertCanSee("Body Diagrams");
359:             $chartView->objective->images->assertElementExists("canvas");
360:             return true;
361:         });
362: 
363:         // Click on the Edit button for the image annotation
364:         $chartView->objective->images->press("Edit");
365: 
366:         /**
367:          * Expected outcome:
368:          * a. Body Diagrams annotation is in edit mode.
369:          */
370:         $chartView->objective->images->assertElementVisible("#canvas_controls");
371: 
372:         // Click on the Cancel button
373:         $chartView->objective->images->press("Cancel");
374: 
375:         // Click on the Remove button for the image annotation
376:         $chartView->objective->images->press("Remove");
377:         //  Click Yes to confirm.
378:         $app->popup->confirmYes();
379: 
380:         /**
381:          * Expected outcome:
382:          * a. Body Diagrams image annotation field is removed.
383:          */
384: 
385:         $this->spinWait(function () use ($chartView) {
386:             $chartView->objective->images->assertCanNotSee("Body Diagrams");
387:             $chartView->objective->images->assertElementNotExists("canvas");
388:             return true;
389:         });
390: 
391:         // cancel the chart to clean up
392:         $chartView->cancel();
393: 
394:         $this->assertNoErrorPopups();
395:     }
396: 
397:     /**
398:      * Summary:
399:      * Custom text and form fields can be added to the Objective section of the chart and
400:      * subsequently edited and removed.
401:      */
402:     public function testAddEditRemoveCustomFields()
403:     {
404:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
405: 
406:         // Open Patient Record for Camila C. Fisher (QAA74) > Charts section.
407:         $chartView = $app->patients->get(Patients::CAMILA_FISHER_ID)->charts->navigate()->addChart();
408: 
409:         // Jump to Objective section
410:         $this->waitFor(".chart-controls-edit #btn_jump_obj")->click();
411: 
412:         // Remove any existing objective custom fields
413:         $buttons = $chartView->objective->fields->getButtons("Remove");
414:         foreach ($buttons as $button) {
415:             $button->click();
416:         }
417: 
418:         // ***** Objective Text Field
419:         // Press the + Objective Field button in the Objective section
420:         $chartView->objective->addObjectiveField();
421: 
422:         $chartView->popups->fields->verifyAndWait();
423:         $chartView->popups->fields->grid->waitForRowAt(0);
424: 
425:         // Search for "Objective Text Field"
426:         $chartView->popups->fields->type("autoselect_search", "Objective Text Field");
427:         $chartView->popups->fields->grid->waitForRowTextAt(0, "Objective Text Field");
428: 
429:         // Click on the "Objective Text Field" row
430:         $chartView->popups->fields->grid->waitForRowAt(0)->click();
431: 
432:         /**
433:          * Expected outcome:
434:          * a. Objective Text Field image annotation field is added ot the chart.
435:          */
436: 
437:         $this->spinWait(function () use ($chartView) {
438:             $chartView->objective->fields->assertCanSee("Objective Text Field");
439:             $chartView->objective->fields->assertElementExists(".charts-HTMLInputView");
440:             return true;
441:         });
442: 
443:         // Click on the Edit button for the Objective Text Field
444:         $chartView->objective->fields->press("Edit");
445: 
446:         /**
447:          * Expected outcome:
448:          * a. Objective Text Field is in edit mode.
449:          */
450:         $this->spinWait(function () use ($chartView) {
451:             $chartView->objective->fields->assertElementVisible(".charts-HTMLInputView > .editing");
452:             return true;
453:         });
454: 
455:         // Click on the Cancel button
456:         $chartView->objective->fields->press("Cancel");
457: 
458:         // Click on the Remove button for the Objective Text Field
459:         $chartView->objective->fields->press("Remove");
460:         //  Click Yes to confirm.
461:         $app->popup->confirmYes();
462: 
463:         /**
464:          * Expected outcome:
465:          * a. Objective Text Field is removed.
466:          */
467: 
468:         $this->spinWait(function () use ($chartView) {
469:             $chartView->objective->fields->assertCanNotSee("Objective Text Field");
470:             return true;
471:         });
472: 
473: 
474:         // ***** Objective Form Field
475:         // Press the + Objective Field button in the Objective section
476:         $chartView->objective->addObjectiveField();
477: 
478:         $chartView->popups->fields->verifyAndWait();
479:         $chartView->popups->fields->grid->waitForRowAt(0);
480: 
481:         // Search for "Objective Form Field"
482:         $chartView->popups->fields->type("autoselect_search", "Objective Form Field");
483:         $chartView->popups->fields->grid->waitForRowTextAt(0, "Objective Form Field");
484: 
485:         // Click on the "Objective Form Field" row
486:         $chartView->popups->fields->grid->waitForRowAt(0)->click();
487: 
488:         /**
489:          * Expected outcome:
490:          * a. Objective Form Field image annotation field is added ot the chart.
491:          */
492: 
493:         $this->spinWait(function () use ($chartView) {
494:             $chartView->objective->fields->assertCanSee("Objective Form Field");
495:             $chartView->objective->fields->assertElementExists(".charts-FormInputView");
496:             return true;
497:         });
498: 
499:         // Click on the Edit button for the Objective Form Field
500:         $chartView->objective->fields->press("Edit");
501: 
502:         /**
503:          * Expected outcome:
504:          * a. Objective Form Field is in edit mode.
505:          */
506:         // NOTE: There is no straightforward way to determine this,
507:         // as the only thing that changes is the opacity of the form.
508:         $this->assertNoErrorPopups();
509: 
510:         // Click on the Cancel button
511:         $chartView->objective->fields->press("Cancel");
512:         $this->waitForAjax();
513: 
514:         // Click on the Remove button for the Objective Form Field
515:         $chartView->objective->fields->press("Remove");
516:         //  Click Yes to confirm.
517:         $app->popup->confirmYes();
518: 
519:         /**
520:          * Expected outcome:
521:          * a. Objective Form Field is removed.
522:          */
523: 
524:         $this->spinWait(function () use ($chartView) {
525:             $chartView->objective->fields->assertCanNotSee("Objective Form Field");
526:             return true;
527:         });
528: 
529: 
530: 
531:         // cancel the chart to clean up
532:         $chartView->cancel();
533: 
534:         $this->assertNoErrorPopups();
535:     }
536: }
537: 
538: ?>
API documentation generated by ApiGen