Skip to content

Commit

Permalink
ajout test corpus name unique user
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliettejns committed Mar 15, 2024
1 parent 71ee6e6 commit 717ad22
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_selenium/test_corpus_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,3 +602,24 @@ def test_registration_without_field_length_violation(self):
self.driver_find_element_by_id("submit").click()
self.driver.implicitly_wait(15)
self.assertFalse(self.driver_find_elements_by_css_selector(".alert.alert-danger"))

def test_corpus_name_unique_user(self):
self.add_control_lists()
self.add_user("foo", "foo")
self.login("%s.%[email protected]" % ("foo", "foo"), self.app.config['ADMIN_PASSWORD'])
self.addCorpus("wauchier", cl=False)
self.add_user("bar", "bar")
self.login("%s.%[email protected]" % ("bar", "bar"), self.app.config['ADMIN_PASSWORD'])
self.driver_find_element_by_id("new_corpus_link").click()
self.driver_find_element_by_id("corpusName").send_keys("Wauchier")
self.driver_find_element_by_id("label_checkbox_reuse").click()
self.driver_find_element_by_id("control_list_select").click()

self.writeMultiline(
self.driver_find_element_by_id("tokens"),
f"form\tlemma\tPOS\tmorph\nSOIGNORS\tseignor\tNOMcom\tNOMB.=p|GENRE=m|CAS=n"
)
self.driver_find_element_by_id("submit").click()
self.driver.get_screenshot_as_file('/home/jjanes/Documents/pyrrha/img.png')
self.driver.implicitly_wait(5)
self.assertFalse(self.driver_find_elements_by_css_selector(".alert.alert-danger"))

0 comments on commit 717ad22

Please sign in to comment.