Paul Miller
11 years ago
19 changed files with 3 additions and 34998 deletions
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
module.exports = function(config){ |
||||
config.set({ |
||||
|
||||
|
||||
basePath : '../', |
||||
|
||||
files : [ |
||||
'test/e2e/**/*.js' |
||||
], |
||||
|
||||
autoWatch : false, |
||||
|
||||
browsers : ['Chrome'], |
||||
|
||||
frameworks: ['ng-scenario'], |
||||
|
||||
singleRun : true, |
||||
|
||||
proxies : { |
||||
'/': 'http://localhost:8000/' |
||||
}, |
||||
|
||||
plugins : [ |
||||
'karma-junit-reporter', |
||||
'karma-chrome-launcher', |
||||
'karma-firefox-launcher', |
||||
'karma-jasmine', |
||||
'karma-ng-scenario' |
||||
], |
||||
|
||||
junitReporter : { |
||||
outputFile: 'test_out/e2e.xml', |
||||
suite: 'e2e' |
||||
} |
||||
|
||||
})} |
||||
|
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
module.exports = function(config){ |
||||
config.set({ |
||||
basePath : '../', |
||||
|
||||
files : [ |
||||
'app/lib/angular/angular.js', |
||||
'app/lib/angular/angular-*.js', |
||||
'test/lib/angular/angular-mocks.js', |
||||
'app/js/**/*.js', |
||||
'test/unit/**/*.js' |
||||
], |
||||
|
||||
exclude : [ |
||||
'app/lib/angular/angular-loader.js', |
||||
'app/lib/angular/*.min.js', |
||||
'app/lib/angular/angular-scenario.js' |
||||
], |
||||
|
||||
autoWatch : true, |
||||
|
||||
frameworks: ['jasmine'], |
||||
|
||||
browsers : ['Chrome'], |
||||
|
||||
plugins : [ |
||||
'karma-junit-reporter', |
||||
'karma-chrome-launcher', |
||||
'karma-firefox-launcher', |
||||
'karma-jasmine' |
||||
], |
||||
|
||||
junitReporter : { |
||||
outputFile: 'test_out/unit.xml', |
||||
suite: 'unit' |
||||
} |
||||
|
||||
})} |
@ -1,11 +0,0 @@
@@ -1,11 +0,0 @@
|
||||
@echo off |
||||
|
||||
REM Windows script for running e2e tests |
||||
REM You have to run server and capture some browser first |
||||
REM |
||||
REM Requirements: |
||||
REM - NodeJS (http://nodejs.org/) |
||||
REM - Karma (npm install -g karma) |
||||
|
||||
set BASE_DIR=%~dp0 |
||||
karma start "%BASE_DIR%\..\config\karma-e2e.conf.js" %* |
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
BASE_DIR=`dirname $0` |
||||
|
||||
echo "" |
||||
echo "Starting Karma Server (http://karma-runner.github.io)" |
||||
echo $BASE_DIR |
||||
echo "-------------------------------------------------------------------" |
||||
|
||||
$BASE_DIR/../node_modules/karma/bin/karma start $BASE_DIR/../config/karma-e2e.conf.js $* |
@ -1,11 +0,0 @@
@@ -1,11 +0,0 @@
|
||||
@echo off |
||||
|
||||
REM Windows script for running unit tests |
||||
REM You have to run server and capture some browser first |
||||
REM |
||||
REM Requirements: |
||||
REM - NodeJS (http://nodejs.org/) |
||||
REM - Karma (npm install -g karma) |
||||
|
||||
set BASE_DIR=%~dp0 |
||||
karma start "%BASE_DIR%\..\config\karma.conf.js" %* |
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
BASE_DIR=`dirname $0` |
||||
|
||||
echo "" |
||||
echo "Starting Karma Server (http://karma-runner.github.io)" |
||||
echo "-------------------------------------------------------------------" |
||||
|
||||
#$BASE_DIR/../node_modules/karma/bin/karma start $BASE_DIR/../config/karma.conf.js $* |
||||
karma start $BASE_DIR/../config/karma.conf.js $* |
@ -1,19 +0,0 @@
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env watchr |
||||
|
||||
# config file for watchr http://github.com/mynyml/watchr |
||||
# install: gem install watchr |
||||
# run: watch watchr.rb |
||||
# note: make sure that you have jstd server running (server.sh) and a browser captured |
||||
|
||||
log_file = File.expand_path(File.dirname(__FILE__) + '/../logs/jstd.log') |
||||
|
||||
`cd ..` |
||||
`touch #{log_file}` |
||||
|
||||
puts "String watchr... log file: #{log_file}" |
||||
|
||||
watch( '(app/js|test/unit)' ) do |
||||
`echo "\n\ntest run started @ \`date\`" > #{log_file}` |
||||
`scripts/test.sh &> #{log_file}` |
||||
end |
||||
|
@ -1,11 +0,0 @@
@@ -1,11 +0,0 @@
|
||||
<!doctype html> |
||||
<html lang="en"> |
||||
<head> |
||||
<title>End2end Test Runner</title> |
||||
<meta charset="utf-8"> |
||||
<script src="../lib/angular/angular-scenario.js" ng-autotest></script> |
||||
<script src="scenarios.js"></script> |
||||
</head> |
||||
<body> |
||||
</body> |
||||
</html> |
@ -1,45 +0,0 @@
@@ -1,45 +0,0 @@
|
||||
'use strict'; |
||||
|
||||
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */ |
||||
|
||||
describe('my app', function() { |
||||
|
||||
beforeEach(function() { |
||||
browser().navigateTo('app/index.html'); |
||||
}); |
||||
|
||||
|
||||
it('should automatically redirect to /view1 when location hash/fragment is empty', function() { |
||||
expect(browser().location().url()).toBe("/view1"); |
||||
}); |
||||
|
||||
|
||||
describe('view1', function() { |
||||
|
||||
beforeEach(function() { |
||||
browser().navigateTo('#/view1'); |
||||
}); |
||||
|
||||
|
||||
it('should render view1 when user navigates to /view1', function() { |
||||
expect(element('[ng-view] p:first').text()). |
||||
toMatch(/partial for view 1/); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
|
||||
describe('view2', function() { |
||||
|
||||
beforeEach(function() { |
||||
browser().navigateTo('#/view2'); |
||||
}); |
||||
|
||||
|
||||
it('should render view2 when user navigates to /view2', function() { |
||||
expect(element('[ng-view] p:first').text()). |
||||
toMatch(/partial for view 2/); |
||||
}); |
||||
|
||||
}); |
||||
}); |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
'use strict'; |
||||
|
||||
/* jasmine specs for controllers go here */ |
||||
|
||||
describe('controllers', function(){ |
||||
beforeEach(module('myApp.controllers')); |
||||
|
||||
|
||||
it('should ....', inject(function() { |
||||
//spec body
|
||||
})); |
||||
|
||||
it('should ....', inject(function() { |
||||
//spec body
|
||||
})); |
||||
}); |
@ -1,19 +0,0 @@
@@ -1,19 +0,0 @@
|
||||
'use strict'; |
||||
|
||||
/* jasmine specs for directives go here */ |
||||
|
||||
describe('directives', function() { |
||||
beforeEach(module('myApp.directives')); |
||||
|
||||
describe('app-version', function() { |
||||
it('should print current version', function() { |
||||
module(function($provide) { |
||||
$provide.value('version', 'TEST_VER'); |
||||
}); |
||||
inject(function($compile, $rootScope) { |
||||
var element = $compile('<span app-version></span>')($rootScope); |
||||
expect(element.text()).toEqual('TEST_VER'); |
||||
}); |
||||
}); |
||||
}); |
||||
}); |
@ -1,19 +0,0 @@
@@ -1,19 +0,0 @@
|
||||
'use strict'; |
||||
|
||||
/* jasmine specs for filters go here */ |
||||
|
||||
describe('filter', function() { |
||||
beforeEach(module('myApp.filters')); |
||||
|
||||
|
||||
describe('interpolate', function() { |
||||
beforeEach(module(function($provide) { |
||||
$provide.value('version', 'TEST_VER'); |
||||
})); |
||||
|
||||
|
||||
it('should replace VERSION', inject(function(interpolateFilter) { |
||||
expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after'); |
||||
})); |
||||
}); |
||||
}); |
@ -1,14 +0,0 @@
@@ -1,14 +0,0 @@
|
||||
'use strict'; |
||||
|
||||
/* jasmine specs for services go here */ |
||||
|
||||
describe('service', function() { |
||||
beforeEach(module('myApp.services')); |
||||
|
||||
|
||||
describe('version', function() { |
||||
it('should return current version', inject(function(version) { |
||||
expect(version).toEqual('0.1'); |
||||
})); |
||||
}); |
||||
}); |
Loading…
Reference in new issue