This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Marionette.Module.extend = Marionette.extend; | |
| // Extend the Module prototype with events / listenTo, so that the module | |
| // can be used as an event aggregator or pub/sub. | |
| _.extend(Marionette.Module.prototype, Backbone.Events, { | |
| // Initialize is an empty function by default. Override it with your own | |
| // initialization logic when extending Marionette.Module. | |
| initialize: function(){}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.on('start', function() { | |
| if (Backbone.history) { | |
| var state = Backbone.history.start({ | |
| pushState: false, | |
| }); | |
| console.log("history started?"); | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var controller = new Controller({ | |
| loanCalcRegion: app.getRegion('loanCalc'), | |
| loanOrder: window.__DATA.order, | |
| yaCounter: window.yaCounter23682952, | |
| }); | |
| app.Router = new Marionette.AppRouter({ | |
| routes: { | |
| 'order': function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _addViewListeners: function () { | |
| var loanCalc = this; | |
| this.listenTo(this.view, 'create:order:loan', function () { | |
| loanCalc.trigger('create:order:loan', { | |
| amount: this.model.get('amount'), | |
| term: this.model.get('term'), | |
| totalSum: this.model.get('totalSum'), | |
| repayDate: this.model.get('repayDate'), | |
| }) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| var service = module.exports = {}, | |
| derp = require('derp'), | |
| async = require('async'), | |
| randomstring = require('../util/randomstring'), | |
| _ = require('lodash') | |
| ; | |
| // services |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| client.addCommand("waitForFunc", function(checker, timeout) { | |
| if (typeof timeout === 'function') { | |
| cb = timeout | |
| timeout = this.options.waitforTimeout | |
| } | |
| return new Promise(function(fulfill, reject) { | |
| var start = new Date().getMilliseconds() | |
| var timer = setTimeout(function run() { | |
| if (!checker()) { | |
| if (new Date().getMilliseconds() > start + timeout) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict" | |
| process.env.NODE_ENV = 'testing' | |
| process.env.PORT = '8001' | |
| process.env.DIR_PUBLIC = __dirname + '/../public' | |
| var chai = require('chai'), | |
| assert = chai.assert, | |
| expect = chai.expect, | |
| webdriverio = require('webdriverio'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div | |
| strong Контактные лица: | |
| {{#each contacts}} | |
| div {{this.firstname}} {{this.middlename}} {{this.lastname}} | |
| div Кем приходится: {{this.relationship}} | |
| div Телефон: {{this.phone}} | |
| br | |
| {{/each}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict" | |
| var chai = require('chai'), | |
| assert = chai.assert, | |
| expect = chai.expect, | |
| webdriverio = require('webdriverio'); | |
| describe('Loan order process', function(){ | |
| this.timeout(99999999); | |
| var client = {}; | |
| before(function(done){ | |
| client = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var page = require('webpage').create(); | |
| page.onResourceRequested = function(request) { | |
| console.log('Request ' + JSON.stringify(request.url, undefined, 4)); | |
| }; | |
| page.onResourceReceived = function(response) { | |
| //console.log('Receive ' + JSON.stringify(response.url, undefined, 4)); | |
| }; | |
| page.open('http://local.ros-dengi.ru', function(status) { |