Skip to content

chore: merge release in master (#459) #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core_tests/unit/utils/wait_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_10_wait(self):
@timed(5)
def test_20_get_average_time(self):
ls_time = PerfUtils.get_average_time(lambda: run(cmd='ifconfig'), retry_count=5)
assert 0.005 <= ls_time <= 0.05, "Command not executed in acceptable time. Actual value: " + str(ls_time)
assert 0.004 <= ls_time <= 0.05, "Command not executed in acceptable time. Actual value: " + str(ls_time)

@staticmethod
def seconds_are_odd():
Expand Down
36 changes: 23 additions & 13 deletions data/sync/master_detail_vue.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,28 @@


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

# start appium driver (need it on iOS only)
appium = None
result = Tns.run(app_name=app_name, platform=platform, emulator=True, wait=False)
if platform == Platform.IOS:
appium = AppiumDriver(platform=platform, device=device, bundle_id=TnsPaths.get_bundle_id(app_name))
# because of workaround for appium this run is not first run on ios
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.INCREMENTAL,
app_type=AppType.VUE, transfer_all=True)
strings.remove('Refreshing application on device')
strings.append('Restarting application on device')
else:
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.FULL,
app_type=AppType.VUE, transfer_all=True)

TnsLogs.wait_for_log(log_file=result.log_file, string_list=strings, timeout=360)

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

# Kill Appium
if appium is not None:
appium.stop()
if platform == Platform.IOS:
# Kill Appium
if appium is not None:
appium.stop()