Skip to content

Commit

Permalink
added helper test to see if buttons are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ybrnr committed Oct 28, 2024
1 parent 73c3a65 commit 56a9983
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions evap/results/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def helper_test_contributor(self, user, view_contributor_results, textanswers_in
self.assertNotIn(answer,page)

def test_manager(self):
with run_in_staff_mode(self): # in staff mode
with run_in_staff_mode(self): # in staff mode, the manager can see everything
user = "[email protected]"

self.helper_test_general(user, ViewGeneralResults.FULL, [".general_orig_published.", ".general_additional_orig_published.", ".general_changed_published."])
Expand All @@ -795,7 +795,13 @@ def test_manager(self):
self.helper_test_contributor(user, ViewContributorResults.RATINGS, [])
self.helper_test_contributor(user, ViewContributorResults.PERSONAL, [])


def test_manager_active_buttons(self): # this whether the filter buttons are active or not, this is just a little helper, an elaborate test for this will be implemented
with run_in_staff_mode(self):
user = "[email protected]"

page = self.app.get("/results/semester/1/evaluation/1", user=user)
self.assertNotIn("btn btn-sm btn-light disabled", page)


def test_student(self):
user = "[email protected]"
Expand Down

0 comments on commit 56a9983

Please sign in to comment.