Skip to content

Commit 8fbaebd

Browse files
authored
chore: merge release in master (#459) (#460)
* fix: vue tests with appium (#459) * update core test value
1 parent c5bf38d commit 8fbaebd

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

core_tests/unit/utils/wait_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_10_wait(self):
2121
@timed(5)
2222
def test_20_get_average_time(self):
2323
ls_time = PerfUtils.get_average_time(lambda: run(cmd='ifconfig'), retry_count=5)
24-
assert 0.005 <= ls_time <= 0.05, "Command not executed in acceptable time. Actual value: " + str(ls_time)
24+
assert 0.004 <= ls_time <= 0.05, "Command not executed in acceptable time. Actual value: " + str(ls_time)
2525

2626
@staticmethod
2727
def seconds_are_odd():

data/sync/master_detail_vue.py

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,28 @@
2020

2121

2222
def sync_master_detail_vue(app_name, platform, device):
23-
# Execute tns command
24-
log_trace = False
23+
# workaraund for appium restarting application when attaching
2524
if platform == Platform.IOS:
26-
# Temporary add log trace on iOS to debug an issue
27-
log_trace = True
28-
result = Tns.run(app_name=app_name, platform=platform, emulator=True, log_trace=log_trace, wait=False)
29-
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.FULL, app_type=AppType.VUE,
30-
transfer_all=True)
31-
TnsLogs.wait_for_log(log_file=result.log_file, string_list=strings, timeout=360)
25+
result = Tns.run(app_name=app_name, emulator=True, platform=platform, just_launch=True)
26+
strings = TnsLogs.run_messages(app_name=app_name, platform=platform,
27+
run_type=RunType.JUST_LAUNCH, device=device, just_launch=True)
28+
TnsLogs.wait_for_log(log_file=result.log_file, string_list=strings, timeout=360)
29+
device.wait_for_text(text="Ford KA")
30+
# start appium driver (need it on iOS only)
31+
appium = AppiumDriver(platform=platform, device=device, bundle_id=TnsPaths.get_bundle_id(app_name))
3232

33-
# start appium driver (need it on iOS only)
34-
appium = None
33+
result = Tns.run(app_name=app_name, platform=platform, emulator=True, wait=False)
3534
if platform == Platform.IOS:
36-
appium = AppiumDriver(platform=platform, device=device, bundle_id=TnsPaths.get_bundle_id(app_name))
35+
# because of workaround for appium this run is not first run on ios
36+
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.INCREMENTAL,
37+
app_type=AppType.VUE, transfer_all=True)
38+
strings.remove('Refreshing application on device')
39+
strings.append('Restarting application on device')
40+
else:
41+
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.FULL,
42+
app_type=AppType.VUE, transfer_all=True)
43+
44+
TnsLogs.wait_for_log(log_file=result.log_file, string_list=strings, timeout=360)
3745

3846
# Verify app home page looks properly
3947
device.wait_for_text(text="Ford KA")
@@ -89,5 +97,7 @@ def sync_master_detail_vue(app_name, platform, device):
8997
device.wait_for_text(text=Changes.MasterDetailVUE.VUE_DETAIL_PAGE_TEMPLATE.new_text)
9098

9199
# Kill Appium
92-
if appium is not None:
93-
appium.stop()
100+
if platform == Platform.IOS:
101+
# Kill Appium
102+
if appium is not None:
103+
appium.stop()

0 commit comments

Comments
 (0)