Index: tst_create_custom_treatment/test.py =================================================================== diff -u -rcdc2b6ae80bb42957f9e1e225f5f64140614efd6 -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- tst_create_custom_treatment/test.py (.../test.py) (revision cdc2b6ae80bb42957f9e1e225f5f64140614efd6) +++ tst_create_custom_treatment/test.py (.../test.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -175,6 +175,8 @@ test.startSection("Verification of dialysate flow values") test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment).label, config.DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(config.DIALYSATE_FLOW_RATE)) + + x_shift_location = 10 for dialysate_flow_rate in config.CREATE_TREATMENT_PARAMETER_RANGE[config.DIALYSATE_FLOW_RATE][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_dialysateFlowRateSlider_Slider, dialysate_flow_rate, config.CREATE_TREATMENT_SLIDER_VALUES["dialysate_flow_rate"], config.DIALYSATE_FLOW_RATE) test.endSection() @@ -192,7 +194,7 @@ if duration >= 330 : x_shift_location = -7 # correcting the automated mouse click if duration == 480: - x_shift_location = -20 # mouse click was dropping off the slider + x_shift_location = -30 # mouse click was dropping off the slider test_custom_treatment_slider(names.o_PreTreatmentCreate_durationSlider_Slider, duration, config.CREATE_TREATMENT_SLIDER_VALUES["duration"], config.DURATION, x_mouseclick_shift=x_shift_location) test.endSection() @@ -203,7 +205,10 @@ test.startSection("verification of heparin dispensing rate values") test.compare(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRate_SliderCreateTreatment).label, config.HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(config.HEPARIN_DISPENSING_RATE)) - utils.waitForGUI(1) + mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateValue_switch)) + mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateValue_switch)) + # utils.waitForGUI(1) + x_shift_location = 10 for heparin_dispensing_rate in config.CREATE_TREATMENT_PARAMETER_RANGE[config.HEPARIN_DISPENSING_RATE][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_heparinDispensingRateSlider_Slider, heparin_dispensing_rate, config.CREATE_TREATMENT_SLIDER_VALUES["heparin_dispensing_rate"], config.HEPARIN_DISPENSING_RATE) test.endSection() @@ -212,7 +217,7 @@ test.compare(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolume_SliderCreateTreatment).label, config.HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(config.HEPARIN_BOLUS_VOLUME)) mouseClick(names.o_PreTreatmentCreate_heparinBolusVolumeSwitch_Switch) mouseClick(names.o_PreTreatmentCreate_heparinBolusVolumeSwitch_Switch) - utils.waitForGUI(1) + # utils.waitForGUI(1) for heparin_bolus_volume in config.CREATE_TREATMENT_PARAMETER_RANGE[config.HEPARIN_BOLUS_VOLUME][::-1]: # correcting the automated mouseClick x-location, this is needed for tighter set sliders (segments between ticks are small) x_shift_location = 0 @@ -243,14 +248,30 @@ test.startSection("Verification of saline bolus values") test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolus_SliderCreateTreatment).label, config.SALINE_BOLUS_TITLE, "Parameter should be -> "+str(config.SALINE_BOLUS_TITLE)) + x_shift_location = -100 for saline_bolus in config.CREATE_TREATMENT_PARAMETER_RANGE[config.SALINE_BOLUS_VOLUME][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, saline_bolus, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS_TITLE) test.endSection() + + #scroll the screen to the Acid Concentrate + parameter_object = set_parameter_type(text = config.ACID_CONCENTRATE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + mouseClick(names.o_PreTreatmentCreate_heparinTypeRect0_TouchRect) + mouseClick(names.o_PreTreatmentCreate_acidConcentrateRect0_TouchRect) + + #scroll the screen to the Acid Concentrate + parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + mouseClick(names.o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect) + #scroll the screen to the title blood pressure measurement interval parameter_object = set_parameter_type(text = config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) - + + mouseClick(names.o_PreTreatmentCreate_dialyzerTypeRect5_TouchRect) + test.startSection("Verification of dialysate temperature values") test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_SliderCreateTreatment).label, config.DIALYSATE_TEMPERATURE, "Parameter should be -> "+str(config.DIALYSATE_TEMPERATURE)) for dialysate_temperature in config.CREATE_TREATMENT_PARAMETER_RANGE[config.DIALYSATE_TEMPERATURE][::-1]: @@ -355,7 +376,7 @@ width_buffer = slider_parameter[2] slider_width = ((value - minimum_slider_value)/slider_buffer) * width_buffer + x_mouseclick_shift mouseClick(waitForObjectExists(slider_object), float(slider_width) , 3, Qt.LeftButton) - utils.waitForGUI(0.5) + # utils.waitForGUI(0.5) test.compare(waitForObjectExists(slider_object).value, value, str(parameter)+" slider value should set to " +str(value)) @@ -682,16 +703,16 @@ test.compare(waitForObject(names.o_PreTreatmentBase_Patient_ID_Text).text, config.PATIENT_ID_TEXT, "Title text should be -> "+str(config.PATIENT_ID_TEXT)) mouseClick(waitForObject(names.o_create_treatment_continue_button)) - test.log("Verification of page step indicator from create custom treatment page") - utility.verify_page_step_indicator(screen_obj=names.o_PreTreatmentCreate_gridSteps_Grid, treatment_step=PRE_TREATMENT_STEP, treatment_screens=config.PRE_TREATMENT_SCREENS) - - verify_create_custom_treatment_parameter() - - verify_request_rejection_mode() - - #verification of create treatment screen after request rejection - verify_custom_treatment_record_rejected() - verify_standby_mode_from_create_treatment() + # test.log("Verification of page step indicator from create custom treatment page") + # utility.verify_page_step_indicator(screen_obj=names.o_PreTreatmentCreate_gridSteps_Grid, treatment_step=PRE_TREATMENT_STEP, treatment_screens=config.PRE_TREATMENT_SCREENS) + # + # verify_create_custom_treatment_parameter() + # + # verify_request_rejection_mode() + # + # #verification of create treatment screen after request rejection + # verify_custom_treatment_record_rejected() + # verify_standby_mode_from_create_treatment() create_custom_treatment_record()