|
1 | | -var fs = require('fs'), |
2 | | - helpers = require('./helpers'), |
3 | | - path = require('path'), |
4 | | - Q = require('q'), |
5 | | - shell = require('shelljs'); |
| 1 | +// var fs = require('fs'), |
| 2 | +// helpers = require('./helpers'), |
| 3 | +// path = require('path'), |
| 4 | +// Q = require('q'), |
| 5 | +// shell = require('shelljs'); |
6 | 6 |
|
7 | | -var IonicCli = require('../lib/cli'); |
8 | | -var IonicAppLib = require('ionic-app-lib'); |
| 7 | +// var IonicCli = require('../lib/cli'); |
| 8 | +// var IonicAppLib = require('ionic-app-lib'); |
9 | 9 |
|
10 | | -var tmpDir = helpers.tmpDir('create_test'); |
11 | | -var appName = 'TestIonic'; |
12 | | -var appId = 'org.ionic.testing'; |
13 | | -var project = path.join(tmpDir, appName); |
14 | | -var optimist = require('optimist'); |
15 | | -var start = IonicAppLib.start; |
16 | | -var utils = IonicAppLib.utils; |
17 | | -var optimistSpy; |
| 10 | +// var tmpDir = helpers.tmpDir('create_test'); |
| 11 | +// var appName = 'TestIonic'; |
| 12 | +// var appId = 'org.ionic.testing'; |
| 13 | +// var project = path.join(tmpDir, appName); |
| 14 | +// var optimist = require('optimist'); |
| 15 | +// var start = IonicAppLib.start; |
| 16 | +// var utils = IonicAppLib.utils; |
| 17 | +// var optimistSpy; |
18 | 18 |
|
19 | 19 |
|
20 | | -describe('end-to-end', function() { |
21 | | - beforeEach(function() { |
22 | | - jasmine.getEnv().defaultTimeoutInterval = 150000; |
23 | | - // if (optimistSpy) { |
24 | | - // optimistSpy.reset(); |
25 | | - // } |
26 | | - optimistSpy = spyOn(optimist, 'boolean'); |
27 | | - optimist.boolean.reset(); |
| 20 | +// xdescribe('end-to-end', function() { |
| 21 | +// beforeEach(function() { |
| 22 | +// jasmine.getEnv().defaultTimeoutInterval = 150000; |
| 23 | +// // if (optimistSpy) { |
| 24 | +// // optimistSpy.reset(); |
| 25 | +// // } |
| 26 | +// optimistSpy = spyOn(optimist, 'boolean'); |
| 27 | +// optimist.boolean.reset(); |
28 | 28 |
|
29 | | - //Mock out call to get the app directory, return our project |
30 | | - spyOn(utils, 'getProjectDirectory').andReturn(project); |
| 29 | +// //Mock out call to get the app directory, return our project |
| 30 | +// spyOn(utils, 'getProjectDirectory').andReturn(project); |
31 | 31 |
|
32 | | - //Disable console.log statements |
33 | | - // spyOn(IonicAppLib.events, 'on'); |
34 | | - // spyOn(process.stdout, 'write'); |
35 | | - spyOn(IonicAppLib.multibar, 'newBar').andReturn({tick: function(){}}); |
| 32 | +// //Disable console.log statements |
| 33 | +// // spyOn(IonicAppLib.events, 'on'); |
| 34 | +// // spyOn(process.stdout, 'write'); |
| 35 | +// spyOn(IonicAppLib.multibar, 'newBar').andReturn({tick: function(){}}); |
36 | 36 |
|
37 | 37 |
|
38 | | - shell.rm('-rf', project); |
39 | | - shell.mkdir('-p', tmpDir); |
40 | | - }); |
41 | | - afterEach(function() { |
42 | | - process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. |
43 | | - // shell.rm('-rf', tmpDir); |
44 | | - }); |
| 38 | +// shell.rm('-rf', project); |
| 39 | +// shell.mkdir('-p', tmpDir); |
| 40 | +// }); |
| 41 | +// afterEach(function() { |
| 42 | +// process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. |
| 43 | +// // shell.rm('-rf', tmpDir); |
| 44 | +// }); |
45 | 45 |
|
46 | | - describe('#start e2e', function() { |
47 | | - it('should call start with default template and folder name', function(done) { |
48 | | - console.log('default template'); |
49 | | - var args = { _: ['start', 'test'], verbose: true}; |
50 | | - //Mock out args from the commands. |
51 | | - // optimistSpy.andReturn({argv: args}); |
52 | | - optimistSpy.andCallFake(function(){ |
53 | | - return {argv: args}; |
54 | | - }); |
| 46 | +// describe('#start e2e', function() { |
| 47 | +// it('should call start with default template and folder name', function(done) { |
| 48 | +// console.log('default template'); |
| 49 | +// var args = { _: ['start', 'test'], verbose: true}; |
| 50 | +// //Mock out args from the commands. |
| 51 | +// // optimistSpy.andReturn({argv: args}); |
| 52 | +// optimistSpy.andCallFake(function(){ |
| 53 | +// return {argv: args}; |
| 54 | +// }); |
55 | 55 |
|
56 | | - Q() |
57 | | - .then(function() { |
58 | | - return IonicCli.run(args); |
59 | | - }).then(function(){ |
60 | | - expect(path.join(project, 'www', 'index.html')).toExist(); |
61 | | - expect(path.join(project, 'www', 'templates', 'tabs.html')).toExist(); |
62 | | - }) |
63 | | - .catch(function(error) { |
64 | | - expect('this').toBe('not this'); |
65 | | - }) |
66 | | - .fin(done); |
67 | | - }); |
| 56 | +// Q() |
| 57 | +// .then(function() { |
| 58 | +// return IonicCli.run(args); |
| 59 | +// }).then(function(){ |
| 60 | +// expect(path.join(project, 'www', 'index.html')).toExist(); |
| 61 | +// expect(path.join(project, 'www', 'templates', 'tabs.html')).toExist(); |
| 62 | +// }) |
| 63 | +// .catch(function(error) { |
| 64 | +// expect('this').toBe('not this'); |
| 65 | +// }) |
| 66 | +// .fin(done); |
| 67 | +// }); |
68 | 68 |
|
69 | | - it('should call start with sidemenu template and folder name', function(done) { |
70 | | - console.log('sidemenu template'); |
71 | | - var args = { _: ['start', 'test', 'sidemenu'], verbose: true}; |
72 | | - //Mock out args from the commands. |
73 | | - // optimistSpy.andReturn({argv: args}); |
74 | | - optimistSpy.andCallFake(function(){ |
75 | | - return {argv: args}; |
76 | | - }); |
| 69 | +// it('should call start with sidemenu template and folder name', function(done) { |
| 70 | +// console.log('sidemenu template'); |
| 71 | +// var args = { _: ['start', 'test', 'sidemenu'], verbose: true}; |
| 72 | +// //Mock out args from the commands. |
| 73 | +// // optimistSpy.andReturn({argv: args}); |
| 74 | +// optimistSpy.andCallFake(function(){ |
| 75 | +// return {argv: args}; |
| 76 | +// }); |
77 | 77 |
|
78 | | - Q() |
79 | | - .then(function() { |
80 | | - return IonicCli.run(args); |
81 | | - }).then(function(){ |
82 | | - expect(path.join(project, 'www', 'index.html')).toExist(); |
83 | | - expect(path.join(project, 'www', 'templates', 'menu.html')).toExist(); |
84 | | - }) |
85 | | - .catch(function(error) { |
86 | | - expect('this').toBe('not this'); |
87 | | - }) |
88 | | - .fin(done); |
89 | | - }); |
| 78 | +// Q() |
| 79 | +// .then(function() { |
| 80 | +// return IonicCli.run(args); |
| 81 | +// }).then(function(){ |
| 82 | +// expect(path.join(project, 'www', 'index.html')).toExist(); |
| 83 | +// expect(path.join(project, 'www', 'templates', 'menu.html')).toExist(); |
| 84 | +// }) |
| 85 | +// .catch(function(error) { |
| 86 | +// expect('this').toBe('not this'); |
| 87 | +// }) |
| 88 | +// .fin(done); |
| 89 | +// }); |
90 | 90 |
|
91 | | - it('should call start with blank template and folder name', function(done) { |
92 | | - var args = { _: ['start', 'test', 'blank'], verbose: true}; |
93 | | - //Mock out args from the commands. |
94 | | - optimistSpy.andCallFake(function(){ |
95 | | - return {argv: args}; |
96 | | - }); |
| 91 | +// it('should call start with blank template and folder name', function(done) { |
| 92 | +// var args = { _: ['start', 'test', 'blank'], verbose: true}; |
| 93 | +// //Mock out args from the commands. |
| 94 | +// optimistSpy.andCallFake(function(){ |
| 95 | +// return {argv: args}; |
| 96 | +// }); |
97 | 97 |
|
98 | | - Q() |
99 | | - .then(function() { |
100 | | - return IonicCli.run(args); |
101 | | - }).then(function(){ |
102 | | - expect(path.join(project, 'www', 'index.html')).toExist(); |
103 | | - expect(path.join(project, 'www', 'js', 'app.js')).toExist(); |
104 | | - }) |
105 | | - .catch(function(error) { |
106 | | - expect('this').toBe('not this'); |
107 | | - }) |
108 | | - .fin(done); |
109 | | - }); |
110 | | - }); |
111 | | -}); |
| 98 | +// Q() |
| 99 | +// .then(function() { |
| 100 | +// return IonicCli.run(args); |
| 101 | +// }).then(function(){ |
| 102 | +// expect(path.join(project, 'www', 'index.html')).toExist(); |
| 103 | +// expect(path.join(project, 'www', 'js', 'app.js')).toExist(); |
| 104 | +// }) |
| 105 | +// .catch(function(error) { |
| 106 | +// expect('this').toBe('not this'); |
| 107 | +// }) |
| 108 | +// .fin(done); |
| 109 | +// }); |
| 110 | +// }); |
| 111 | +// }); |
0 commit comments