Skip to content

Commit 794c937

Browse files
committed
Merge shared changesd
1 parent b19d8d5 commit 794c937

32 files changed

+715
-557
lines changed

.azure-devops/cleanup.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
steps:
2+
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
3+
displayName: "Cleanup"

.azure-devops/edgewebview.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
steps:
22
- script: |
3-
echo Enable EdgeWebView Loopback
4-
call npx office-addin-dev-settings appcontainer EdgeWebView --loopback --yes
5-
6-
echo Set Edge WebView Registry Settings
7-
8-
set PATH1="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646"
9-
10-
reg add %PATH1% /f /v DisplayName /t REG_SZ /d "@{Microsoft.Win32WebViewHost_10.0.19041.423_neutral_neutral_cw5n1h2txyewy?ms-resource://Windows.Win32WebViewHost/resources/DisplayName}"
11-
reg add %PATH1% /f /v Moniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
12-
13-
set PATH2="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646\Children\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646-3829197285-1050560373-949424154-522343454"
14-
15-
reg add %PATH2% /f /v DisplayName /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy/123"
16-
reg add %PATH2% /f /v Moniker /t REG_SZ /d "123"
17-
reg add %PATH2% /f /v ParentMoniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
18-
3+
echo Enable EdgeWebView Loopback
4+
call npx office-addin-dev-settings appcontainer EdgeWebView --loopback --yes
5+
6+
echo Set Edge WebView Registry Settings
7+
8+
set PATH1="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646"
9+
10+
reg add %PATH1% /f /v DisplayName /t REG_SZ /d "@{Microsoft.Win32WebViewHost_10.0.19041.423_neutral_neutral_cw5n1h2txyewy?ms-resource://Windows.Win32WebViewHost/resources/DisplayName}"
11+
reg add %PATH1% /f /v Moniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
12+
13+
set PATH2="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646\Children\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646-3829197285-1050560373-949424154-522343454"
14+
15+
reg add %PATH2% /f /v DisplayName /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy/123"
16+
reg add %PATH2% /f /v Moniker /t REG_SZ /d "123"
17+
reg add %PATH2% /f /v ParentMoniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
18+
1919
displayName: 'Enable Edge WebView'

.azure-devops/full-pipeline.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,52 @@
33
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
44

55
jobs:
6-
- job: WindowsServer2019
6+
- job: Windows_10_Latest
77
pool:
8-
name: OETest-OfficeClientApps
8+
name: OE-OfficeClientApps
99
steps:
1010
- template: ./install.yml
1111
- template: ./lint.yml
1212
- template: ./build.yml
1313
- template: ./devcerts.yml
1414
- template: ./edgewebview.yml
1515
- template: ./test.yml
16+
parameters:
17+
webView: "edge-chromium"
18+
19+
- job: WebView_EdgeLegacy
20+
pool:
21+
name: OE-OfficeClientApps
22+
steps:
23+
- template: ./install.yml
24+
- template: ./lint.yml
25+
- template: ./build.yml
26+
- template: ./devcerts.yml
27+
- template: ./edgewebview.yml
28+
- template: ./test.yml
29+
parameters:
30+
webView: "edge-legacy"
31+
32+
# Need to fix tests (use of find-process module) to be able to support IE 11 webview
33+
# - job: WebView_IE
34+
# pool:
35+
# name: OE-OfficeClientApps
36+
# steps:
37+
# - template: ./install.yml
38+
# - template: ./lint.yml
39+
# - template: ./build.yml
40+
# - template: ./devcerts.yml
41+
# - template: ./edgewebview.yml
42+
# - template: ./test.yml
43+
# parameters:
44+
# webView: "ie"
45+
46+
- job: Mac
47+
pool:
48+
name: OPX Mac Dogfood Pool
49+
steps:
50+
- template: ./install.yml
51+
- template: ./lint.yml
52+
- template: ./build.yml
53+
- template: ./test.yml
54+
- template: ./cleanup.yml

.azure-devops/test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
parameters:
2+
- name: webView
3+
type: string
4+
default: "edge-chromium"
5+
16
steps:
27
- task: CmdLine@2
38
inputs:
49
script: |
10+
11+
echo Setting WebView Type: ${{ parameters.webView }}
12+
call npx office-addin-dev-settings webview manifest.xml ${{ parameters.webView }}
13+
call npx office-addin-dev-settings webview test/end-to-end/test-manifest.xml ${{ parameters.webView }}
14+
515
echo Running Tests
6-
716
npm run test
817
918
echo Done running tests

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"plugins": [
33
"office-addins"
4-
],
4+
],
55
"extends": [
66
"plugin:office-addins/recommended"
77
]

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Please describe the behavior you were expecting
2323

2424
# Current behavior
2525

26-
Please provide information about the failure. What is the current behavior? If it is not a bug, please add it to [UserVoice](https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/category/164751-office-developer-tools), so that it gets added to our feature roadmap.
26+
Please provide information about the failure. What is the current behavior? If it is not a bug, please submit your idea to the [Microsoft Tech Community Ideas forum](https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform), so that it gets added to our feature roadmap.
2727

2828

