-
Notifications
You must be signed in to change notification settings - Fork 0
Developer getting started guide
- A fairly recent version of Node JS (v 14.4 or higher)
- PostgreSQL 11. I like the PostgresApp for Mac
- Make a project folder
epubtest.org
- Into that folder, clone the database repository (no need to fork it, for the time being)
- Fork the main repository and clone it, too
The rest of these instructions assume your local folder structure is:
epubtest.org
-
epubtest.org/epubtest-db
: the database repo -
epubtest.org/epubtest-site
: the main repo
Another note, the scripts referenced below are set up for bash environments (mac/linux/cygwin).
- From
epubtest.org/epubtest-db/setup-testdb
, run the scriptrun-to-init-testdb.sh
- From
epubtest.org/epubtest-site
, runnpm install
- From
epubtest.org/epubtest-site
, runnpm test:data
- From
epubtest.org/epubtest-site
, runnpm test:ui
If all the tests pass, then the site should run on your machine without issues.
I forget if the testing steps above leave data in the database or if it gets wiped. So just to be sure (also, for any time you want to reset the data):
From epubtest.org/epubtest.site
, run npm run load-test-data
From epubtest.org/epubtest-site
, run npm run dev:testdb
This will start the site with the data from the test database. You can access the site at http://localhost:8000
If you are not logged in, you'll see just the public-facing pages.
If you are logged in as a user, you'll be able to access the user pages "Dashboard" and "Profile". From Dashboard, you may add test results for anything you've been assigned by an admin.
And, if you are logged in as an admin, in addition to the user pages, you'll see the "Admin" page, which lets you manage all the testing that's going on, including creating new testing environments (reading system + assistive tech + OS) and assigning testing tasks to users.
You can use these logins for testing locally:
-
[email protected]
/password
for an ADMIN account -
[email protected]
/password
for a USER account
The UI files are in epubtest.org/epubtest-site/src/pages
and consist of a series of server-side nunjucks templates plus CSS and a little javascript (esp for the data tables).
You can push any changes by making a branch for your feature or change on your fork, and then submitting a PR.