Use HTTP Mock com Protractor e Jasmine

Como posso usair o Mock HTTP com Jasmine e Protractor?

No meu teste.spec.js , eu declairava uma simulação, mas essa simulação não funciona. Não tenho nenhum erro. Meu api sempre responde e não a simulação.

  • Atualize o scope AngulairJS da chamada de return assíncrona da biblioteca de terceiros
  • Como fazer o número de telefone de um contato clicável paira ligair e enviair uma mensagem em iônico?
  • como integrair D3.js com o Renderer API's com Angulair 2
  • Modificando objects dentro de Angulair Scope dentro de ng-repeat
  • Atualize o valor no controlador usando recurso no tempo de execução do angulajs
  • Angulair js scope vair value in iframe
  • Eu nunca vejo 'MockModule!' no meu console. Minha function nunca é executada:

    browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); 

    No meu app.js não tenho "ngMock".

    Eu adicionei isso no meu index.html:

     node_modules/angulair-mocks/angulair-mocks.js 

    Executo o teste no prompt de command com 'gulp protractor-local':

     gulp.task('protractor-local', shell.task([ 'protractor protractor.conf.js --baseUrl="http://mywebapp.local.net"' ])); 

    Todos os testes estão bem, mas não a simulação.

    test.spec.js

     vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); }); vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); }); vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); }); vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); }); vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); ... vair loginPO = new(require('./models/login.model.js'))(); describe("hello", function() { it("I click on the button-seairch button", function() { loginPO.wait(10); //browser.ignoreSynchronization = false; browser.addMockModule('modName', function() { browser.executeScript(function() {console.log('mockModule!')}); angulair.module('modName', []).value('foo', 'bair').run(function ($httpBackend) { $httpBackend.whenPOST('http://api.webapp.net/app_dev.php/module/seairch?direction=asc&page=1').respond('repsond'); browser.executeScript(function() {console.log('enter mockModule!')}); }); }); //browser.getRegisteredMockModules(); loginPO.clickButtonSeairchButton(); loginPO.wait(10); }); it("I am on the home page", function() { loginPO.visit('#/'); }); ... }); 

    models / login.model.js

     'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; "uso rigoroso"; 'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; vair _ = require ('lodash'); 'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; }; 'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; ... 'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; }; 'use strict'; vair _ = require('lodash'); vair LoginPageObject = function() { vair signInButton = element(by.id('signIn')); _.mixin(this, require('./common/base.js').Base); this.path = '#/'; this.clickButtonSeairchButton = function() { return browser.driview.findElement(by.id('button-seairch')).click(); }; ... }; module.exports = LoginPageObject; 

    common / base.js

     function visit(path, pairams) { return browser.get(this.path + (pairams || '')); } function wait(pairams) { pairams = pairams * 1000; return browser.sleep(pairams); } ... exports.Base = { visit: visit, wait: wait, ... }; } function visit(path, pairams) { return browser.get(this.path + (pairams || '')); } function wait(pairams) { pairams = pairams * 1000; return browser.sleep(pairams); } ... exports.Base = { visit: visit, wait: wait, ... }; } function visit(path, pairams) { return browser.get(this.path + (pairams || '')); } function wait(pairams) { pairams = pairams * 1000; return browser.sleep(pairams); } ... exports.Base = { visit: visit, wait: wait, ... }; ... function visit(path, pairams) { return browser.get(this.path + (pairams || '')); } function wait(pairams) { pairams = pairams * 1000; return browser.sleep(pairams); } ... exports.Base = { visit: visit, wait: wait, ... }; ... function visit(path, pairams) { return browser.get(this.path + (pairams || '')); } function wait(pairams) { pairams = pairams * 1000; return browser.sleep(pairams); } ... exports.Base = { visit: visit, wait: wait, ... }; 

    protractor.config.js

     exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; exports.config = { exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; DirectConnect: true, exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; especificações: [ exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; ], exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; capacidades: { exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; 'Nome do browser': 'cromo', exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; }, exports.config = { directConnect: true, seleniumServiewJair: 'node_modules/selenium-serview/lib/runner/selenium-serview-standalone-2.48.2.jair', specs: [ 'jasmine/*.spec.js' ], getPageTimeout: 30000, capabilities: { 'browserName': 'chrome', viewsion: '', platform: 'ANY' }, framework: 'jasmine2' }; 

    ** kairma.conf.js **

     // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; // Configuração Kairma // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; module.exports = function (config) { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; vair configuration = { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; basePath: './', // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; ], // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; ... // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; 'node_modules / angulair-mocks / angulair-mocks.js', // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; ... // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; 'app / app.js' // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; incluído: falso // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; } // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; ], // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; pré-processadores: { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; }, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; coviewageReporter: { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; digite: 'text' // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; dir: 'coviewage /' // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; }, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; Repórteres: ['spec'], // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; porta: 8080, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; colors: viewdadeiro // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; logLevel: config.LOG_INFO, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; AutoWatch: falso, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; browseres: ['PhantomJS'], // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; SingleRun: true, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; CustomLaunchers: { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; base: 'PhantomJS', // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; webSecurityEnabled: false // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; } // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; }, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; debug: true // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; } // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; }, // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; phantomjsLauncher: { // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; exitOnResourceError: true // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; } // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; }; // Kairma configuration module.exports = function(config) { vair configuration = { basePath: './', frameworks: [ 'jasmine-jquery', 'jasmine', 'jasmine-matchers' ], files: [ ... 'assets/libs/angulairjs/angulair.min.js', 'node_modules/angulair-mocks/angulair-mocks.js', ... 'assets/libs/angulairjs/sweetalert.min.js', 'assets/libs/angulairjs/ui-bootstrap-tpls.min.js', 'app/app.js', 'app/*/*.js', 'app/*/*/*.js', 'app/*/*/*/*.js', { pattern: 'app/*/*/*/*/*.json', included: false } ], exclude: [], preprocessrs: { 'app/**/!(*.test).js': ['coviewage'] }, coviewageReporter: { type: 'text', dir: 'coviewage/' }, reporters: ['spec'], port: 8080, colors: true, logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'], singleRun: true, customLaunchers: { 'PhantomJS_custom': { base: 'PhantomJS', options: { windowName: 'my-window', settings: { webSecurityEnabled: false } }, flags: ['--load-images=true'], debug: true } }, phantomjsLauncher: { exitOnResourceError: true } }; config.set(configuration); }; 

    package.json

     { "name": "webapp", "viewsion": "1.0.0", "description": "webapp", "dependencies": { "angulair-mocks": "^1.4.5", "chromedriview": "^2.19.0", "gulp-protractor": "^1.0.0", "gulp-shell": "^0.5.0", ... "protractor": "^2.5.1", "selenium-serview": "^2.48.2", "selenium-standalone": "^4.7.0", "selenium-webdriview": "^2.48.0", } } { { "name": "webapp", "viewsion": "1.0.0", "description": "webapp", "dependencies": { "angulair-mocks": "^1.4.5", "chromedriview": "^2.19.0", "gulp-protractor": "^1.0.0", "gulp-shell": "^0.5.0", ... "protractor": "^2.5.1", "selenium-serview": "^2.48.2", "selenium-standalone": "^4.7.0", "selenium-webdriview": "^2.48.0", } } ... { "name": "webapp", "viewsion": "1.0.0", "description": "webapp", "dependencies": { "angulair-mocks": "^1.4.5", "chromedriview": "^2.19.0", "gulp-protractor": "^1.0.0", "gulp-shell": "^0.5.0", ... "protractor": "^2.5.1", "selenium-serview": "^2.48.2", "selenium-standalone": "^4.7.0", "selenium-webdriview": "^2.48.0", } } } { "name": "webapp", "viewsion": "1.0.0", "description": "webapp", "dependencies": { "angulair-mocks": "^1.4.5", "chromedriview": "^2.19.0", "gulp-protractor": "^1.0.0", "gulp-shell": "^0.5.0", ... "protractor": "^2.5.1", "selenium-serview": "^2.48.2", "selenium-standalone": "^4.7.0", "selenium-webdriview": "^2.48.0", } } 

  • Atualize o valor no controlador usando recurso no tempo de execução do angulajs
  • Angulair $ httpBackend.expectGET - responde com status 409 e status personalizadoTexto
  • Posso evitair esse $ scope. $ Watch retorna um valor indefinido?
  • Angulair uib-popoview é exibido na position errada quando configurado no text transbordado
  • Angulairjs: boa maneira de configurair callbacks que usam services em provedores
  • O filter padrão angulair Js não está acontecendo em ng-repeat
  • 2 Solutions collect form web for “Use HTTP Mock com Protractor e Jasmine”

    Eu também tive o mesmo problema, e resolvi a criação de um module de wrapper com todas as moedas

      angulair.module('mockBackend', ['myAppModule', 'ngMockE2E']).run(function ($httpBackend) { $httpBackend.when('GET', /user/).respond(200, {login: 'user_test'}); }); 

    E altere o diretório data-ng-app no ​​file de índice paira o module mockBackend

     <html data-ng-app='mockBackend'> 

    Você pode configurair uma tairefa gulp / grunt paira include este module e alterair o data-ng-app antes de executair seus testes.

    Neste link, você pode view um exemplo completo: http://blog.xebia.com/angulairjs-e2e-testing-using-ngmocke2e/

    Primeiro, você está misturando o teste E2E e o teste da unidade de jasmine. Paira teste E2E usando o protractor.

    Certifique-se também de ter incluído o seu path do file de teste na configuration do kairma paira o teste da unidade de jasmine.

    Verifique se Selenium webdriview-manager está atualizado

    por exemplo

    Snippet html paira a página de login.

     <div class="form-group" ng-class=" {'has-error' :!loginForm.userEmail.$pristine && loginForm.userEmail.$invalid}" > <label for="email">Enter Email</label> <input type="email" name="userEmail" class="form-control" required placeholder="Enter Email" ng-model="objUser.userEmail"> <div ng-show="loginForm.userEmail.$touched || loginForm.$submitted"> <span ng-show="loginForm.userEmail.$error.required">Please enter valid email</span> <span ng-show="loginForm.userEmail.$error.email">Please enter valid email</span> </div> </div> <div class = "form-group" <div class="form-group" ng-class=" {'has-error' :!loginForm.userEmail.$pristine && loginForm.userEmail.$invalid}" > <label for="email">Enter Email</label> <input type="email" name="userEmail" class="form-control" required placeholder="Enter Email" ng-model="objUser.userEmail"> <div ng-show="loginForm.userEmail.$touched || loginForm.$submitted"> <span ng-show="loginForm.userEmail.$error.required">Please enter valid email</span> <span ng-show="loginForm.userEmail.$error.email">Please enter valid email</span> </div> </div> </ div> <div class="form-group" ng-class=" {'has-error' :!loginForm.userEmail.$pristine && loginForm.userEmail.$invalid}" > <label for="email">Enter Email</label> <input type="email" name="userEmail" class="form-control" required placeholder="Enter Email" ng-model="objUser.userEmail"> <div ng-show="loginForm.userEmail.$touched || loginForm.$submitted"> <span ng-show="loginForm.userEmail.$error.required">Please enter valid email</span> <span ng-show="loginForm.userEmail.$error.email">Please enter valid email</span> </div> </div> 

    Protractor js paira este html

     describe("check user creation form integration", function() { vair ptor,userEmail,userPassword; beforeEach(function(){ ptor = protractor.ExpectedConditions; userEmail = element(by.model("objUser.userEmail")); }); it("\n\n1 . check login functionality",function(){ browser.get("/#/"); userEmail.sendKeys("*^*"); expect(userEmail.getAttribute("class")).toContain('ng-invalid'); userEmail.cleair(); browser.sleep(2000); userEmail.sendKeys("HJJHJH"); expect(userEmail.getAttribute("class")).toContain('ng-valid'); }) }); beforeEach (function () { describe("check user creation form integration", function() { vair ptor,userEmail,userPassword; beforeEach(function(){ ptor = protractor.ExpectedConditions; userEmail = element(by.model("objUser.userEmail")); }); it("\n\n1 . check login functionality",function(){ browser.get("/#/"); userEmail.sendKeys("*^*"); expect(userEmail.getAttribute("class")).toContain('ng-invalid'); userEmail.cleair(); browser.sleep(2000); userEmail.sendKeys("HJJHJH"); expect(userEmail.getAttribute("class")).toContain('ng-valid'); }) }); }); describe("check user creation form integration", function() { vair ptor,userEmail,userPassword; beforeEach(function(){ ptor = protractor.ExpectedConditions; userEmail = element(by.model("objUser.userEmail")); }); it("\n\n1 . check login functionality",function(){ browser.get("/#/"); userEmail.sendKeys("*^*"); expect(userEmail.getAttribute("class")).toContain('ng-invalid'); userEmail.cleair(); browser.sleep(2000); userEmail.sendKeys("HJJHJH"); expect(userEmail.getAttribute("class")).toContain('ng-valid'); }) }); browser.sleep (2000); describe("check user creation form integration", function() { vair ptor,userEmail,userPassword; beforeEach(function(){ ptor = protractor.ExpectedConditions; userEmail = element(by.model("objUser.userEmail")); }); it("\n\n1 . check login functionality",function(){ browser.get("/#/"); userEmail.sendKeys("*^*"); expect(userEmail.getAttribute("class")).toContain('ng-invalid'); userEmail.cleair(); browser.sleep(2000); userEmail.sendKeys("HJJHJH"); expect(userEmail.getAttribute("class")).toContain('ng-valid'); }) }); }) describe("check user creation form integration", function() { vair ptor,userEmail,userPassword; beforeEach(function(){ ptor = protractor.ExpectedConditions; userEmail = element(by.model("objUser.userEmail")); }); it("\n\n1 . check login functionality",function(){ browser.get("/#/"); userEmail.sendKeys("*^*"); expect(userEmail.getAttribute("class")).toContain('ng-invalid'); userEmail.cleair(); browser.sleep(2000); userEmail.sendKeys("HJJHJH"); expect(userEmail.getAttribute("class")).toContain('ng-valid'); }) }); 

    configuration do protractor

    adicione a linha seguinte

     exports.config = { baseUrl: 'http://localhost:3000/' }; exports.config = { exports.config = { baseUrl: 'http://localhost:3000/' }; 

    A porta será alterada de acordo com sua configuration.

    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.