in pages/desktop/frontend/collections.py [0:0]
def click_delete_note(self):
self.wait.until(
EC.element_to_be_clickable(self._delete_addon_note_button_locator)
)
self.find_element(*self._delete_addon_note_button_locator).click()
# waiting for the comment textarea to be closed after the note is deleted
try:
self.wait.until(
EC.invisibility_of_element_located(
self._add_note_textarea_locator
),
message="The collection note could not be deleted",
)
# if the note could not be deleted because of a field error,
# we need to catch that error and force the test to fail
except TimeoutException:
error = self.driver.find_element(
By.CSS_SELECTOR, ".ErrorList p"
).text
pytest.fail(error)