Skip to content

Commit

Permalink
modification tests suite à ajout choix case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliettejns committed Mar 13, 2024
1 parent ede5b39 commit dce862f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/test_selenium/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,12 @@ def setUp(self):
db.session.add(new_token)
db.session.commit()

def search(self, form="", lemma="", pos="", morph=""):

def search(self, form="", lemma="", pos="", morph="", case=False):
print(case)
self.go_to_search_tokens_page(TokensSearchThroughFieldsBase.CORPUS_ID, as_callback=False)

self.fill_filter_row(form, lemma, pos, morph)

if case:
self.driver_find_element_by_id('caseBox').click()
self.driver_find_element_by_id("submit_search").click()

result = []
Expand Down
3 changes: 2 additions & 1 deletion tests/test_selenium/test_tokens_search_through_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def test_search_with_negation_and_like_operator(self):
def test_search_with_or_operator(self):
# search with OR operator
rows = self.search(form="seint|seinz|Seinz|seinte")
rows_wildcard = self.search(form="sein*")
rows_wildcard = self.search(form="sein*", case=True)

rows_lemma = self.search(lemma="saint")
self.assertTrue(rows_lemma == rows and rows == rows_wildcard)

Expand Down

0 comments on commit dce862f

Please sign in to comment.