https://github.com/illiashkirko/CS-130-Project/
UpLifted is a social workout sharing app made with Swift and Firebase designed to combat workout demotivation.
In XCode, clone this repository with "git clone [Repository link]"
Add NSCameraUsageDescription key to the Info.plist (within Xcode) with value, "UpLifted needs access to your camera. Don't worry, we pixelate the image!"
If GoogleService-Info.plist file is not present in the root directory, download the file from https://drive.google.com/file/d/1YEzWuldkY3tqudldVPl3_u0JTaJ32w1u/view?usp=sharing and place it within the root directory of the project.
Build with Cmd + B and run with Cmd + R.
To run tests, please, run test suites individually within the XCode Testing environment UI.
CS-130-Project/
|-- UpLifted.xcodeproj/ // Xcode project file
| |-- project.pbxproj // Xcode
|-- UpLifted/ // Source Code
| |-- Controllers/ // Firebase usage functions
| |-- Models/ // Exercise/workout models
| |-- Views/ // All User Views
| | |-- Authentication/ // Sign up/login views
| | |-- Camera/ // Connection to phone camera
| | |-- NavTabViews/ // Navigation views
| | | |-- WorkoutsView/ // Workout views
|-- UpLiftedTests/ // Unit tests
|-- UpLiftedUITests/ // UI unit tests
https://github.com/illiashkirko/CS-130-Project/tree/main/UpLiftedTests
https://github.com/illiashkirko/CS-130-Project/tree/main/UpLiftedUITests
Tests the creation and validation of workout templates with multiple exercises.
- Input: Template with multiple exercises, each containing multiple sets
- Expected Outcome:
- Template name matches input
- Correct number of exercises stored
- Exercise names and set counts are preserved
- Test Method:
testWorkoutTemplateCreation()
Tests the controller responsible for creating and managing workout templates.
- Input: Various controller operations (adding/removing exercises, setting template name)
- Expected Outcome:
- Form validation works correctly
- Exercise addition/removal updates state properly
- Initial state is invalid until required fields are filled
- Test Method:
testCreateWorkoutTemplateController()
Tests the creation and validation of individual exercises and their sets.
- Input: Exercise (Deadlift) with multiple sets and varying weights
- Expected Outcome:
- Exercise properties are correctly stored
- Set details (reps, weights) are accurate
- Time-based sets are handled properly
- Test Method:
testExerciseAndSetManagement()
Tests various functions that are responsible for starting and running a live workout.
- Input Controller operations (Adding workouts, adding excercises, adding sets, removing excercises)
- Expected Outcome
- New workouts are successfully created and deleted
- New excercises are added and removed
- New sets are added and removed
- Test Methods
testStartNewWorkout()testAddExercise()testRemoveExercise()testAddSet()testRemoveSet()
Tests the ability to follow and unfollow users.
- Input: A follow test user and Current test user
- Expected Outcome:
- Follow: isFriend(userID:) should return true after a user has been followed
- Unfollow: isFriend(userID:) shoulf return false after the user has been unfollowed
- Test Methods:
testFollowUnfollowUser()
Tests the search functionality to ensure users are filtered correctly.
- Input: Empty search query ("")
- Expected Outcome:
- All users from Firestore are displayed since the query string is empty.
- Test Method:
testFilterAllUsers()
Tests whether the login and sign-up buttons are displayed when no user is logged in.
- Input:
- Launch app
- Ensures the user is logged out
- Expected Outcome:
- The login and signup buttons will be shown to the screen.
Tests whether an error message appears when attempting to log in with empty fields.
- Input:
- Navigate to the sign up page
- Leave email and password empty
- Attempt to sign in
- Expected Outcome:
- Error Message should say the fields can't be empty
Tests whether a successful login removes the login screen.
- Input:
- Go to the login screen
- Enter valid credentials
- Try signing in again
- Expected Outcome:
- The login screen disappears confirming a successful login
Tests whether all necessary fields are present on the sign-up screen.
- Input:
- Go to the sign-up screen
- Expected Outcome:
- Should be these fields:
- Password
- Full Name
- Username
- Bio
- Height
- Weight
- Birthday picker
- Should be these fields:
Tests whether an error message appears when attempting to sign up with empty fields.
- Input:
- Go to the sign-up screen
- Try to sign up without entering anything
- Expected Outcome:
- An error message is shown saying that the required fields are not filled in
Tests the search bar in the app’s UI to ensure correct filtering of users.
- Input:
- Go to search bar
- Type "a" in the search field
- Expected Outcome:
- Search text field exists on the screen
- Search results contain only users whose names start with "a"
- Each displayed username correctly follows the expected format
- Test Method:
testSearchFriendsStartingWithA()
Tests the followers count in the app’s profile UI to ensure correct numbering is diplayed.
- Input:
- Go to own profile
- Click on follower count
- Expected Outcome:
- Profile displays the follower count
- Follower count is clickable to reach followers list
- Number of followers in the followers list matches the count displayed in the profile
- Test Method:
testFollowersCountMatchesListEntries()
Tests the following count in the app’s profile UI to ensure correct numbering is diplayed.
- Input:
- Go to own profile
- Click on following count
- Expected Outcome:
- Profile displays the following count
- Following count is clickable to reach followers list
- Number of following in the following list matches the count displayed in the profile
- Test Method:
testFollowingCountMatchesListEntries()
Tests the reaction functionality in the feed screen UI to make sure the reaction counts are updated correctly.
- Input:
- Pick first post in the feed
- Leave a reaction and check the count
- Remove a reaction and check the count
- Expected Outcome:
- Feed displays posts correctly
- Reaction count increments by one upon clicking
- Reaction count decrements by one upon double clicking
- Test Method:
testReactionButtonUpdatesCount()
Tests the timestamps in the app’s feed UI to ensure correct orderding of the posts.
- Input:
- Select all available posts from feed
- Extract all timestamps
- Check whether timetamps appear in chronological order
- Expected Outcome:
- Feed displays posts correctly
- Timestamps are displayed on descending order in time
- Test Method:
testFeedIsInChronologicalOrder()