1: <?php
2: namespace Azalea\Selenium\App\Charts;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class ChartSubjective extends View
7: {
8:
9: 10: 11:
12:
13: public function editHPI()
14: {
15: $this->hpi->clearCache()->verifyAndWait()->root()->click();
16: $this->hpi->editor->verifyAndWait()->root()->click();
17: }
18:
19: public function cancelHPI()
20: {
21: $this->filter('[data-model-attribute-header="esp_subjective"] + .awa-mvc-ControlsView')->press("Cancel");
22: }
23:
24: public function saveHPI()
25: {
26: $this->filter('[data-model-attribute-header="esp_subjective"] + .awa-mvc-ControlsView')->press("Save");
27: }
28:
29: public function addSubjectiveField()
30: {
31: $this->press("Subjective Field");
32: return $this;
33: }
34:
35: public function addImageAnnotation()
36: {
37: $this->press("Image Annotation");
38: return $this;
39: }
40:
41: public function removeAllCustomFields($app)
42: {
43: $buttons = $this->fields->getButtons("Remove");
44: try {
45: while (!empty($buttons)) {
46: $buttons[0]->click();
47:
48: $app->popup->confirmYes();
49: $this->waitForAjax();
50:
51: $this->clearCache();
52: $buttons = $this->fields->getButtons("Remove");
53: }
54: } catch (\Exception $e) {
55:
56: }
57: $this->clearCache();
58: }
59: }
60:
61: ?>