Fix tests in Receive Mode that actually do increment the history item widget count where they didn't previously (due to an additional GET that follows the 302 redirect of a POST request on upload)

This commit is contained in:
Miguel Jacq 2019-09-09 12:19:39 +10:00
parent 26c9256679
commit 8e238ab2d6
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
2 changed files with 4 additions and 30 deletions

View file

@ -116,7 +116,7 @@ class GuiBaseTest(object):
self.assertEqual(mode.history.isVisible(), not currently_visible)
def history_indicator(self, mode, public_mode):
def history_indicator(self, mode, public_mode, indicator_count="1"):
'''Test that we can make sure the history is toggled off, do an action, and the indiciator works'''
# Make sure history is toggled off
if mode.history.isVisible():
@ -147,7 +147,7 @@ class GuiBaseTest(object):
# Indicator should be visible, have a value of "1"
self.assertTrue(mode.toggle_history.indicator_label.isVisible())
self.assertEqual(mode.toggle_history.indicator_label.text(), "1")
self.assertEqual(mode.toggle_history.indicator_label.text(), indicator_count)
# Toggle history back on, indicator should be hidden again
QtTest.QTest.mouseClick(mode.toggle_history, QtCore.Qt.LeftButton)