Skip to content
Snippets Groups Projects

Resolve "Sort updated comments chronoligically"

Merged Dominik Seeger requested to merge 167-sort-updated-comments-chronoligically into master
1 file
+ 43
0
Compare changes
  • Side-by-side
  • Inline
@@ -225,6 +225,49 @@ class UntestedParent:
def test_comments_are_sorted_by_last_updated(self):
self._login()
go_to_subscription(self)
score_input = self.browser.find_element_by_id('score-input')
score_input.send_keys(self.sub_type.full_score)
# give feedback on first line
self.write_comments_on_lines([(1, 'first ever comment')])
submit_btn = self.browser.find_element_by_id('submit-feedback')
submit_btn.click()
sub_url = 'subscription/' + str(self.sub_type.pk) + '/ended'
WebDriverWait(self.browser, 10).until(ec.url_contains(sub_url))
reset_browser_after_test(self.browser, self.live_server_url) # logs out user
user_snd = 'tutor_snd'
password = 'p'
fact.UserAccountFactory(username=user_snd, password=password)
login(self.browser, self.live_server_url, user_snd, password)
go_to_subscription(self, stage='validate')
self.write_comments_on_lines([(1, 'the second comment')])
self.browser.find_element_by_id('score-full').click()
self.browser.find_element_by_id('submit-feedback').click()
sub_url = 'subscription/' + str(self.sub_type.pk) + '/ended'
WebDriverWait(self.browser, 10).until(ec.url_contains(sub_url))
reset_browser_after_test(self.browser, self.live_server_url) # logs out user
self._login()
# goto history
score_input = self.browser.find_element_by_id('score-input')
score_input.send_keys(self.sub_type.full_score)
# validate that second comment is under the first comment
# give feedback on first line
self.write_comments_on_lines([(1, 'first comment updated')])
# validate that the edited first comment is under the second comment
class TestFeedbackCreationTutor(UntestedParent.TestFeedbackCreationGeneric):
Loading