Index: tst_create_custom_treatment/test.py =================================================================== diff -u -r6bb28dbaadabd61c0ecff12d6a365184a982a5e5 -r30cd5eac3a1d03a95d141f9c07499e1bea7cb97c --- tst_create_custom_treatment/test.py (.../test.py) (revision 6bb28dbaadabd61c0ecff12d6a365184a982a5e5) +++ tst_create_custom_treatment/test.py (.../test.py) (revision 30cd5eac3a1d03a95d141f9c07499e1bea7cb97c) @@ -175,9 +175,9 @@ test.endSection() 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)) + test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolus_SliderCreateTreatment).label, config.SALINE_BOLUS_TITLE, "Parameter should be -> "+str(config.SALINE_BOLUS_TITLE)) for saline_bolus in config.CREATE_TREATMENT_PARAMETER_RANGE[config.SALINE_BOLUS][::-1]: - test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, saline_bolus, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS) + 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 title blood pressure measurement interval @@ -247,12 +247,9 @@ prescription_title = waitForObject(prescription_measurement_title(text=expected_prescription_title)) actual_measurement = object.parent(prescription_title) actual_measurement = object.children(actual_measurement)[-1] - test.compare(expected_prescription_title, prescription_title.text.toUtf8().constData(), - "title should be " + expected_prescription_title) + test.compare(expected_prescription_title, prescription_title.text.toUtf8().constData(), "title should be " + expected_prescription_title) unit = config.CREATE_CUSTOM_TREATMENT[expected_prescription_title] - test.compare(str(unit)+ " " +str(measurement), actual_measurement.text, - expected_prescription_title + " corresponding "+ - "measured value should be " + str(unit)+" "+str(measurement)) + test.compare(str(unit)+ " " +str(measurement), actual_measurement.text, expected_prescription_title + " corresponding measured value should be " + str(unit)+" "+str(measurement)) test.endSection() @@ -268,15 +265,11 @@ utility.scroll_to_zone(parameter_object, names.o_treatment_confirm_flickable) for expected_operational_title, measurement in config.OPERATIONAL_PARAMETERS.items(): - operational_title = waitForObject(prescription_measurement_title(\ - text=expected_operational_title)) + operational_title = waitForObject(prescription_measurement_title(text=expected_operational_title)) actual_measurement = object.parent(operational_title) actual_measurement = object.children(actual_measurement)[-1] - test.compare(expected_operational_title, operational_title.text.toUtf8().constData(), - expected_operational_title + " title should be " + expected_operational_title) - test.compare(measurement, actual_measurement.text.toUtf8().constData(), - expected_operational_title +" corresponding "+ - "measured value should be " + measurement) + test.compare(expected_operational_title, operational_title.text.toUtf8().constData(), expected_operational_title + " title should be " + expected_operational_title) + test.compare(measurement, actual_measurement.text.toUtf8().constData(), expected_operational_title +" corresponding measured value should be " + measurement) test.endSection() @@ -411,9 +404,9 @@ test.endSection() 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)) + test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolus_SliderCreateTreatment).label, config.SALINE_BOLUS_TITLE, "Parameter should be -> "+str(config.SALINE_BOLUS_TITLE)) for saline_bolus in config.CREATE_TREATMENT_PARAMETER_RANGE[config.SALINE_BOLUS_VOLUME]: - test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, saline_bolus, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS) + test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, saline_bolus, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS_TITLE) test.endSection() test.compare(waitForObject(names.o_PreTreatmentCreate_OPERATING_PARAMETERS_Text).text, config.OPERATING_PARAMETERS_TEXT, "Title text should be -> "+str(config.OPERATING_PARAMETERS_TEXT))