Commit 27f18760 authored by and's avatar and
Browse files

Reset Docstrings For Tests

parent 53a79ed1
Pipeline #129193 passed with stage
in 53 seconds
......@@ -14,6 +14,8 @@ webdriver_path = os.environ.get("WEBDRIVER", "chromedriver")
class Visibility(str, enum.Enum):
"""Enum representing workout visibility."""
PUBLIC = "PU"
COACH = "CO"
PRIVATE = "PR"
......
......@@ -29,6 +29,7 @@ class ViewProfileTest(BlackBoxTestServer):
return element.get_attribute("value")
def test_non_user_can_not_view_own_profile(self):
"""Test if a user is able to view their own public workout."""
self.get("profile.html")
self.assertEqual("My Profile", self.driver.title)
self.wait_until_value_not_empty(By.ID, "username")
......@@ -40,6 +41,7 @@ class ViewProfileTest(BlackBoxTestServer):
self.assertEqual(email, "")
def test_user_can_view_own_profile(self):
"""Test if a user is able to view their own public workout."""
user = login_data["athlete"]
self.login(user)
self.get("profile.html")
......
......@@ -52,6 +52,7 @@ class ViewWorkoutTest(BlackBoxTestServer):
return element.get_attribute("value")
def test_user_can_view_own_public_workout(self):
"""Test if a user is able to view their own public workout."""
user = login_data["athlete"]
self.login(user)
self.get("workout.html", id=1)
......@@ -67,6 +68,7 @@ class ViewWorkoutTest(BlackBoxTestServer):
self.assertEqual(value, Visibility.PUBLIC)
def test_coach_can_view_athletes_workout(self):
"""Test if a coach is able to view their athlete's workout."""
user = login_data["coach"]
self.login(user)
self.get("workout.html", id=2)
......@@ -81,6 +83,7 @@ class ViewWorkoutTest(BlackBoxTestServer):
self.assertEqual(value, Visibility.COACH)
def test_user_can_view_others_public_workout(self):
"""Test if a user is able to view another users' public workout."""
user = login_data["athlete"]
self.login(user)
self.get("workout.html", id=3)
......@@ -95,6 +98,7 @@ class ViewWorkoutTest(BlackBoxTestServer):
self.assertEqual(value, Visibility.PUBLIC)
def test_user_can_view_own_private_workout(self):
"""Test if a user is able to view their own private workout."""
user = login_data["athlete"]
self.login(user)
self.get("workout.html", id=4)
......@@ -109,6 +113,7 @@ class ViewWorkoutTest(BlackBoxTestServer):
self.assertEqual(value, Visibility.PRIVATE)
def test_user_cannot_view_other_users_private_workout(self):
"""Test if a user is unable to view another users' private workout."""
user = login_data["coach"]
self.login(user)
self.get("workout.html", id=4)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment