Open toni-sissala opened 1 year ago
I'm unable to reproduce this on my development environment. I had a look at jenkins.cessda.eu and it seems that this failure has not been happening for a while, so I'm not sure if there is anything to do here.
I did see - and was able to reproduce - another unrelated failure (https://jenkins.cessda.eu/view/CDC/job/cessda.cdc.test/job/main/405/execution/node/112/log/):
========================================= FAILURES ==========================================
__________________ FirefoxTestCase.test_find_studies_in_french_with_topic ___________________
self = <test_cdc_firefox.FirefoxTestCase testMethod=test_find_studies_in_french_with_topic>
def test_find_studies_in_french_with_topic(self):
"""As a user I am interested in finding studies for a
specific language that are within a specified topic
- https://github.com/cessda/cessda.cdc.versions/issues/588
"""
# I use the language selection functionality next to the search box
self._change_catalogue_lang("French")
# After clicking on the Topic bar in the menu at the left,
# I can start to type the topic I am interested in or
# select from the list
self.driver.find_element(
By.XPATH,
"//div[contains(concat(' ', @class, ' '), ' filter--classifications.term ')]/div",
).click()
self.driver.find_element(
By.XPATH, '//div[@id="react-select-3--value"]/div[2]/input'
).send_keys("Edu")
first_opt_el = self.driver.find_element(
By.XPATH, '//div[@id="react-select-3--option-0"]'
)
selected_option_text = first_opt_el.text
first_opt_el.click()
# I expect to see results with the specified language and topic
sk_hits_el = self.driver.find_elements(
By.XPATH, "//div[@class='sk-hits-stats__info']"
)[0]
assert " studies found in French from a total of " in sk_hits_el.text
# make sure the selected topic is active in GUI
selected_topic = self.driver.find_element(
By.XPATH, '//span[@id="react-select-3--value-0"]/span[1]'
)
> assert selected_topic.text == selected_option_text
E AssertionError: assert 'éducation et formation' == 'éducation et formation (117)'
E - éducation et formation (117)
E ? ------
E + éducation et formation
src/common.py:599: AssertionError
================================== short test summary info ==================================
FAILED src/test_cdc_firefox.py::FirefoxTestCase::test_find_studies_in_french_with_topic - AssertionError: assert 'éducation et formation' == 'éducation et formation (117)'
My understanding of this is that for some reason the topic-filter is not working properly in "datacatalogue-dev.cessda.eu", and this is an actual error in CDC in this particular environment. It does work as expected in production environment.
Any thoughts @matthew-morris-cessda ?
src/cdc_test_firefox.py::FirefoxTestCase::test_sort_by_collection_date keeps failing with StaleElementReferenceException.