Skip to content

Commit b549c9f

Browse files
authored
Ref #796: Wait for specific text in UI instead of arbitrary wait (#801)
* Ref #796: Wait for specific text in UI instead of arbitrary wait * make lint
1 parent 0876a1c commit b549c9f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

browser-tests/test_review.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import re
2-
import time
32

43
from playwright.sync_api import expect
54

@@ -153,9 +152,9 @@ def test_review_existing_record(
153152
page.get_by_text("Request review...").first.click()
154153
page.get_by_placeholder("Comment...").last.fill("Modified record and attachment")
155154
page.get_by_text("Request review").last.click()
155+
expect(page.get_by_text("Review requested.")).to_be_visible()
156156

157157
# Check that preview record has the appropriate values
158-
time.sleep(1) # wait 1 second as the preview collection can take a few ms to sync
159158
record = editor_client.get_record(id=record_id, bucket=preview_bucket)
160159
assert record["data"]["title"] == "new val"
161160
assert record["data"]["attachment"]["filename"] == "kinto-logo.jpg"

0 commit comments

Comments
 (0)