diff --git a/cases/smoke/basic/screenshot32/new_script/resource/entry-default-signed.hap b/cases/smoke/basic/screenshot32/new_script/resource/entry-default-signed.hap index 31b830b678ca4d8b57484ce429d5329f129f9227..b057183de6e708da0b990f96be3c1d8cf4a206cd 100644 Binary files a/cases/smoke/basic/screenshot32/new_script/resource/entry-default-signed.hap and b/cases/smoke/basic/screenshot32/new_script/resource/entry-default-signed.hap differ diff --git a/cases/smoke/basic/screenshot32/new_script/testcases/test_hap.py b/cases/smoke/basic/screenshot32/new_script/testcases/test_hap.py index c4080611ceabf21b4ef4a96d3f23c619bdf1c837..46591f6844964025f7fb6d7aa349808b81dbdd3f 100644 --- a/cases/smoke/basic/screenshot32/new_script/testcases/test_hap.py +++ b/cases/smoke/basic/screenshot32/new_script/testcases/test_hap.py @@ -12,7 +12,6 @@ def uninstall_hap(device): yield try: device.uninstall_hap('com.example.helloworld') - device.uninstall_hap('com.example.corodemo.helloworld') except: pass @@ -20,8 +19,6 @@ def uninstall_hap(device): class Test: ability_name = 'EntryAbility' bundle_name = 'com.example.helloworld' - ability_name1= 'EntryAbility' - bundle_name1 = 'com.example.corodemo.helloworld' @pytest.mark.parametrize('setup_teardown', [None], indirect=True) def test(self, setup_teardown, device): @@ -38,17 +35,3 @@ class Test: similarity = compare_image_similarity(main_page, stand_pic) assert similarity > 0.8, '截图对比失败' - - logging.info('install hap1') - hap_path = os.path.join(device.resource_path, 'entry-default-signed1.hap') - device.install_hap(hap_path) - time.sleep(2) - logging.info('start app') - device.start_ability(self.bundle_name1, self.ability_name1) - time.sleep(4) - main_page = device.save_snapshot_to_local('{}_hap1.jpeg'.format(device.sn)) - crop_picture(picture=main_page, x1=0, y1=72, x2=160, y2=162) - stand_pic = os.path.join(device.resource_path, 'hap.jpeg') - - similarity = compare_image_similarity(main_page, stand_pic) - assert similarity > 0.8, '截图对比失败'