diff --git a/.env-e2e b/.env-e2e new file mode 100644 index 000000000..eefd18d51 --- /dev/null +++ b/.env-e2e @@ -0,0 +1,3 @@ +TALK_SESSION_SECRET=imasecretlookatme +TALK_ROOT_URL=http://localhost:3000 +TALK_MONGO_URL=mongodb://localhost/test diff --git a/package.json b/package.json index e6e211d07..78d8a2c7d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "test-watch": "TEST_MODE=unit NODE_ENV=test mocha --compilers js:babel-core/register --recursive -w tests", "pree2e": "NODE_ENV=test scripts/pree2e.sh", "e2e": "NODE_ENV=test nightwatch", + "poste2e": "kill -15 $(ps aux | grep './bin/cli -c .env-e2e serve --jobs' | awk '{print $2}')", "embed-start": "NODE_ENV=development npm run build && ./bin/cli serve --jobs", "postinstall": "npm run build" }, diff --git a/scripts/pree2e.sh b/scripts/pree2e.sh index 0487a9187..4e12d7e9b 100755 --- a/scripts/pree2e.sh +++ b/scripts/pree2e.sh @@ -4,12 +4,12 @@ selenium-standalone install # Creating Admin Test User -./bin/cli-users create --flag_mode --email "admin@test.com" --password "test" --name "Admin Test User" --role "admin" +./bin/cli-users create --flag_mode --email "admin@test.com" --password "testtest" --name "AdminTestUser" --role "admin" # Creating Moderator Test User -./bin/cli-users create --flag_mode --email "moderator@test.com" --password "test" --name "Moderator Test User" --role "moderator" +./bin/cli-users create --flag_mode --email "moderator@test.com" --password "testtest" --name "ModeratorTestUser" --role "moderator" # Creating Commenter Test User -./bin/cli-users create --flag_mode --email "commenter@test.com" --password "test" --name "commenter@test.com" +./bin/cli-users create --flag_mode --email "commenter@test.com" --password "testtest" --name "commenter@test.com" -npm start & +./bin/cli -c .env-e2e serve --jobs &