本文整理汇总了Python中openeobs_mobile.list_page.ListPage类的典型用法代码示例。如果您正苦于以下问题:Python ListPage类的具体用法?Python ListPage怎么用?Python ListPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ListPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestPosturalBloodPressurePage
class TestPosturalBloodPressurePage(TestCommon):
"""
Setup a session and test that a postural blood pressure
observation can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_pbp_obs(self):
"""
Test that a postural blood pressure observation can be submitted
"""
postural_pressure_inputs = POSTURAL_BLOOD_PRESSURE_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_POSTURAL_PRESSURE)
PatientPage(self.driver).enter_obs_data(postural_pressure_inputs)
success = 'Successfully Submitted Postural Blood Pressure Observation'
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located((
SUCCESSFUL_SUBMIT))
)
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text,
'Postural blood pressure observation unsuccessful')
示例2: TestBloodProductObsPage
class TestBloodProductObsPage(TestCommon):
"""
Setup a session and test that a blood product observation can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_blood_product_obs(self):
"""
Test that a blood product observation can be submitted
"""
blood_product_inputs = BLOOD_PRODUCT_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_BLOOD_PRODUCT)
PatientPage(self.driver).enter_obs_data(blood_product_inputs)
success = "Successfully Submitted Blood Product Observation"
ui.WebDriverWait(self.driver, 5).until(ec.visibility_of_element_located((SUCCESSFUL_SUBMIT)))
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text, "Blood product observation unsuccessful")
示例3: TestWeightObsPage
class TestWeightObsPage(TestCommon):
"""
Setup a session and test that a weight observation can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_weight_obs(self):
"""
Test that a weight observation can be submitted
"""
weight_input = WEIGHT_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_WEIGHT)
PatientPage(self.driver).enter_obs_data(weight_input)
success = 'Successfully Submitted Weight Observation'
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located((
SUCCESSFUL_SUBMIT))
)
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text,
'Weight observation unsuccessful')
示例4: setUp
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.task_list_page = ListPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.task_list_page.go_to_task_list()
示例5: TestBristolStoolObsPage
class TestBristolStoolObsPage(TestCommon):
"""
Setup a session and test that a Bristol stool scale
observation can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_bristol_stool_obs(self):
"""
Test that a Bristol Stool Scale observation can be submitted
"""
bristol_stool_inputs = BRISTOL_STOOL_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(
OPEN_OBS_MENU_BS_SCALE)
PatientPage(self.driver).enter_obs_data(bristol_stool_inputs)
success = 'Successfully Submitted Bristol Stool Scale Observation'
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located((
SUCCESSFUL_SUBMIT))
)
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text,
'Bristol Stool Scale observation unsuccessful')
示例6: TestPatientPageVisualisationWithNoObsData
class TestPatientPageVisualisationWithNoObsData(TestCommon):
"""
Test that the No observation data available for patient message
is shown on no obs being available
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.list_page = ListPage(self.driver)
self.patient_page = PatientPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.list_page.go_to_patient_list()
patients = self.list_page.get_list_items()
patient_to_test = patients[0]
self.patient_url = patient_to_test.get_attribute('href')
patient_id = self.patient_url.replace(
PATIENT_PAGE, ''
)
self.patient_page.remove_observations_for_patient(int(patient_id))
self.driver.get(self.patient_url)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(GRAPH_CHART)
)
def test_shows_message_when_no_obs(self):
"""
Test that the No observation data available for patient message is
shown on no obs being available
"""
self.assertTrue(self.patient_page.has_no_patient_data(),
'No Observation Data Available message not found')
开发者ID:Gimpneek,项目名称:openeobs-quality-assurance,代码行数:33,代码来源:test_patient_page_visualisation_no_obs.py
示例7: TestNewsPage
class TestNewsPage(TestCommon):
"""
Setup a session and test that a no risk NEWS observation
can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_news_obs(self):
"""
Test that a NEWS observation can be submitted
"""
score = NO_RISK_EWS_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_NEWS_ITEM)
PatientPage(self.driver).enter_obs_data(score)
ui.WebDriverWait(self.driver, 5).until(ec.visibility_of_element_located(CONFIRM_SUBMIT))
self.driver.find_element(*CONFIRM_SUBMIT).click()
success = "Successfully Submitted NEWS Observation"
ui.WebDriverWait(self.driver, 5).until(ec.visibility_of_element_located((SUCCESSFUL_SUBMIT)))
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text, "NEWS observation unsuccessful")
示例8: setUp
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.list_page = ListPage(self.driver)
self.task_page = TaskPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.list_page.go_to_task_list()
tasks = self.list_page.get_list_items()
task_to_test = tasks[0]
self.task_url = task_to_test.get_attribute('href')
self.driver.get(self.task_url)
示例9: setUp
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.list_page = ListPage(self.driver)
self.patient_page = PatientPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.list_page.go_to_patient_list()
patients = self.list_page.get_list_items()
patient_to_test = patients[0]
self.patient_url = patient_to_test.get_attribute('href')
self.driver.get(self.patient_url)
示例10: TestMediumRiskPage
class TestMediumRiskPage(TestCommon):
"""
Setup a session and test that a medium risk NEWS observation
can be submitted, and that the correct action triggers
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_medium_risk_obs(self):
"""
Test that an 'urgently inform medical team' task
is triggered after a medium NEWS score
"""
medium_score = MEDIUM_RISK_SCORE_3_THREE_IN_ONE_EWS_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_NEWS_ITEM)
PatientPage(self.driver).enter_obs_data(medium_score)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(CONFIRM_SUBMIT)
)
self.driver.find_element(*CONFIRM_SUBMIT).click()
task = 'Urgently inform medical team'
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(RELATED_TASK)
)
response = self.driver.find_element(*RELATED_TASK)
self.assertEqual(task, response.text,
'Incorrect triggered action for medium risk ob')
示例11: TestGcsObsPage
class TestGcsObsPage(TestCommon):
"""
Setup a session and test that a gcs observation can be submitted
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_gcs_obs(self):
"""
Test that a GCS observation can be submitted
"""
gcs_inputs = GCS_SCORE_15_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_GCS)
PatientPage(self.driver).enter_obs_data(gcs_inputs)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(CONFIRM_SUBMIT)
)
self.driver.find_element(*CONFIRM_SUBMIT).click()
success = 'Successfully Submitted GCS Observation'
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located((
SUCCESSFUL_SUBMIT))
)
response = self.driver.find_element(*SUCCESSFUL_SUBMIT)
self.assertEqual(success, response.text,
'GCS observation unsuccessful')
示例12: TestLowRiskPage
class TestLowRiskPage(TestCommon):
"""
Setup a session and test that a low risk NEWS observation
can be submitted, and that the correct action triggers
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_low_risk_obs(self):
"""
Test that an 'assess patient' task is triggered after a low NEWS score
"""
low_score = LOW_RISK_SCORE_1_EWS_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_NEWS_ITEM)
PatientPage(self.driver).enter_obs_data(low_score)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(CONFIRM_SUBMIT)
)
self.driver.find_element(*CONFIRM_SUBMIT).click()
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(RELATED_TASK)
)
response = self.driver.find_element(*RELATED_TASK)
self.assertEqual(LOW_SCORE_RESPONSE, response.text,
'Incorrect triggered action for low risk ob')
示例13: setUp
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.list_page = ListPage(self.driver)
self.patient_page = PatientPage(self.driver)
self.patient_page_graph = PatientPageGraphs(self.driver)
risk_mapping = {
'none': self.patient_page.add_no_risk_observation,
'low': self.patient_page.add_low_risk_observation,
'medium':
self.patient_page.add_medium_risk_observation,
'high': self.patient_page.add_high_risk_observation,
'3in1': self.patient_page.add_three_in_one_observation
}
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.list_page.go_to_patient_list()
patients = self.list_page.get_list_items()
patient_to_test = patients[0]
patient_id = patient_to_test.get_attribute('href').replace(
PATIENT_PAGE, ''
)
self.patient_page.remove_observations_for_patient(int(patient_id))
risk_mapping[self.risk](int(patient_id))
self.driver.get(patient_to_test.get_attribute('href'))
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located((By.CSS_SELECTOR, '#chart svg')))
self.patient_page.change_to_table()
obs_table = self.patient_page.get_obs_table()
rows = self.patient_page.get_table_rows(obs_table)[1:]
self.row_data = []
for row in rows:
self.row_data.append(self.patient_page.get_table_data(row))
self.patient_page_graph.change_to_chart()
# Focus Graphs
focus_graphs = self.patient_page_graph.get_focus_graphs()
self.assertEqual(len(focus_graphs), 5, 'Incorrect number of graphs')
self.graph_list = []
for graph in focus_graphs:
self.graph_list.append(graph)
self.graph_data = self.get_graph_data()
示例14: TestErrorHandling
class TestErrorHandling(TestCommon):
"""
Setup a session and test that e-Obs error handling works
"""
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.patient_list_page = ListPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.patient_list_page.go_to_patient_list()
def test_news_error(self):
"""
Test that entering incorrect data into a NEWS ob will cause an error
"""
incorrect_score = INCORRECT_EWS_DATA
patients = self.patient_list_page.get_list_items()
PatientPage(self.driver).select_patient(patients)
PatientPage(self.driver).open_form(OPEN_OBS_MENU_NEWS_ITEM)
PatientPage(self.driver).enter_obs_data(incorrect_score)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(TASK_FORM_INVALID_SUBMIT)
)
response = self.driver.find_element(
*TASK_FORM_INVALID_SUBMIT).is_displayed()
self.assertEqual(response, True,
'Incorrect error handling on NEWS form')
def test_barcode_error(self):
"""
Test that entering incorrect data into a barcode scan will
cause an error
"""
no_patient_id = self.patient_list_page.patient_scan_helper(99)
self.patient_list_page.do_barcode_scan(
no_patient_id['other_identifier'])
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(SERVER_ERROR)
)
response = self.driver.find_element(
*SERVER_ERROR).is_displayed()
self.assertEqual(response, True,
'Incorrect error handling on barcode scan')
示例15: setUp
def setUp(self):
self.driver.get(MOB_LOGIN)
self.login_page = LoginPage(self.driver)
self.list_page = ListPage(self.driver)
self.patient_page = PatientPage(self.driver)
self.login_page.login(NURSE_USERNM1, NURSE_PWD1)
self.list_page.go_to_patient_list()
patients = self.list_page.get_list_items()
patient_to_test = patients[0]
self.patient_url = patient_to_test.get_attribute('href')
patient_id = self.patient_url.replace(
PATIENT_PAGE, ''
)
self.patient_page.remove_observations_for_patient(int(patient_id))
self.driver.get(self.patient_url)
ui.WebDriverWait(self.driver, 5).until(
ec.visibility_of_element_located(GRAPH_CHART)
)
开发者ID:Gimpneek,项目名称:openeobs-quality-assurance,代码行数:19,代码来源:test_patient_page_visualisation_no_obs.py