mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-22 13:48:46 +00:00
Merge pull request #5027 from crookedneighbor/send_test_data_to_test_db
Send test data to test db
This commit is contained in:
commit
c7cc6f0ae8
4 changed files with 11 additions and 11 deletions
|
|
@ -12,13 +12,13 @@ path = require("path")
|
|||
moment = require("moment")
|
||||
conf = require("nconf")
|
||||
conf.argv().env().file(file: path.join(__dirname, "../config.json")).defaults()
|
||||
conf.set "port", "1337"
|
||||
conf.set "PORT", "1337"
|
||||
|
||||
# Override normal ENV values with nconf ENV values (ENV values are used the same way without nconf)
|
||||
process.env.BASE_URL = conf.get("BASE_URL")
|
||||
process.env.FACEBOOK_KEY = conf.get("FACEBOOK_KEY")
|
||||
process.env.FACEBOOK_SECRET = conf.get("FACEBOOK_SECRET")
|
||||
process.env.NODE_DB_URI = "mongodb://localhost/habitrpg"
|
||||
process.env.NODE_DB_URI = "mongodb://localhost/habitrpg_test"
|
||||
User = require("../website/src/models/user").model
|
||||
Group = require("../website/src/models/group").model
|
||||
Challenge = require("../website/src/models/challenge").model
|
||||
|
|
@ -30,7 +30,7 @@ payments = require("../website/src/controllers/payments")
|
|||
model = undefined
|
||||
uuid = undefined
|
||||
taskPath = undefined
|
||||
baseURL = "http://localhost:3000/api/v2"
|
||||
baseURL = "http://localhost:" + conf.get("PORT") + "/api/v2"
|
||||
expectCode = (res, code) ->
|
||||
expect(res.body.err).to.be `undefined` if code is 200
|
||||
expect(res.statusCode).to.be code
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ describe('front page', function() {
|
|||
});
|
||||
|
||||
it('shows the front page', function(){
|
||||
var button = element(by.className('btn'));
|
||||
expect(button.getText()).toEqual('Play HabitRPG');
|
||||
var button = element(by.id('play-btn'));
|
||||
expect(button.getText()).toEqual('Play for free');
|
||||
});
|
||||
|
||||
it("don't login when using wrong credentials", function(){
|
||||
var button = element(by.className('btn'));
|
||||
var button = element(by.id('play-btn'));
|
||||
button.click();
|
||||
browser.sleep(1000);
|
||||
element(by.model('loginUsername')).sendKeys('username');
|
||||
|
|
@ -42,7 +42,7 @@ describe('front page', function() {
|
|||
});
|
||||
|
||||
xit('registers a new user', function(){
|
||||
var button = element(by.className('btn'));
|
||||
var button = element(by.id('play-btn'));
|
||||
button.click();
|
||||
browser.sleep(1000);
|
||||
var registerTab = element(by.linkText('Register'));
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ module.exports.txnEmail = function(mailingInfoArray, emailType, variables, perso
|
|||
{
|
||||
name: 'RECIPIENT_UNSUB_URL',
|
||||
content: baseUrl + '/unsubscribe?code=' + module.exports.encrypt(JSON.stringify({
|
||||
_id: temporaryPersonalVariables[singlePersonalVariables.rcpt]._id,
|
||||
_id: temporaryPersonalVariables[singlePersonalVariables.rcpt]._id,
|
||||
email: singlePersonalVariables.rcpt
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ html(ng-app='habitrpg', ng-controller='RootCtrl')
|
|||
h4
|
||||
| Join 200,000 players making it fun to achieve goals!
|
||||
small
|
||||
button.btn.btn-primary.btn-lg.gamifybutton(ng-click='playButtonClick()') Play for free
|
||||
button#play-btn.btn.btn-primary.btn-lg.gamifybutton(ng-click='playButtonClick()') Play for free
|
||||
.presslogos.text-center
|
||||
| Featured in
|
||||
br
|
||||
|
|
@ -303,7 +303,7 @@ html(ng-app='habitrpg', ng-controller='RootCtrl')
|
|||
div(style='width:100%; background-color: #d9ead3; color: rgb(51, 51, 51); text-align:center; padding: 0px; line-height: 1.62765; list-style: none outside none; padding: 0px; height: 2.3em; min-height: 1.62765em; margin-bottom:0.75em; margin:0px; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5) inset;')
|
||||
.task-btn(style='display: inline-block; width: 1.62765em; height: 1.62765em; padding: 0px; margin:0px; line-height: 1.62765; text-align: center; color: rgb(34, 34, 34); float:left; cursor: pointer; vertical-align: top; left:0px; position:relative; background-color: rgb(113, 176, 91); border-right: 1px solid rgba(0, 0, 0, 0.25);') +
|
||||
|
|
||||
.task-desc(style='display: inline-block; font-family: Lato,sans-serif; padding: 0.6em 0px 0em 1em; letter-spacing: normal; float:left; word-wrap: break-word;') Study 1 hour
|
||||
.task-desc(style='display: inline-block; font-family: Lato,sans-serif; padding: 0.6em 0px 0em 1em; letter-spacing: normal; float:left; word-wrap: break-word;') Study 1 hour
|
||||
br
|
||||
div(style='width:100%; background-color: rgb(255, 242, 204); color: rgb(51, 51, 51); text-align:center; padding: 0px; line-height: 1.62765; list-style: none outside none; padding: 0px; height: 2.3em; min-height: 1.62765em; margin-bottom:0.75em; margin:0px; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5) inset;')
|
||||
.task-btn(style='display: inline-block; width: 1.62765em; height: 1.62765em; padding: 0px; margin:0px; line-height: 1.62765; text-align: center; color: rgb(34, 34, 34); float:left; cursor: pointer; vertical-align: top; left:0px; position:relative; background-color: rgb(255, 207, 66); border-right: 1px solid rgba(0, 0, 0, 0.25);') +
|
||||
|
|
@ -642,4 +642,4 @@ html(ng-app='habitrpg', ng-controller='RootCtrl')
|
|||
.controller('CarouselController', ['$scope', '$timeout', '$transition', '$q', function ($scope, $timeout, $transition, $q) {
|
||||
}]).directive('carousel', [function () {
|
||||
return {}
|
||||
}]);
|
||||
}]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue