Skip to content

Commit

Permalink
Upgrade playwright to 1.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicu committed Sep 12, 2023
1 parent 71fb2ac commit 27f8687
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
python-version: '3.9'
- name: Installing playwright
run: |
pip install playwright==1.35.0
pip install playwright==1.37.0
playwright install
playwright install-deps
- name: Download dfx binary
Expand Down
14 changes: 10 additions & 4 deletions scripts/test-uis.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,26 @@ def _test_candid_ui_handler(page):
_set_text(page, 'text', text)
_click_button(page, 'Query')

# Check if `#output-list` is populated correctly (after the first click)
output_list_id = '#output-list'
timeout_ms = 60000
_ = page.wait_for_selector(output_list_id, timeout=timeout_ms)

# Reset the text & Click the "Random" button
_set_text(page, 'text', '')
_click_button(page, 'Random')
# ~

# Check if `#output-list` is populated correctly
output_list_id = '#output-list'
timeout_ms = 60000
# Check if `#output-list` is populated correctly (after the second click)
output_list_obj = page.wait_for_selector(output_list_id, timeout=timeout_ms)
if output_list_obj:
output_list_lines = output_list_obj.inner_text().split('\n')
actual_num_lines, expected_num_lines = len(output_list_lines), 4
if actual_num_lines != expected_num_lines:
raise RuntimeError(f'Expected {expected_num_lines} lines of text but found {actual_num_lines}')
err = [f'Expected {expected_num_lines} lines of text but found {actual_num_lines}']
err.append('Lines:')
err.extend(output_list_lines)
raise RuntimeError('\n'.join(err))

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

0 comments on commit 27f8687

Please sign in to comment.