From 2d486e093d8fa6871ae420058c58b290f048faaa Mon Sep 17 00:00:00 2001 From: Linsen Wu Date: Mon, 18 Apr 2016 14:29:51 -0700 Subject: [PATCH] Added OneNote as a host to taskpane and content add-ins --- generators/app/index.js | 5 +++++ generators/content/index.js | 5 +++++ generators/taskpane/index.js | 5 +++++ test/content/existingproj-html.js | 15 +++++++++++++++ test/content/existingproj-manifestonly.js | 15 +++++++++++++++ test/content/existingproj-ng.js | 15 +++++++++++++++ test/content/existingproj-ngadal.js | 15 +++++++++++++++ test/content/newproj-html.js | 15 +++++++++++++++ test/content/newproj-manifestonly.js | 15 +++++++++++++++ test/content/newproj-ng.js | 15 +++++++++++++++ test/content/newproj-ngadal.js | 15 +++++++++++++++ test/taskpane/existingproj-html.js | 15 +++++++++++++++ test/taskpane/existingproj-manifestonly.js | 15 +++++++++++++++ test/taskpane/existingproj-ng.js | 15 +++++++++++++++ test/taskpane/existingproj-ngadal.js | 15 +++++++++++++++ test/taskpane/newproj-html.js | 15 +++++++++++++++ test/taskpane/newproj-manifestonly.js | 15 +++++++++++++++ test/taskpane/newproj-ng.js | 15 +++++++++++++++ test/taskpane/newproj-ngadal.js | 15 +++++++++++++++ 19 files changed, 255 insertions(+) diff --git a/generators/app/index.js b/generators/app/index.js index 072506d8..fc66ceea 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -208,6 +208,11 @@ module.exports = generators.Base.extend({ name: 'PowerPoint', value: 'Presentation', checked: true + }, + { + name: 'OneNote', + value: 'Notebook', + checked: true }, { name: 'Project', diff --git a/generators/content/index.js b/generators/content/index.js index 56636b67..e3bf274f 100644 --- a/generators/content/index.js +++ b/generators/content/index.js @@ -132,6 +132,11 @@ module.exports = generators.Base.extend({ name: 'PowerPoint', value: 'Presentation', checked: true + }, + { + name: 'OneNote', + value: 'Notebook', + checked: true }, { name: 'Project', diff --git a/generators/taskpane/index.js b/generators/taskpane/index.js index 3e4e2fa5..0f5ecfad 100644 --- a/generators/taskpane/index.js +++ b/generators/taskpane/index.js @@ -130,6 +130,11 @@ module.exports = generators.Base.extend({ name: 'PowerPoint', value: 'Presentation', checked: true + }, + { + name: 'OneNote', + value: 'Notebook', + checked: true }, { name: 'Project', diff --git a/test/content/existingproj-html.js b/test/content/existingproj-html.js index 27012faf..7063d825 100644 --- a/test/content/existingproj-html.js +++ b/test/content/existingproj-html.js @@ -269,6 +269,21 @@ describe('office:content', function () { }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/existingproj-manifestonly.js b/test/content/existingproj-manifestonly.js index 57d98404..f9788513 100644 --- a/test/content/existingproj-manifestonly.js +++ b/test/content/existingproj-manifestonly.js @@ -155,6 +155,21 @@ describe('office:content', function(){ }); expect(found,' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/existingproj-ng.js b/test/content/existingproj-ng.js index 50428dc2..82d1ccca 100644 --- a/test/content/existingproj-ng.js +++ b/test/content/existingproj-ng.js @@ -273,6 +273,21 @@ describe('office:content', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/existingproj-ngadal.js b/test/content/existingproj-ngadal.js index 00ec79ca..1d5ac9b8 100644 --- a/test/content/existingproj-ngadal.js +++ b/test/content/existingproj-ngadal.js @@ -301,6 +301,21 @@ describe('office:content', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/newproj-html.js b/test/content/newproj-html.js index 94a76c8c..83b73c4d 100644 --- a/test/content/newproj-html.js +++ b/test/content/newproj-html.js @@ -261,6 +261,21 @@ describe('office:content', function(){ }); expect(found,' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/newproj-manifestonly.js b/test/content/newproj-manifestonly.js index 241d2caa..97736cd6 100644 --- a/test/content/newproj-manifestonly.js +++ b/test/content/newproj-manifestonly.js @@ -151,6 +151,21 @@ describe('office:content', function(){ }); expect(found,' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/newproj-ng.js b/test/content/newproj-ng.js index 2704dd21..83bcd57c 100644 --- a/test/content/newproj-ng.js +++ b/test/content/newproj-ng.js @@ -263,6 +263,21 @@ describe('office:content', function(){ }); expect(found,' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/content/newproj-ngadal.js b/test/content/newproj-ngadal.js index bcf80135..f83cce91 100644 --- a/test/content/newproj-ngadal.js +++ b/test/content/newproj-ngadal.js @@ -294,6 +294,21 @@ describe('office:content', function(){ done(); }); + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + + done(); + }); + /** * Project present in host entry. */ diff --git a/test/taskpane/existingproj-html.js b/test/taskpane/existingproj-html.js index 80c4f6e7..388cc946 100644 --- a/test/taskpane/existingproj-html.js +++ b/test/taskpane/existingproj-html.js @@ -225,6 +225,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/taskpane/existingproj-manifestonly.js b/test/taskpane/existingproj-manifestonly.js index 56d97abd..94409b8a 100644 --- a/test/taskpane/existingproj-manifestonly.js +++ b/test/taskpane/existingproj-manifestonly.js @@ -152,6 +152,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/taskpane/existingproj-ng.js b/test/taskpane/existingproj-ng.js index 42b605f0..41c2e993 100644 --- a/test/taskpane/existingproj-ng.js +++ b/test/taskpane/existingproj-ng.js @@ -232,6 +232,21 @@ describe('office:taskpane', function(){ done(); }); + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + + done(); + }); + /** * Project present in host entry. */ diff --git a/test/taskpane/existingproj-ngadal.js b/test/taskpane/existingproj-ngadal.js index 54fb9530..3fffa77f 100644 --- a/test/taskpane/existingproj-ngadal.js +++ b/test/taskpane/existingproj-ngadal.js @@ -260,6 +260,21 @@ describe('office:taskpane', function(){ done(); }); + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + + done(); + }); + /** * Project present in host entry. */ diff --git a/test/taskpane/newproj-html.js b/test/taskpane/newproj-html.js index 0acc5b2c..8a9739b1 100644 --- a/test/taskpane/newproj-html.js +++ b/test/taskpane/newproj-html.js @@ -262,6 +262,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/taskpane/newproj-manifestonly.js b/test/taskpane/newproj-manifestonly.js index 9969b43b..b456229a 100644 --- a/test/taskpane/newproj-manifestonly.js +++ b/test/taskpane/newproj-manifestonly.js @@ -151,6 +151,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/taskpane/newproj-ng.js b/test/taskpane/newproj-ng.js index dbd08867..f36a5814 100644 --- a/test/taskpane/newproj-ng.js +++ b/test/taskpane/newproj-ng.js @@ -264,6 +264,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); }); diff --git a/test/taskpane/newproj-ngadal.js b/test/taskpane/newproj-ngadal.js index acbf2cde..7c008d76 100644 --- a/test/taskpane/newproj-ngadal.js +++ b/test/taskpane/newproj-ngadal.js @@ -292,6 +292,21 @@ describe('office:taskpane', function(){ }); expect(found, ' exist').to.be.true; + done(); + }); + + /** + * OneNote present in host entry. + */ + it('includes OneNote in Hosts', function(done){ + var found = false; + _.forEach(manifest.OfficeApp.Hosts[0].Host, function(h){ + if (h.$.Name === 'Notebook') { + found = true; + } + }); + expect(found, ' exist').to.be.true; + done(); });