diff --git a/app/templates/macros/tokens_macros.html b/app/templates/macros/tokens_macros.html index dda2b4d2..ec97a48d 100644 --- a/app/templates/macros/tokens_macros.html +++ b/app/templates/macros/tokens_macros.html @@ -205,7 +205,7 @@

{{ _('Save checked similar lemma') }}

}; $('td[contenteditable="true"]').on("keyup", function(e){ - if (e.keyCode == 13)  { + if (e.keyCode == 13) { $(this).html($(this).text()) } }); @@ -234,7 +234,7 @@

{{ _('Save checked similar lemma') }}

}); {% endif %} - {% if 'pos' in visible %} + {% if 'POS' in visible %} $('td.token_pos').autoComplete({ minChars: 1, source: function(term, suggest){ diff --git a/tests/test_selenium/test_token_correct.py b/tests/test_selenium/test_token_correct.py index 878314cd..49d7baad 100644 --- a/tests/test_selenium/test_token_correct.py +++ b/tests/test_selenium/test_token_correct.py @@ -47,6 +47,17 @@ def test_edit_POS(self): self.assert_token_has_values(token, lemma="de", POS="ADJqua") self.assert_saved(row) + def test_edit_POS_autoselect(self): + """ [Wauchier] Edit POS of a token with autoselection """ + self.addCorpus(with_token=True, with_allowed_lemma=True, with_allowed_pos=True, tokens_up_to=24) + self.driver.refresh() + token, status_text, row = self.edith_nth_row_value( + "ADJ", id_row="1", value_type="POS", + autocomplete_selector=".autocomplete-suggestion[data-val='ADJqua']" + ) + self.assert_token_has_values(token, lemma="de", POS="ADJqua") + self.assert_saved(row) + def test_edit_morph(self): """ [Wauchier] Edit morph of a token """ self.addCorpus(with_token=True, with_allowed_lemma=True, tokens_up_to=24)