Skip to content

Commit 4824fa9

Browse files
committed
December Dependency Updates
1 parent 0676e78 commit 4824fa9

File tree

17 files changed

+965
-620
lines changed

17 files changed

+965
-620
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Use Node.js
2727
uses: actions/setup-node@v1
2828
with:
29-
node-version: 14
29+
node-version: 18
3030
- name: Install App Dependencies
3131
run: yarn --frozen-lockfile
3232
- name: Build App

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Use Node.js
2828
uses: actions/setup-node@v1
2929
with:
30-
node-version: 14
30+
node-version: 18
3131
- name: Install App Dependencies
3232
run: yarn --frozen-lockfile
3333
- name: Build App

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.18.1
1+
18.12.1

chromeExtension/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ Key components of the React app are listed below.
2626
1. Clone this repository
2727
2. Open the repository in Visual Studio Code
2828
3. `cd` to `chromeExtensions`
29-
4. Run `yarn install`
30-
5. Run `yarn dev` after making changes
31-
6. Load the extension, unpacked, into Chrome:
29+
4. Copy `.env.example` to `.env`
30+
5. Run `yarn install`
31+
6. Run `yarn dev` after making changes
32+
7. Load the extension, unpacked, into Chrome:
3233
- Open Chrome
3334
- Navigate to `chrome://extensions/`
3435
- Toggle on `Developer mode`

chromeExtension/package.json

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gotdibbs-toolbox",
3-
"version": "2022.4.1",
3+
"version": "2022.12.1",
44
"description": "Admin tools for Dynamics 365/CRM",
55
"main": "index.js",
66
"scripts": {
@@ -12,28 +12,26 @@
1212
"license": "MIT",
1313
"private": "true",
1414
"devDependencies": {
15-
"@babel/core": "^7.17.5",
15+
"@babel/core": "^7.20.5",
1616
"@babel/preset-env": "^7.16.11",
1717
"@babel/preset-react": "^7.16.7",
18-
"babel-loader": "^8.2.3",
18+
"babel-loader": "^9.1.0",
1919
"classnames": "^2.3.1",
20-
"copy-webpack-plugin": "^7.0.0",
20+
"copy-webpack-plugin": "^11.0.0",
2121
"core-js": "^3.21.1",
2222
"crx": "^5.0.1",
23-
"css-loader": "^5.0.1",
23+
"css-loader": "^6.7.2",
2424
"dotenv": "^16.0.0",
2525
"eslint": "^7.17.0",
2626
"eslint-config-defaults": "^9.0.0",
27-
"eslint-loader": "^4.0.2",
2827
"eslint-plugin-babel": "^5.3.1",
29-
"eslint-plugin-react": "^7.20.5",
30-
"extract-css-chunks-webpack-plugin": "^4.7.5",
28+
"eslint-plugin-react": "^7.31.11",
29+
"extract-css-chunks-webpack-plugin": "^4.9.0",
3130
"react-hook-form": "^6.14.1",
32-
"react-json-view": "^1.19.1",
33-
"style-loader": "^2.0.0",
34-
"sumo-logger": "^2.6.1",
31+
"react-json-view": "^1.21.3",
32+
"sumo-logger": "^2.8.1",
3533
"url-loader": "^4.1.0",
36-
"webpack": "^5.70.0",
34+
"webpack": "5.75.0",
3735
"webpack-cli": "^4.9.2",
3836
"zip-webpack-plugin": "^4.0.1"
3937
},
@@ -42,5 +40,14 @@
4240
"fathom-client": "^3.0.0",
4341
"react": "^16.13.1",
4442
"react-dom": "^16.13.1"
43+
},
44+
"resolutions": {
45+
"async": "^2.6.4",
46+
"cross-fetch": "^3.1.5",
47+
"loader-utils": "^2.0.4",
48+
"minimatch": "^3.0.5",
49+
"minimist": "^1.2.6",
50+
"node-fetch": "^2.6.7",
51+
"terser-webpack-plugin": "^5.1.4"
4552
}
4653
}

chromeExtension/public/honeybadger.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chromeExtension/tests/integration/config/wdio.conf-local.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ exports.config = {
2121
],
2222
// Uncomment the below to specify a specific feature file to run
2323
// specs: [
24-
// './features/toolbox.feature'
24+
// './features/navigation.feature'
2525
// ]
2626
};

