Flaky test: TestModuleSearch.test_result_cards
______________________ TestModuleSearch.test_result_cards ______________________
self = <test.selenium.test_common_search_page.TestModuleSearch object at 0xffff96db4c50>
def test_result_cards(self):
"""Check result cards in common search page."""
self.selenium_instance.get(self.get_url('/search?q=mixed'))
self.wait_for_element(By.ID, "contributed-providersearch.mixedsearch-result.1.0.0")
# Check provider cards
provider_cards = [
{"link": "/providers/providersearch-trusted/mixedsearch-trusted-second-result", "text": "providersearch-trusted / mixedsearch-trusted-second-result"},
{"link": "/providers/providersearch-trusted/mixedsearch-trusted-result-multiversion", "text": "providersearch-trusted / mixedsearch-trusted-result-multiversion"},
{"link": "/providers/providersearch-trusted/mixedsearch-trusted-result", "text": "providersearch-trusted / mixedsearch-trusted-result"},
{"link": "/providers/contributed-providersearch/mixedsearch-result-multiversion", "text": "contributed-providersearch / mixedsearch-result-multiversion"},
{"link": "/providers/contributed-providersearch/mixedsearch-result", "text": "contributed-providersearch / mixedsearch-result"},
]
for card in self.selenium_instance.find_element(By.ID, "results-providers-content").find_elements(By.CLASS_NAME, "result-box"):
card_details = provider_cards.pop(0)
for link in card.find_elements(By.TAG_NAME, "a"):
> assert link.get_attribute("href") == self.get_url(card_details["link"])
E AssertionError: assert 'http://local...-multiversion' == 'http://local...second-result'
E - http://localhost:20181/providers/providersearch-trusted/mixedsearch-trusted-second-result
E + http://localhost:20181/providers/contributed-providersearch/mixedsearch-result-multiversion
test/selenium/test_common_search_page.py:86: AssertionError