mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-27 13:40:00 +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'));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue