Skip to content

Commit

Permalink
Merge branch 'workspace/v16.0.0' into dev/john/native-preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
johnman committed Dec 1, 2023
2 parents 07df2d5 + 1545375 commit 8730544
Show file tree
Hide file tree
Showing 26 changed files with 1,581 additions and 1,601 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/automation-testing-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,74 @@ concurrency:
cancel-in-progress: true

jobs:
build:
e2e:
runs-on: windows-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node 16

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Packages
run: |
npm install
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'

- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- name: Run JavaScript Tests with Mocha
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-mocha --prefix how-to/automation-testing/register-with-home-js
- name: Run WDIO tests
run: |
npm run kill --prefix how-to/automation-testing/wdio
npm run dos --prefix how-to/automation-testing/wdio
npm run test --prefix how-to/automation-testing/wdio
- name: Run Selenium tests
run: |
npm run kill --prefix how-to/automation-testing/selenium
npm run dos --prefix how-to/automation-testing/selenium
npm run test --prefix how-to/automation-testing/selenium
- name: Run JavaScript Tests with Jasmine
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-jasmine --prefix how-to/automation-testing/register-with-home-js
- name: Run JavaScript Tests with Jest
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-jest --prefix how-to/automation-testing/register-with-home-js
- name: Run TypeScript Tests with Mocha
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-mocha --prefix how-to/automation-testing/register-with-home-ts
- name: Run TypeScript Tests with Jasmine
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-jasmine --prefix how-to/automation-testing/register-with-home-ts
- name: Run TypeScript Tests with Jest
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
npm run test-remote-jest --prefix how-to/automation-testing/register-with-home-ts
- name: Run JavaScript Tests with Mocha for Store
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/automation-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@ concurrency:
cancel-in-progress: true

jobs:
build:
e2e:
runs-on: windows-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node 16

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Packages
run: |
npm install
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'

- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- name: Run JavaScript Tests with Mocha
run: |
npx fkill-cli OpenFin OpenFinRVM --force --silent
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Workspace Platform Starter - E2E Tests

on:
workflow_dispatch:
push:

jobs:
e2e:
runs-on: windows-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'

- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- name: Run Workspace Platform Starter E2E Tests
working-directory: ./how-to/workspace-platform-starter
run: |
npm run build
npm run start & npm run e2e
16 changes: 8 additions & 8 deletions .github/workflows/publish-HOWTOs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- name: Build packages
run: npm run build
Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/publish-NPM.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,34 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: '19'
registry-url: 'https://registry.npmjs.org'
- run: npm run setup
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'

- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci

- run: npm run build
working-directory: ./how-to/workspace-platform-starter

- run: NAME=@openfin/default-workspace-platform npm run prepare-package
working-directory: ./how-to/workspace-platform-starter

- run: npm publish --access restricted
working-directory: ./how-to/workspace-platform-starter/packaged
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Tests run
name: Workspace Platform Starter - Unit Tests

