Skip to content

Commit 27f8687

Browse files
committed
Upgrade playwright to 1.37.0
1 parent 71fb2ac commit 27f8687

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Diff for: .github/workflows/e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
python-version: '3.9'
169169
- name: Installing playwright
170170
run: |
171-
pip install playwright==1.35.0
171+
pip install playwright==1.37.0
172172
playwright install
173173
playwright install-deps
174174
- name: Download dfx binary

Diff for: scripts/test-uis.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,26 @@ def _test_candid_ui_handler(page):
177177
_set_text(page, 'text', text)
178178
_click_button(page, 'Query')
179179

180+
# Check if `#output-list` is populated correctly (after the first click)
181+
output_list_id = '#output-list'
182+
timeout_ms = 60000
183+
_ = page.wait_for_selector(output_list_id, timeout=timeout_ms)
184+
180185
# Reset the text & Click the "Random" button
181186
_set_text(page, 'text', '')
182187
_click_button(page, 'Random')
183188
# ~
184189

185-
# Check if `#output-list` is populated correctly
186-
output_list_id = '#output-list'
187-
timeout_ms = 60000
190+
# Check if `#output-list` is populated correctly (after the second click)
188191
output_list_obj = page.wait_for_selector(output_list_id, timeout=timeout_ms)
189192
if output_list_obj:
190193
output_list_lines = output_list_obj.inner_text().split('\n')
191194
actual_num_lines, expected_num_lines = len(output_list_lines), 4
192195
if actual_num_lines != expected_num_lines:
193-
raise RuntimeError(f'Expected {expected_num_lines} lines of text but found {actual_num_lines}')
196+
err = [f'Expected {expected_num_lines} lines of text but found {actual_num_lines}']
197+
err.append('Lines:')
198+
err.extend(output_list_lines)
199+
raise RuntimeError('\n'.join(err))
194200

195201
# Extract random text from third line
196202
random_text = re.search(r'"([^"]*)"', output_list_lines[2])

0 commit comments

Comments
 (0)