2929
## Steps to Reproduce

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
{
88
"type": "node",
99
"request": "launch",
10-
"name": "Debug Tests",
10+
"name": "Debug UI Tests",
1111
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
1212
"args": [
1313
"-u",
1414
"bdd",
1515
"--timeout",
1616
"999999",
1717
"--colors",
18-
"${workspaceFolder}/test",
18+
"${workspaceFolder}/test/end-to-end",
1919
"-r",
2020
"ts-node/register",
21-
"${workspaceFolder}/test/*.ts"
21+
"${workspaceFolder}/test/end-to-end/*.ts"
2222
],
2323
"internalConsoleOptions": "openOnSessionStart",
2424
"runtimeArgs": [

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ There are several ways you can contribute to this sample: providing better code
1111
Code comments make code samples even better by helping developers learn to use the code correctly in their own applications. If you spot a class, method, or section of code that you think could use better descriptions, then create a pull request with your code comments.
1212

1313

14-
In general we want our code comments to follow these guidelines:
14+
In general, we want our code comments to follow these guidelines:
1515

1616
- Any code that has associated documentation displayed in an IDE (such as IntelliSense, or JavaDocs) has code comments.
1717
- Classes, methods, parameters, and return values have clear descriptions.
@@ -26,24 +26,24 @@ Sometimes we get a lot of issues, and it can be hard to keep up. If you have a s
2626

2727
### Add a new feature
2828

29-
New features are great! Be sure to check with the repository admin first to be sure the feature will fit the intent of the sample. Start by opening an issue in the repository that proposes and describes the feature. The repository admin will respond and may ask for more information. If the admin agrees to the new feature, create the feature and submit a pull request.
29+
New features are great! Be sure to check with the repository admin first to be sure the feature fits the intent of the sample. Start by opening an issue in the repository that proposes and describes the feature. The repository admin will respond and may ask for more information. If the admin agrees to the new feature, create the feature and submit a pull request.
3030

3131
## Contribution guidelines
3232

3333
We have some guidelines to help maintain a healthy repo and code for everyone.
3434

3535
### The Contribution License Agreement
3636

37-
For most contributions, you'll be asked to sign a Contribution License Agreement (CLA). This will happen when you submit a pull request. Microsoft will send a link to the CLA to sign via email. Once you sign the CLA, your pull request can proceed. Read the CLA carefully, because you may need to have your employer sign it.
37+
For most contributions, we ask you to sign a Contribution License Agreement (CLA). This will happen when you submit a pull request. Microsoft will send a link to the CLA to sign via email. Once you sign the CLA, your pull request can proceed. Read the CLA carefully, because you may need to have your employer sign it.
3838

3939
### Code contribution checklist
4040

4141
Be sure to satisfy all of the requirements in the following list before submitting a pull request:
4242

4343
- Follow the code style that is appropriate for the platform and language in this repo. For example, Android code follows the style conventions found in the [Code Style for Contributors guide](https://source.android.com/source/code-style.html).
4444
- Test your code.
45-
- Test the UI thoroughly to be sure nothing has been broken by your change.
46-
- Keep the size of your code change reasonable. if the repository owner cannot review your code change in 4 hours or less, your pull request may not be reviewed and approved quickly.
45+
- Test the UI thoroughly to be sure your change hasn't broken anything.
46+
- Keep the size of your code change reasonable. If the repository owner cannot review your code change in 4 hours or less, your pull request may not be reviewed and approved quickly.
4747
- Avoid unnecessary changes. The reviewer will check differences between your code and the original code. Whitespace changes are called out along with your code. Be sure your changes will help improve the content.
4848

4949
### Submit a pull request to the master branch
@@ -61,13 +61,13 @@ Congratulations, you have successfully contributed to the sample!
6161

6262
### Where do I get a Contributor's License Agreement?
6363

64-
You will automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA) if your pull request requires one.
64+
If your pull request requires one, you'll automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA).
6565

6666
As a community member, you must sign the CLA before you can contribute large submissions to this project. You only need complete and submit the CLA document once. Carefully review the document. You may be required to have your employer sign the document.
6767

6868
### What happens with my contributions?
6969

70-
When you submit your changes, via a pull request, our team will be notified and will review your pull request. You will receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues.
70+
When you submit your changes via a pull request, our team will be notified and will review your pull request. You'll receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues.
7171

7272
### Who approves pull requests?
7373

@@ -80,4 +80,4 @@ We typically review pull requests and respond to issues within 10 business days.
8080
## More resources
8181

8282
- To learn more about Markdown, see [Daring Fireball](http://daringfireball.net/).
83-
- To learn more about using Git and GitHub, check out the [GitHub Help section](http://help.github.com/).
83+
- To learn more about using Git and GitHub, check out the [GitHub Help section](http://help.github.com/).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This template supports debugging custom functions from [Visual Studio Code](http
1212

1313
We'd love to get your feedback about this sample. You can send your feedback to us in the *Issues* section of this repository.
1414

15-
Questions about Microsoft Office 365 development in general should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/office-js+API). If your question is about the Office JavaScript APIs, make sure it's tagged with  [office-js].
15+
Questions about Office Add-ins development in general should be posted to [Microsoft Q&A](https://docs.microsoft.com/answers/questions/185087/questions-about-office-add-ins.html). If your question is about the Office JavaScript APIs, make sure it's tagged with [office-js-dev].
1616

1717
## Join the Microsoft 365 Developer Program
1818
Get a free sandbox, tools, and other resources you need to build solutions for the Microsoft 365 platform.

convertToSingleHost.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const testPackages = [
88
"@types/node",
99
"current-processes",
1010
"mocha",
11+
"office-addin-mock",
1112
"office-addin-test-helpers",
1213
"office-addin-test-server",
1314
"ts-node",
@@ -22,6 +23,9 @@ async function removeTestInfraStructure() {
2223
// delete the .github folder
2324
deleteFolder(path.resolve(`./.github`));
2425

26+
// delete CI/CD pipeline files
27+
deleteFolder(path.resolve(`./.azure-devops`));
28+
2529
await updatePackageJsonFile();
2630
await updateLaunchJsonFile();
2731
// delete this script

0 commit comments

Comments
 (0)