You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start the server and CRA npm start if applicable. Go to the homepage of the app.
Clear all cookies, including the app's cookies and Spotify's cookies. Refresh and the login page should appear. Click login and a Spotify page should prompt you to log in to Spotify. Do that and it should redirect to the app's homepage and you should be logged in.
Clear just the app's cookies but not Spotify cookies. Refresh and the login page should appear. Click login and you should see the app's homepage, not the Spotify login page.
For testing with curl and other shell commands, $ source .env to get .env vars.
$ curl -XPOST -b admin_key=$ADMIN_KEY localhost:3000/admin/load-ids should respond with json of the ids.csv config data (as of d9c2b97).
Test data and results for `ids.csv` parsing:
playlistid1,hybrid,user1,user2,user3#comment
playlistid2,separate,#
playlistid3,situated,user1,user2,user3,user4,# comment
# playlistid,test,user1,user2,user3#this results in error, uncomment to test
Start with empty playlists and users DB collections (set vars in .env to new file names). Comment out the await initializePlaylist() line in the POST /admin/load-ids endpoint in admin.ts and replace it with the following line / uncomment the following line:
After changing the code, always recompile/let npm run watch recompile and restart the server. After changing .env, always restart the server. Make sure to change the code and the env vars back to normal after testing.
# (user2 removed, user5 new, users 1,3,4 same)
playlistid1,situated,user1,user3# already in db
playlistid2,hybrid,user3# already in db
playlistid3,separate,user1,user4# already in db
playlistid4,hybrid,user5# new to db
And request POST /admin/load-ids again. You can restart the server to get the db formatting to normalize (assuming this still uses nedb). The playlists collection should have these documents:
A quick test of authentication flow:
npm start
if applicable. Go to the homepage of the app.For testing with
curl
and other shell commands,$ source .env
to get.env
vars.For testing admin permissions:
For testing
ids.csv
text parsing only:$ curl -XPOST -b admin_key=$ADMIN_KEY localhost:3000/admin/load-ids
should respond with json of the ids.csv config data (as of d9c2b97).Test data and results for `ids.csv` parsing:
Expected result: (as of 8914637)
For testing
ids.csv
db functionality:Test data and results:
Start with empty playlists and users DB collections (set vars in .env to new file names). Comment out the
await initializePlaylist()
line in thePOST /admin/load-ids
endpoint inadmin.ts
and replace it with the following line / uncomment the following line:After changing the code, always recompile/let
npm run watch
recompile and restart the server. After changing.env
, always restart the server. Make sure to change the code and the env vars back to normal after testing.Put this data in
ids.csv
:Run
$ curl -XPOST -b admin_key=$ADMIN_KEY localhost:3000/admin/load-ids
. The playlists collection should have these documents:And the users collection should have these documents:
Now replace the data in
ids.csv
with this:And request
POST /admin/load-ids
again. You can restart the server to get the db formatting to normalize (assuming this still uses nedb). The playlists collection should have these documents:And the users collection should have these documents:
The text was updated successfully, but these errors were encountered: