Skip to content

Commit

Permalink
Playwright sometimes fails on GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Apr 12, 2024
1 parent c99d33c commit bc19cfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion testapp/tests/test_e2e_datetimerange.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def test_daterange_initial(page, mocker, viewname):
assert request['formset_data']['range'] == ['2023-08-08', '2023-10-10']


#@pytest.mark.xfail(reason="Playwright sometimes fails on GitHub actions")
@pytest.mark.urls(__name__)
@pytest.mark.parametrize('viewname', ['booking'])
def test_daterange_set(page, mocker, viewname):
Expand Down
4 changes: 2 additions & 2 deletions testapp/tests/test_e2e_optgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def test_many_counties(page, form, viewname):
assert selector.evaluate('elem => Array.from(elem.selectedOptions).map(o => o.value)') == expected


#@pytest.mark.xfail("Playwrite ")
@pytest.mark.xfail(reason="Playwright sometimes fails on GitHub actions")
@pytest.mark.urls(__name__)
@pytest.mark.parametrize('viewname', ['sortable_counties'])
def test_sortable_counties(page, form, viewname):
Expand All @@ -235,7 +235,7 @@ def test_sortable_counties(page, form, viewname):
before = [select_right.locator('optgroup option').nth(i).get_attribute('value') for i in range(5)]
select_right.locator('optgroup').first.locator('option').last.drag_to(select_right.locator('optgroup').first.locator('option').first)
select_right.locator('optgroup').first.locator('option').nth(1).drag_to(select_right.locator('optgroup').locator('option').last)
sleep(0.7) # Sortable.js has a delay of 300ms
sleep(0.4) # Sortable.js has a delay of 300ms
after = [select_right.locator('optgroup option').nth(i).get_attribute('value') for i in range(5)]
before.insert(0, before.pop(4)) # emulate dragging
before.append(before.pop(1))
Expand Down

0 comments on commit bc19cfa

Please sign in to comment.