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 PatientBillingActionsTest extends ApplicationTestCase
8: {
9: public function supportsCustomer($cus_id)
10: {
11:
12: return (Customers::isEhrCustomer($cus_id) || Customers::isPmCustomer($cus_id));
13: }
14:
15: 16: 17: 18: 19: 20:
21: public function testNewEncounterFromPatientActions()
22: {
23: $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
24:
25:
26: $patientView = $app->patients->open(Patients::DEVAN_ZULAUF);
27:
28:
29: $this->wait(2);
30: $patientView->querySelector($patientView->selectors->patientActions)->click();
31: $this->wait(2);
32: $actionsMenu = $app->popup->last();
33:
34:
35: $actionsMenu->querySelector(".pat_new_encounter")->click();
36:
37: $this->waitForAjax();
38: try {
39: $this->spinWait(function ($driver) {
40: $driver->querySelector("#existing_soap_popup #btn_new_encounter")
41: ->click();
42: return true;
43: }, 3);
44: } catch (Exception $e) {
45:
46:
47: }
48: $this->waitForAjax();
49: $encounterView = $this->getApp()->encounters->getFromHash();
50:
51: 52: 53: 54:
55: $encounterView->verifyAndWait();
56: $encounterView->assertElementExists('[name="enc_date_of_service"]');
57:
58:
59: $encounterView->cancel();
60:
61: $this->assertNoErrorPopups();
62: }
63: }
64: ?>