chromeExtension/tests/integration/config/wdio.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ exports.config = {
256256
.replace('.feature', '');
257257

258258
let fileName = [
259-
(new Date()).toLocaleDateString(), ' - ',
259+
(new Date()).toLocaleDateString(),
260+
' - ',
260261
['ERROR', browser.requestedCapabilities.browserName, browser.capabilities.browserVersion, featureName].join('_'),
261262
'.png'
262263
].join('').replace(/(\/|\\)/g, '-');

chromeExtension/tests/integration/features/quickActions.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Feature: Quick Actions
22

33
Background: Starting from the info pane on a record
44

5-
Given I am on the info pane
6-
And I am viewing a record
5+
Given I am viewing a record
6+
And I am on the info pane
77

88
Scenario: Toggle Schema Names
99

chromeExtension/tests/integration/features/step-definitions/steps.js

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,36 @@ function capitalize(str) {
1414
}
1515

1616
async function loadNewRecord() {
17-
let isSuccess = await browser.execute(logicalName => {
17+
let errorMessage = await browser.execute(logicalName => {
1818
try {
1919
Xrm.Utility.openEntityForm(logicalName);
20-
return true;
20+
return;
21+
}
22+
catch (e) {
23+
return e?.message;
2124
}
22-
catch {}
2325
}, RECORD_LOGICAL_NAME);
2426

25-
if (!isSuccess) {
26-
// Backup, but noisy to the `info` logs as toolkit needs to be re-injected
27-
await browser.url(`/main.aspx?pagetype=entityrecord&etn=${RECORD_LOGICAL_NAME}`);
27+
if (errorMessage) {
28+
throw new Error(`Could not load record via Xrm APIs: "${errorMessage}"`);
2829
}
2930

3031
await Panes.Dynamics.FormHeader.waitForDisplayed();
3132
}
3233

3334
async function loadRecord() {
34-
let isSuccess = await browser.execute((logicalName, id) => {
35+
let errorMessage = await browser.execute((logicalName, id) => {
3536
try {
3637
Xrm.Utility.openEntityForm(logicalName, id);
37-
return true;
38+
return;
39+
}
40+
catch (e) {
41+
return e?.message;
3842
}
39-
catch {}
4043
}, RECORD_LOGICAL_NAME, RECORD_ID);
4144

42-
if (!isSuccess) {
43-
// Backup, but noisy to the `info` logs as toolkit needs to be re-injected
44-
await browser.url(`/main.aspx?pagetype=entityrecord&etn=${RECORD_LOGICAL_NAME}&id=${RECORD_ID}`);
45+
if (errorMessage) {
46+
throw new Error(`Could not load record via Xrm APIs: "${errorMessage}"`);
4547
}
4648

4749
await Panes.Dynamics.FormHeader.waitForDisplayed();
@@ -53,17 +55,6 @@ async function loadPane(pane, isViewingRecord) {
5355
}
5456

5557
await Panes[capitalize(pane)].open();
56-
57-
if (!isViewingRecord) {
58-
return;
59-
}
60-
61-
if (/new/i.test(isViewingRecord)) {
62-
await loadNewRecord();
63-
}
64-
else {
65-
await loadRecord();
66-
}
6758
}
6859

6960
Given(/i am on the (\w+) pane( and viewing a record| and viewing a new record)?/i, loadPane);
@@ -325,20 +316,20 @@ Then(/a new window should open to show the (.+) (editor|list|page)$/i, async (co
325316
});
326317

327318
// Copied from webdriver.io source, but modified to handle nulls
328-
async function switchWindow(urlOrTitleToMatch) {
319+
async function switchWindow(urlOrTitleToMatch, currentWindowId) {
329320
if (typeof urlOrTitleToMatch !== 'string' && !(urlOrTitleToMatch instanceof RegExp)) {
330321
throw new Error('Unsupported parameter for switchWindow, required is "string" or an RegExp');
331322
}
332323

333324
const tabs = await browser.getWindowHandles();
334325

335-
for (const tab of tabs) {
336-
await browser.switchToWindow(tab)
326+
for (const tab of tabs.filter(t => t !== currentWindowId)) {
327+
await browser.switchToWindow(tab);
337328

338329
/**
339330
* check if url matches
340331
*/
341-
await browser.waitUntil(() => browser.getUrl());
332+
await browser.waitUntil(async () => await browser.getUrl());
342333
const url = await browser.getUrl();
343334
if (url.match(urlOrTitleToMatch)) {
344335
return tab;
@@ -347,7 +338,7 @@ async function switchWindow(urlOrTitleToMatch) {
347338
/**
348339
* check title
349340
*/
350-
await browser.waitUntil(() => browser.getTitle());
341+
await browser.waitUntil(async () => await browser.getTitle());
351342
const title = await browser.getTitle();
352343
if (title.match(urlOrTitleToMatch)) {
353344
return tab;
@@ -369,7 +360,7 @@ Then(/a new window should open with "(.+)" in the (title|url)$/i, async (title,
369360
// The title will be 'Microsoft Dynamics 365' until the page loads, so it is
370361
// safe to wait for that title to transition, but then we need to wait for the
371362
// the actual title to be present to pass the vibe check
372-
await switchWindow(new RegExp(`(${title})|(^Microsoft Dynamics 365)`, 'i'));
363+
await switchWindow(new RegExp(`(${title})|(Microsoft Dynamics 365)`, 'i'), currentWindow);
373364
await browser.waitUntil(async () => {
374365
const title = await browser.getTitle();
375366

0 commit comments

Comments
 (0)