on:
pull_request:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ how-to/integrate-with-salesforce-basic/public/js/preload.js
**/build
./public*/
updatable-packages.txt
public-github
public-github
chromedriver*
8 changes: 4 additions & 4 deletions how-to/automation-testing/register-with-home-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"devDependencies": {
"@openfin/automation-cli": "^1.1.11",
"@openfin/automation-helpers": "^1.1.11",
"@openfin/automation-native": "^1.1.11",
"@openfin/automation-cli": "^1.2.0",
"@openfin/automation-helpers": "^1.2.0",
"@openfin/automation-native": "^1.2.0",
"chai": "4.3.10",
"jasmine-pretty-html-reporter": "0.2.5",
"jest-html-reporters": "3.1.4",
"jest-html-reporters": "3.1.5",
"mochawesome": "7.1.3"
}
}
6 changes: 3 additions & 3 deletions how-to/automation-testing/register-with-home-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"devDependencies": {
"@openfin/automation-cli": "^1.1.11",
"@openfin/automation-helpers": "^1.1.11",
"@openfin/automation-native": "^1.1.11",
"@openfin/automation-cli": "^1.2.0",
"@openfin/automation-helpers": "^1.2.0",
"@openfin/automation-native": "^1.2.0",
"@types/chai": "4.3.11",
"chai": "4.3.10"
}
Expand Down
6 changes: 3 additions & 3 deletions how-to/automation-testing/register-with-store-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"devDependencies": {
"@openfin/automation-cli": "^1.1.11",
"@openfin/automation-helpers": "^1.1.11",
"@openfin/automation-native": "^1.1.11",
"@openfin/automation-cli": "^1.2.0",
"@openfin/automation-helpers": "^1.2.0",
"@openfin/automation-native": "^1.2.0",
"chai": "4.3.10"
}
}
4 changes: 2 additions & 2 deletions how-to/automation-testing/selenium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"devDependencies": {
"@openfin/automation-helpers": "^1.1.11",
"@openfin/automation-native": "^1.1.11",
"@openfin/automation-helpers": "^1.2.0",
"@openfin/automation-native": "^1.2.0",
"chai": "4.3.10",
"chromedriver": "116.0.0",
"fkill": "7.2.1",
Expand Down
14 changes: 7 additions & 7 deletions how-to/automation-testing/wdio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"kill": "fkill -f -s OpenFin.exe OpenFinRVM.exe chromedriver.exe OpenFin OpenFinRVM chromedriver"
},
"devDependencies": {
"@openfin/automation-helpers": "^1.1.11",
"@openfin/automation-native": "^1.1.11",
"@wdio/cli": "8.23.3",
"@wdio/local-runner": "8.23.3",
"@wdio/mocha-framework": "8.23.1",
"@wdio/shared-store-service": "8.23.3",
"@wdio/spec-reporter": "8.23.1",
"@openfin/automation-helpers": "^1.2.0",
"@openfin/automation-native": "^1.2.0",
"@wdio/cli": "8.24.6",
"@wdio/local-runner": "8.24.6",
"@wdio/mocha-framework": "8.24.6",
"@wdio/shared-store-service": "8.24.6",
"@wdio/spec-reporter": "8.24.2",
"chai": "4.3.10",
"chromedriver": "116.0.0",
"fkill": "7.2.1",
Expand Down
2 changes: 1 addition & 1 deletion how-to/customize-home-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"devDependencies": {
"@openfin/core": "33.77.11",
"@openfin/node-adapter": "33.77.11",
"@types/luxon": "^3.3.4",
"@types/luxon": "^3.3.6",
"@types/node-emoji": "^1.8.2",
"eslint": "8.54.0",
"eslint-config-airbnb": "19.0.4",
Expand Down
2 changes: 1 addition & 1 deletion how-to/integrate-with-ms365-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"dependencies": {
"@microsoft/microsoft-graph-types": "^2.38.0",
"@microsoft/microsoft-graph-types": "^2.40.0",
"@openfin/microsoft365": "1.0.1",
"@openfin/workspace": "16.0.6",
"@openfin/workspace-platform": "16.0.6"
Expand Down
2 changes: 1 addition & 1 deletion how-to/integrate-with-ms365/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"license": "SEE LICENSE IN LICENSE.MD",
"dependencies": {
"@finos/fdc3": "^2.0.3",
"@microsoft/microsoft-graph-types": "^2.38.0",
"@microsoft/microsoft-graph-types": "^2.40.0",
"@openfin/microsoft365": "1.0.1",
"@openfin/workspace": "16.0.6",
"@openfin/workspace-platform": "16.0.6",
Expand Down
3 changes: 2 additions & 1 deletion how-to/workspace-platform-starter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
- Improved platform now starts correctly when no customSettings are provided in manifest
- Fixed dock shows correct workspace buttons to match those configured when restoring from saved config
- InitOptions handlers now have the calling context passed to them, so they know if they were called from `launch` or already `running`
- Added unit testing script `npm run unit-test` tests can be found in ./test folder, for more information see [How to Test Your Platform](./docs/how-to-test-your-platform-code.md)
- Added unit testing script `npm run test` tests can be found in ./test folder, for more information see [How to Test Your Platform Code](./docs/how-to-test-your-platform-code.md)
- Added e2e testing script `npm run e2e` tests can be found in ./e2e folder, for more information see [How to Test Your Platform UI](./docs/how-to-test-your-platform-ui.md)

## v15

Expand Down
1 change: 1 addition & 0 deletions how-to/workspace-platform-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ The information below provides information related to configuring and using the
| [Deploy Your Platform](./docs/how-to-deploy-your-platform.md) | How can you deploy your platform? |
| [Manage Environments](./docs/how-to-manage-environments.md) | How would you support local, dev, uat, staging, pre-prod and prod environments for your platform? |
| [Testing Your Platform Code](./docs/how-to-test-your-platform-code.md) | How would you test the code for your platform? |
| [Testing Your Platform UI](./docs/how-to-test-your-platform-ui.md) | How would you test the UI for your platform? |

### Read more about [working with Workspace](https://developers.openfin.co/of-docs/docs/overview-of-workspace) on the OpenFin Website
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions how-to/workspace-platform-starter/docs/how-to-test-your-ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
> **_:information_source: OpenFin Workspace:_** [OpenFin Workspace](https://www.openfin.co/workspace/) is a commercial product and this repo is for evaluation purposes (See [LICENSE.MD](../LICENSE.MD)). Use of the OpenFin Container and OpenFin Workspace components is only granted pursuant to a license from OpenFin (see [manifest](../public/manifest.fin.json)). Please [**contact us**](https://www.openfin.co/workspace/poc/) if you would like to request a developer evaluation key or to discuss a production license.
[<- Back to Table Of Contents](../README.md)

# How To Test Your UI

Testing your OpenFin platform UI can be achieved using the OpenFin Automation tools.

For more information on the OpenFin automation tools see the following packages.

- [@openfin/automation-cli](https://www.npmjs.com/package/@openfin/automation-cli)
- [@openfin/automation-helpers](https://www.npmjs.com/package/@openfin/automation-helpers)

There is an npm command which will execute the included e2e tests.

```shell
npm run e2e
```

You must first make sure the local web server is serving the manifest for the application using the `npm run start` script.

The tests are executed using Jest as the test runner, the example tests are in the [../e2e](../e2e/) folder.

Example output from running the tests using the npm command:

![How to Test in Shell](./assets/e2e-test-shell.png)

[<- Back to Table Of Contents](../README.md)
Loading

0 comments on commit 8730544

Please sign in to comment.