The Screen Time Limiter is a web application built using the Angular framework. All users can set up timers and create schedules for gaming applications. Browser notifications alert users when time is up. Windows users can download the desktop app which will kill the specified process automatically when a process reaches its specified limit for the day. Lastly, users can view graphs that show how much time they spent gaming overall, and per application.
In order to build this project you first need to install:
- Check that installation was successful. You should receive a version number after executing each of the these commands:
- node -v
- npm -v
- Make sure npm is up to date:
- npm install -g npm
After cloning the repo, you must add the Angular build kit to the directory where you cloned the project. The build kit is part of node-modules.
ng add node-modules
You will also need Firebase dependencies.
ng add @angular/fire
To view the analytics page you will need to install another module
npm install ng2-charts --save
To view the embedded YouTube demo video on the about page you will need to install another module
npm i @angular/youtube-player
To open on localhost port 4200:
ng serve --open
To deploy a version of the BitSquad Screen Time Tracker, run the commands:
ng build
firebase deploy
The unit tests are in src/app/tests/unit.
The behavioral tests are in src/app/tests/selenium.
Unit tests are developed with Jasmine, which comes with the Angular framework.
Behavorial tests are developed with the Selenium IDE, which requires the following setup to execute tests from the command line:
-
Install the Selenium command line runner
npm install -g selenium-side-runner
-
Install the version of Chrome Driver that matches your Chrome version from https://chromedriver.chromium.org/downloads
How to Find Your Chrome Version
- Click the 3 dots in the upper right hand corner of your Chrome Browser
- Select "Help"
- Select "About Google Chrome" and the version will be listed
-
Select the Windows download: chromedriver_win32.zip
-
Unzip the Chrome Driver download to any directory on your computer
-
In the Windows search bar, type "environment variables" and select "Edit the system environment variables"
-
Select "Environment Variables"
-
Select the "Path" variable in the "System variables" section
-
Select "Edit"
-
Select "New"
-
Select "Browse"
-
Navigate to the directory where you unzipped the Chrome Driver download (step 3), then click "OK" to close all dialog boxes
-
Restart your computer before attempting to run any tests
First make sure the program is running in another terminal:
ng serve
The following command will execute our unit tests and launch the Karma debugger in a Chrome window
ng test
The following command will execute our behavioral tests and launch a Chrome window
selenium-side-runner.cmd src/app/tests/selenium/*.side
- Kelli Alan alankelli64@gmail.com
- Patterson Howell pattersonhowell12@gmail.com
- Branavan Kalapathy kalapatb@email.sc.edu
- zhiquan xie zhiquan@email.sc.edu
- William DesMarteau desmartw@email.sc.edu