diff --git a/tcms/core/tests/test_views.py b/tcms/core/tests/test_views.py index 539d7df818..254cf2aeaa 100644 --- a/tcms/core/tests/test_views.py +++ b/tcms/core/tests/test_views.py @@ -18,6 +18,8 @@ from tcms.tests import user_should_have_perm from tcms.tests.factories import UserFactory from tcms.tests.factories import TestPlanFactory +from tcms.tests.factories import TestRunFactory +from tcms.tests.factories import TestCaseRunFactory class TestNavigation(test.TestCase): @@ -63,6 +65,24 @@ def test_when_logged_in_renders_dashboard(self): self.assertContains(response, 'Test Plans') self.assertContains(response, 'Test Runs') + def test_dashboard_shows_testruns_for_manager(self): + test_run = TestRunFactory(manager=self.tester) + + response = self.client.get(reverse('core-views-index')) + self.assertContains(response, test_run.summary) + + def test_dashboard_shows_testruns_for_default_tester(self): + test_run = TestRunFactory(default_tester=self.tester) + + response = self.client.get(reverse('core-views-index')) + self.assertContains(response, test_run.summary) + + def test_dashboard_shows_testruns_for_test_case_run_assignee(self): + test_case_run = TestCaseRunFactory(assignee=self.tester) + + response = self.client.get(reverse('core-views-index')) + self.assertContains(response, test_case_run.run.summary) + class TestCommentCaseRuns(BaseCaseRun): """Test case for ajax.comment_case_runs""" diff --git a/tcms/core/views.py b/tcms/core/views.py index 9b352b0251..5be7323868 100644 --- a/tcms/core/views.py +++ b/tcms/core/views.py @@ -27,7 +27,9 @@ def dashboard(request): test_plans_disable_count = test_plans.filter(is_active=False).count() test_runs = TestRun.objects.filter( - Q(manager=request.user) | Q(default_tester=request.user), + Q(manager=request.user) | + Q(default_tester=request.user) | + Q(case_run__assignee=request.user), stop_date__isnull=True, ).order_by('-run_id') diff --git a/tcms/locale/de_DE/LC_MESSAGES/django.po b/tcms/locale/de_DE/LC_MESSAGES/django.po index c26f4fe314..b73d58dc7d 100644 --- a/tcms/locale/de_DE/LC_MESSAGES/django.po +++ b/tcms/locale/de_DE/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: kiwitcms\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-19 10:17+0000\n" +"POT-Creation-Date: 2018-10-25 11:46+0000\n" "PO-Revision-Date: 2018-10-04 12:10\n" "Last-Translator: atodorov \n" "Language-Team: German\n" @@ -231,11 +231,10 @@ msgid "Started at" msgstr "Gestartet am" #: tcms/templates/dashboard.html:26 -#, python-format msgid "" "\n" -" %(total_count)s TestRun(s) assigned to you need to be " -"executed.\n" +" %(total_count)s TestRun(s) or TestCase(s) assigned to you " +"need to be executed.\n" " Here are the latest %(count)s.\n" " " msgstr "" diff --git a/tcms/locale/en/LC_MESSAGES/django.po b/tcms/locale/en/LC_MESSAGES/django.po index 5ea48f8501..79ce703901 100644 --- a/tcms/locale/en/LC_MESSAGES/django.po +++ b/tcms/locale/en/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-19 10:17+0000\n" +"POT-Creation-Date: 2018-10-25 11:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -231,8 +231,8 @@ msgstr "" #, python-format msgid "" "\n" -" %(total_count)s TestRun(s) assigned to you need to be " -"executed.\n" +" %(total_count)s TestRun(s) or TestCase(s) assigned to you " +"need to be executed.\n" " Here are the latest %(count)s.\n" " " msgstr "" diff --git a/tcms/locale/sl_SI/LC_MESSAGES/django.po b/tcms/locale/sl_SI/LC_MESSAGES/django.po index 1f3c68b553..cf35b08b53 100644 --- a/tcms/locale/sl_SI/LC_MESSAGES/django.po +++ b/tcms/locale/sl_SI/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: kiwitcms\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-19 10:17+0000\n" +"POT-Creation-Date: 2018-10-25 11:46+0000\n" "PO-Revision-Date: 2018-10-20 14:15\n" "Last-Translator: atodorov \n" "Language-Team: Slovenian\n" @@ -10,7 +10,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" +"%100==4 ? 3 : 0);\n" "X-Generator: crowdin.com\n" "X-Crowdin-Project: kiwitcms\n" "X-Crowdin-Language: sl\n" @@ -49,21 +50,31 @@ msgstr "POSODOBITEV: %(model_name)s #%(pk)d - %(title)s" #: tcms/core/history.py:47 #, python-format -msgid "Updated on %(history_date)s\n" -"Updated by %(username)s\n\n" -"%(diff)s\n\n" +msgid "" +"Updated on %(history_date)s\n" +"Updated by %(username)s\n" +"\n" +"%(diff)s\n" +"\n" "For more information:\n" "%(instance_url)s" -msgstr "Čas posodobitve %(history_date)s\n" -"Posodobil %(username)s\n\n" -"%(diff)s\n\n" +msgstr "" +"Čas posodobitve %(history_date)s\n" +"Posodobil %(username)s\n" +"\n" +"%(diff)s\n" +"\n" "Dodatne informacije:\n" "%(instance_url)s" #: tcms/core/middleware.py:25 #, python-format -msgid "Base URL is not configured! See documentation and change it" -msgstr "URL aplikacije ni nastavljen! Preverite dokumentacijo in ga spremenite" +msgid "" +"Base URL is not configured! See documentation and change it" +msgstr "" +"URL aplikacije ni nastavljen! Preverite dokumentacijo in " +"ga spremenite" #: tcms/kiwi_auth/admin.py:24 msgid "This email address is already in use" @@ -87,12 +98,18 @@ msgid "Your new %s account confirmation" msgstr "Informacije o uporabniškem računu %s ." #: tcms/kiwi_auth/views.py:47 -msgid "Your account has been created, please check your mailbox for confirmation" -msgstr "Uporabniški račun je bil uspešno kreiran, preverite vaš e-poštni nabiralnik za potrditveno povezavo preko katere ga aktivirate" +msgid "" +"Your account has been created, please check your mailbox for confirmation" +msgstr "" +"Uporabniški račun je bil uspešno kreiran, preverite vaš e-poštni nabiralnik " +"za potrditveno povezavo preko katere ga aktivirate" #: tcms/kiwi_auth/views.py:53 -msgid "Your account has been created, but you need an administrator to activate it" -msgstr "Uporabniški račun je bil ustvarjen. Pred uporabo ga mora potrditi še administrator" +msgid "" +"Your account has been created, but you need an administrator to activate it" +msgstr "" +"Uporabniški račun je bil ustvarjen. Pred uporabo ga mora potrditi še " +"administrator" #: tcms/kiwi_auth/views.py:59 msgid "Following is the administrator list" @@ -224,15 +241,13 @@ msgid "Started at" msgstr "Začeto ob" #: tcms/templates/dashboard.html:26 -#, python-format -msgid "\n" -" %(total_count)s TestRun(s) assigned to you need to be executed.\n" +msgid "" +"\n" +" %(total_count)s TestRun(s) or TestCase(s) assigned to you " +"need to be executed.\n" " Here are the latest %(count)s.\n" " " -msgstr "\n" -" %(total_count)s testiranj čaka na izvedbo\n" -" Zadnja dodeljena testiranja %(count)s.\n" -" " +msgstr "" #: tcms/templates/dashboard.html:32 tcms/templates/dashboard.html:78 msgid "SEE ALL" @@ -272,12 +287,16 @@ msgstr "Izvedbe" #: tcms/templates/dashboard.html:72 #, python-format -msgid "\n" -" You manage %(total_count)s TestPlan(s), %(disabled_count)s are disabled.\n" +msgid "" +"\n" +" You manage %(total_count)s TestPlan(s), %(disabled_count)s " +"are disabled.\n" " Here are the latest %(count)s.\n" " " -msgstr "\n" -" Imate %(total_count)s reopozitorijev testov, %(disabled_count)s je onemogočenih.\n" +msgstr "" +"\n" +" Imate %(total_count)s reopozitorijev testov, " +"%(disabled_count)s je onemogočenih.\n" " Tukaj so zadnji %(count)s.\n" " " @@ -287,61 +306,84 @@ msgstr "Noben testni plan vam ni dodeljen" #: tcms/templates/email/confirm_registration.txt:1 #, python-format -msgid "Welcome %(user)s,\n" -"thank you for signing up for an %(site_domain)s account!\n\n" +msgid "" +"Welcome %(user)s,\n" +"thank you for signing up for an %(site_domain)s account!\n" +"\n" "To activate your account, click this link:\n" "%(confirm_url)s\n" -msgstr "Pozdravljen-/a %(user)s,\n" -"uspešno je bil kreiran uporabniški račun za domeno %(site_domain)s !\n\n" +msgstr "" +"Pozdravljen-/a %(user)s,\n" +"uspešno je bil kreiran uporabniški račun za domeno %(site_domain)s !\n" +"\n" "Za aktivacijo računa kliknite na spodnjo povezavo\n" "%(confirm_url)s\n" #: tcms/templates/email/post_case_delete/email.txt:2 #, python-format -msgid "\n" +msgid "" +"\n" "TestCase has been updated by %(username)s!\n" -msgstr "\n" +msgstr "" +"\n" "Testni scenarij je posodobil %(username)s!\n" #: tcms/templates/email/post_run_save/email.txt:2 #, python-format -msgid "\n" -"Test run %(pk)s has been created or updated for you.\n\n" +msgid "" +"\n" +"Test run %(pk)s has been created or updated for you.\n" +"\n" "### Links ###\n" "Test run: %(run_url)s\n" -"Test plan: %(plan_url)s\n\n" +"Test plan: %(plan_url)s\n" +"\n" "### Basic run information ###\n" -"Summary: %(summary)s\n\n" +"Summary: %(summary)s\n" +"\n" "Managed: %(manager)s.\n" -"Default tester: %(default_tester)s.\n\n" +"Default tester: %(default_tester)s.\n" +"\n" "Product: %(product)s\n" "Product version: %(version)s\n" -"Build: %(build)s\n\n" +"Build: %(build)s\n" +"\n" "Notes:\n" "%(notes)s\n" -msgstr "\n" -"Testiranje %(pk)s je bilo ustvarjeno ali posobljeno.\n\n" +msgstr "" +"\n" +"Testiranje %(pk)s je bilo ustvarjeno ali posobljeno.\n" +"\n" "### Povezano ###\n" "Testiranje: %(run_url)s\n" -"Baza testnih scenarijev: %(plan_url)s\n\n" +"Baza testnih scenarijev: %(plan_url)s\n" +"\n" "### Osnovne informacije o testiranju ###\n" -"Povzetek: %(summary)s\n\n" +"Povzetek: %(summary)s\n" +"\n" "Vodja testiranja: %(manager)s.\n" -"Zadolženi tester: %(default_tester)s.\n\n" +"Zadolženi tester: %(default_tester)s.\n" +"\n" "Produkt: %(product)s\n" "Verzija produkta: %(version)s\n" -"Build: %(build)s\n\n" +"Build: %(build)s\n" +"\n" "Zapiski:\n" "%(notes)s\n" #: tcms/templates/email/user_registered/notify_admins.txt:2 #, python-format -msgid "Dear Administrator,\n" +msgid "" +"Dear Administrator,\n" "somebody just registered an account with username %(username)s at your\n" -"Kiwi TCMS instance and is awaiting your approval!\n\n" +"Kiwi TCMS instance and is awaiting your approval!\n" +"\n" "Go to %(user_url)s to activate the account!\n" -msgstr "Spoštovani administrator,\n" -"uporabnik %(username)s je kreiral nov uporabniški račun v sistemu Kiwi TCMS, kateri čaka na potrditev.\n\n" +msgstr "" +"Spoštovani administrator,\n" +"uporabnik %(username)s je kreiral nov uporabniški račun v sistemu Kiwi TCMS, " +"kateri čaka na potrditev.\n" +"\n" "Aktivacija računa je mogoča na sledeči povezavi %(user_url)s !\n" #: tcms/templates/pagination.html:7 @@ -399,7 +441,9 @@ msgid "Change password" msgstr "Spremeni geslo" #: tcms/templates/registration/password_reset_confirm.html:43 -msgid "Please enter your new password twice so we can verify you typed it in correctly" +msgid "" +"Please enter your new password twice so we can verify you typed it in " +"correctly" msgstr "Novo geslo vnesite dvakrat" #: tcms/templates/registration/password_reset_done.html:11 @@ -428,8 +472,12 @@ msgid "Register" msgstr "Registracija" #: tcms/testcases/forms.py:36 -msgid "Please input valid case id(s). use comma to split more than one case id. e.g. \"111, 222\"" -msgstr "Prosimo vnesite veljavne Id-je testni scenarijev. Uporabite vejico za več primerov npr. \"111, 222\"" +msgid "" +"Please input valid case id(s). use comma to split more than one case id. e." +"g. \"111, 222\"" +msgstr "" +"Prosimo vnesite veljavne Id-je testni scenarijev. Uporabite vejico za več " +"primerov npr. \"111, 222\"" #: tcms/testcases/helpers/email.py:22 #, python-brace-format @@ -668,12 +716,16 @@ msgstr "Izbrani testni scenariji(s):" #: tcms/testruns/templates/testruns/mutable.html:84 #, python-format -msgid "\n" -" %(count)s of the pre-selected test cases is not CONFIRMED and will not be cloned!\n" +msgid "" +"\n" +" %(count)s of the pre-selected test cases is not " +"CONFIRMED and will not be cloned!\n" " See test plan for more details!\n" " " -msgstr "\n" -" %(count)s testni scenarijev ni v statusu potrjen in se ne bodo prenesli.\n" +msgstr "" +"\n" +" %(count)s testni scenarijev ni v statusu potrjen in se " +"ne bodo prenesli.\n" " Več podrobnosti je na voljo v informacijah testiranja!\n" " " @@ -703,11 +755,15 @@ msgstr "Končano ob" #: tcms/testruns/views.py:50 msgid "Creating a TestRun requires a TestPlan, select one" -msgstr "V kolikor želite kreirati novo testiranje morate imeti ustvarjen testni repozitorij" +msgstr "" +"V kolikor želite kreirati novo testiranje morate imeti ustvarjen testni " +"repozitorij" #: tcms/testruns/views.py:60 msgid "Creating a TestRun requires at least one TestCase" -msgstr "V kolikor želite kreirati novo testiranje morate dodati najmanj en testni scenarij" +msgstr "" +"V kolikor želite kreirati novo testiranje morate dodati najmanj en testni " +"scenarij" #: tcms/testruns/views.py:550 msgid "Clone of " @@ -774,4 +830,3 @@ msgstr "ONEMOGOČEN" #: vinaigrette-deleteme.py:13 msgid "NEED_UPDATE" msgstr "ZA POPRAVITI" - diff --git a/tcms/locale/zh_CN/LC_MESSAGES/django.po b/tcms/locale/zh_CN/LC_MESSAGES/django.po index ff277717d2..7f0cc859c7 100644 --- a/tcms/locale/zh_CN/LC_MESSAGES/django.po +++ b/tcms/locale/zh_CN/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: kiwitcms\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-19 10:17+0000\n" +"POT-Creation-Date: 2018-10-25 11:46+0000\n" "PO-Revision-Date: 2018-09-03 11:32\n" "Last-Translator: atodorov \n" "Language-Team: Chinese Simplified\n" @@ -230,8 +230,8 @@ msgstr "" #, python-format msgid "" "\n" -" %(total_count)s TestRun(s) assigned to you need to be " -"executed.\n" +" %(total_count)s TestRun(s) or TestCase(s) assigned to you " +"need to be executed.\n" " Here are the latest %(count)s.\n" " " msgstr "" diff --git a/tcms/locale/zh_TW/LC_MESSAGES/django.po b/tcms/locale/zh_TW/LC_MESSAGES/django.po index ce9057990e..fbfda75085 100644 --- a/tcms/locale/zh_TW/LC_MESSAGES/django.po +++ b/tcms/locale/zh_TW/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: kiwitcms\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-19 10:17+0000\n" +"POT-Creation-Date: 2018-10-25 11:46+0000\n" "PO-Revision-Date: 2018-09-03 11:32\n" "Last-Translator: atodorov \n" "Language-Team: Chinese Traditional\n" @@ -230,8 +230,8 @@ msgstr "" #, python-format msgid "" "\n" -" %(total_count)s TestRun(s) assigned to you need to be " -"executed.\n" +" %(total_count)s TestRun(s) or TestCase(s) assigned to you " +"need to be executed.\n" " Here are the latest %(count)s.\n" " " msgstr "" diff --git a/tcms/templates/dashboard.html b/tcms/templates/dashboard.html index f4b757a2f1..86d814b1a5 100644 --- a/tcms/templates/dashboard.html +++ b/tcms/templates/dashboard.html @@ -24,7 +24,7 @@