Skip to content

Commit 3d56a16

Browse files
committed
test: fix sync pattern check
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
1 parent 7a9efb4 commit 3d56a16

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

test/gui/helpers/SyncHelper.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,12 @@ def generate_sync_pattern_from_messages(messages):
173173

174174
sync_messages = filter_sync_messages(messages)
175175
for message in sync_messages:
176-
# E.g; from "STATUS:OK:/tmp/client-bdd/Alice/"
176+
# E.g; from;
177+
# Linux: "STATUS:OK:/tmp/client-bdd/Alice/"
178+
# Win: "STATUS:OK:C:\tmp\client-bdd\Alice\"
177179
# excludes ":/tmp/client-bdd/Alice/"
178180
# adds only "STATUS:OK" to the pattern list
179-
if match := re.search(':(/|[A-Z]{1}:\\\\|[A-Z]{1}:\/).*', message):
181+
if match := re.search(r':(/|[A-Za-z]:[\\/]).*', message):
180182
(end, _) = match.span()
181183
# shared resources will have status like "STATUS:OK+SWM"
182184
status = message[:end].replace('+SWM', '')
@@ -361,10 +363,10 @@ def make_available_locally(resource_path):
361363

362364

363365
def wait_for(condition, timeout, interval=0.5):
364-
start = time.time()
366+
start = time.time() * 1000
365367
while True:
366368
if condition():
367369
return True
368-
if time.time() - start > timeout:
370+
if time.time() * 1000 - start > timeout:
369371
return False
370372
time.sleep(interval)

test/gui/steps/account_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def step(context):
2929
account_details = get_client_details(data_table)
3030
AccountConnectionWizard.add_account(account_details)
3131
# # wait for files to sync
32-
# wait_for_initial_sync_to_complete(get_resource_path('/', account_details['user']))
32+
wait_for_initial_sync_to_complete(get_resource_path('/', account_details['user']))
3333

3434

3535
@Then('the account with displayname "{displayname}" should be displayed')

0 commit comments

Comments
 (0)