mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-03-25 09:30:23 +00:00
Fix flaky test
This commit is contained in:
parent
e88c0e059c
commit
23e91c8bb0
1 changed files with 7 additions and 2 deletions
|
|
@ -159,9 +159,14 @@ class TestHeavySelect2Mixin(TestSelect2Mixin):
|
|||
|
||||
elem1, elem2 = driver.find_elements_by_css_selector('.select2-selection')
|
||||
elem1.click()
|
||||
result1 = driver.find_element_by_css_selector('.select2-results li:first-child').text
|
||||
|
||||
result1 = WebDriverWait(driver, 10).until(
|
||||
expected_conditions.presence_of_element_located((By.CSS_SELECTOR, '.select2-results li:first-child'))
|
||||
).text
|
||||
elem2.click()
|
||||
result2 = driver.find_element_by_css_selector('.select2-results li:first-child').text
|
||||
result2 = WebDriverWait(driver, 10).until(
|
||||
expected_conditions.presence_of_element_located((By.CSS_SELECTOR, '.select2-results li:first-child'))
|
||||
).text
|
||||
|
||||
assert result1 != result2
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue