mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
make protractor tests work
This commit is contained in:
@@ -4,7 +4,6 @@ module.exports = {
|
||||
src: {
|
||||
spec: ['src/**/test/*.spec.js'],
|
||||
js: ['src/**/*.js', '!src/**/test/**/*.js'],
|
||||
e2eTest: ['src/components/*/test/*/'],
|
||||
e2e: ['src/components/*/test/*/**/*'],
|
||||
html: 'src/**/*.html',
|
||||
scss: 'src/components/**/*.scss',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
describe('<%= relativePath %>', function() {
|
||||
describe('<%= relativePath %>: <%= platform %>', function() {
|
||||
|
||||
it('should init', function() {
|
||||
browser.get('http://localhost:<%= buildConfig.protractorPort %>/<%= relativePath %>');
|
||||
browser.get('http://localhost:<%= buildConfig.protractorPort %>/e2e/<%= relativePath %>?ionic-platform=<%= platform %>');
|
||||
});
|
||||
|
||||
<%= contents %>
|
||||
|
||||
@@ -18,14 +18,9 @@
|
||||
'rx/dist/rx.all': 'rx.all',
|
||||
}
|
||||
})
|
||||
System.import('app/main');
|
||||
</script>
|
||||
<script src="platform.js"></script>
|
||||
</head>
|
||||
<body ion-app>
|
||||
</body>
|
||||
<script>
|
||||
System.import('app/main');
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
//TODO find a better override than window
|
||||
window.IONIC_PLATFORM = '<%= platform %>';
|
||||
@@ -8,7 +8,7 @@ exports.config = {
|
||||
// Spec patterns are relative to the location of the spec file. They may
|
||||
// include glob patterns.
|
||||
specs: [
|
||||
path.resolve(projectRoot, 'dist/e2e/**/*.e2e.js'),
|
||||
path.resolve(projectRoot, 'dist/e2e/**/*e2e.js'),
|
||||
],
|
||||
|
||||
// Options to be passed to Jasmine-node.
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = function(gulp, argv, buildConfig) {
|
||||
console.log('Serving `dist` on http://localhost:' + buildConfig.protractorPort);
|
||||
});
|
||||
|
||||
gulp.task('snapshot', ['e2e', 'protractor-server'], function(done) {
|
||||
gulp.task('snapshot', ['build', 'protractor-server'], function(done) {
|
||||
var protractorConfigFile = path.resolve(projectRoot, 'scripts/snapshot/protractor.config.js');
|
||||
snapshot(done, protractorConfigFile);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user