@webos-tools/cli 3.0.5 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,25 @@ describe(aresCmd + ' --add(-a)', function() {
84
84
  });
85
85
  });
86
86
 
87
+ describe(aresCmd + ' --add(-a)', function() {
88
+ it('Add DEVICE using default info', function(done) {
89
+ const newDevice = 'default';
90
+ const defaultUserName = options.profile === 'tv' ? 'prisoner' : 'root';
91
+ const defaultPort = options.profile === 'tv' ? '9922' : '22';
92
+ const defaultHost = '127.0.0.1';
93
+ exec(cmd + ` -a ${newDevice}`, function(error, stdout, stderr) {
94
+ if (stderr && stderr.length > 0) {
95
+ common.detectNodeMessage(stderr);
96
+ }
97
+ expect(stdout).toContain(newDevice);
98
+ expect(stdout).toContain(defaultHost);
99
+ expect(stdout).toContain(defaultUserName);
100
+ expect(stdout).toContain(defaultPort);
101
+ done();
102
+ });
103
+ });
104
+ })
105
+
87
106
  describe(aresCmd + ' --add(-a)', function() {
88
107
  it('Add DEVICE as default property', function(done) {
89
108
  const host = '192.168.0.5';
@@ -269,11 +288,11 @@ describe(aresCmd + ' negative TC', function() {
269
288
  });
270
289
 
271
290
  it('Add invalid DEVICE', function(done) {
272
- const deivceName = "invalid#@!";
291
+ const deivceName = "$%invalid";
273
292
  exec(cmd + ` -a ${deivceName}`, function(error, stdout, stderr) {
274
293
  if (stderr && stderr.length > 0) {
275
294
  common.detectNodeMessage(stderr);
276
- expect(stderr).toContain("ares-setup-device ERR! [Tips]: Invalid device name. The device name should consist");
295
+ expect(stderr).toContain("ares-setup-device ERR! [Tips]: Invalid device name. The device name should not start with");
277
296
  }
278
297
  done();
279
298
  });