Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rakeshsh committed Sep 23, 2024
2 parents 688d374 + 14d8e58 commit 72ad1ed
Show file tree
Hide file tree
Showing 25 changed files with 854 additions and 350 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04
env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 }
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
shard-index: [1, 2]

steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
steps:
# This only needs to be present so codecov can use the source tree for some post-processing
# This job doesn't require that we install dependencies
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand All @@ -111,7 +111,7 @@ jobs:
runs-on: ubuntu-20.04
env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 }
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
codeql:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: github/codeql-action/init@v3
Expand All @@ -161,14 +161,14 @@ jobs:
name: e2e-web-tests (${{ matrix.shard-index }}/${{ strategy.job-total }})
runs-on: ubuntu-20.04
# We need to update this each time we update playwright
container: mcr.microsoft.com/playwright:v1.45.1-focal
container: mcr.microsoft.com/playwright:v1.45.3-focal
strategy:
fail-fast: false
matrix:
shard-index: [1, 2]

steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
runs-on: ubuntu-20.04
env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 }
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- uses: actions/setup-node@v4
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
check-clearly-defined:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected].6
- uses: actions/[email protected].7
timeout-minutes: 2

- name: Check ClearlyDefined for dependabot PR's
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# reference: https://stackoverflow.com/a/51683309/3711475
# reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker

FROM mcr.microsoft.com/playwright:v1.45.1-focal AS setup
FROM mcr.microsoft.com/playwright:v1.45.3-focal AS setup

USER root

Expand Down
2 changes: 1 addition & 1 deletion deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"grunt": "^1.6.1",
"grunt-cli": "^1.3.1",
"grunt-cli": "^1.5.0",
"grunt-contrib-compress": "^2.0.0",
"grunt-webstore-upload": "^0.9.23"
},
Expand Down
50 changes: 30 additions & 20 deletions deploy/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"

braces@^3.0.1, braces@^3.0.2:
braces@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
Expand Down Expand Up @@ -339,7 +339,18 @@ graceful-fs@^4.2.0:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==

grunt-cli@^1.3.1, grunt-cli@~1.4.3:
grunt-cli@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.5.0.tgz#24fa92225946b2002c535c7583a003e15203876f"
integrity sha512-rILKAFoU0dzlf22SUfDtq2R1fosChXXlJM5j7wI6uoW8gwmXDXzbUvirlKZSYCdXl3LXFbR+8xyS+WFo+b6vlA==
dependencies:
grunt-known-options "~2.0.0"
interpret "~1.1.0"
liftup "~3.0.1"
nopt "~5.0.0"
v8flags "^4.0.1"

grunt-cli@~1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.4.3.tgz#22c9f1a3d2780bf9b0d206e832e40f8f499175ff"
integrity sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==
Expand Down Expand Up @@ -647,20 +658,12 @@ map-cache@^0.2.0:
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=

micromatch@^4.0.2:
version "4.0.4"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
dependencies:
braces "^3.0.1"
picomatch "^2.2.3"

micromatch@^4.0.4:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies:
braces "^3.0.2"
braces "^3.0.3"
picomatch "^2.3.1"

minimatch@^3.0.4, minimatch@^3.0.5, minimatch@~3.0.4:
Expand Down Expand Up @@ -690,6 +693,13 @@ nopt@~4.0.1:
abbrev "1"
osenv "^0.1.4"

nopt@~5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==
dependencies:
abbrev "1"

normalize-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
Expand Down Expand Up @@ -788,11 +798,6 @@ path-root@^0.1.1:
dependencies:
path-root-regex "^0.1.0"

picomatch@^2.2.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==

picomatch@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
Expand Down Expand Up @@ -957,6 +962,11 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=

v8flags@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-4.0.1.tgz#98fe6c4308317c5f394d85a435eb192490f7e132"
integrity sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==

v8flags@~3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656"
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@
"@esbuild-plugins/node-resolve": "^0.2.2",
"@swc/core": "^1.3.107",
"@swc/jest": "^0.2.36",
"@testing-library/dom": "^10.3.1",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.5",
"@testing-library/react": "^16.0.0",
"@types/chrome": "0.0.260",
"@types/jest": "^29.5.11",
"@types/jsdom": "^21.1.6",
Expand All @@ -105,7 +106,7 @@
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.4",
"eslint-plugin-security": "^1.7.1",
"express": "^4.19.2",
"extract-zip": "^2.0.1",
Expand All @@ -125,12 +126,12 @@
"jest-environment-jsdom": "^29.7.0",
"jest-junit": "^16.0.0",
"js-yaml": "^4.1.0",
"jscodeshift": "^0.15.2",
"jscodeshift": "^0.16.1",
"license-check-and-add": "^4.0.5",
"mini-css-extract-plugin": "2.9.0",
"npm-run-all": "^4.1.5",
"playwright": "^1.45.1",
"postcss": "^8.4.35",
"playwright": "^1.45.3",
"postcss": "^8.4.41",
"postcss-modules": "^6.0.0",
"prettier": "^3.2.5",
"regenerator-runtime": "^0.14.1",
Expand Down Expand Up @@ -159,7 +160,7 @@
"classnames": "^2.5.1",
"idb-keyval": "^6.2.1",
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"luxon": "^3.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^2.0.5",
Expand All @@ -168,7 +169,7 @@
"tabbable": "^6.2.0",
"ua-parser-js": "^1.0.37",
"uuid": "^9.0.1",
"webextension-polyfill": "^0.10.0"
"webextension-polyfill": "^0.12.0"
},
"resolutions": {
"@types/node": "^16.11.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"axe-core": "4.9.1",
"classnames": "^2.5.1",
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"luxon": "^3.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"axe-core": "4.9.1",
"classnames": "^2.5.1",
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"luxon": "^3.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^2.0.5",
Expand Down
34 changes: 18 additions & 16 deletions src/DetailsView/components/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ export class IssuesTable extends React.Component<IssuesTableProps> {
super(props);
}

componentDidMount(): void {
const cardCount = this.getCardCount();
const assessment = this.props.getProvider().forType(this.props.selectedVisualizationType);
const requirement = assessment?.requirements[0].key;
if (!this.props.issuesEnabled && cardCount > 0) {
this.props.deps.detailsViewActionMessageCreator.enableFastPassVisualHelperWithoutScan(
this.props.selectedVisualizationType,
requirement,
);
}
if (!this.props.issuesEnabled && cardCount === 0) {
this.props.deps.detailsViewActionMessageCreator.rescanVisualizationWithoutTelemetry(
this.props.selectedVisualizationType,
requirement,
);
}
}

public render(): JSX.Element {
return (
<div className={styles.issuesTable}>
Expand Down Expand Up @@ -109,22 +127,6 @@ export class IssuesTable extends React.Component<IssuesTableProps> {
}

private renderComponent(): JSX.Element {
const cardCount = this.getCardCount();
const assessment = this.props.getProvider().forType(this.props.selectedVisualizationType);
const requirement = assessment?.requirements[0].key;
if (!this.props.issuesEnabled && cardCount > 0) {
this.props.deps.detailsViewActionMessageCreator.enableFastPassVisualHelperWithoutScan(
this.props.selectedVisualizationType,
requirement,
);
}
if (!this.props.issuesEnabled && cardCount === 0) {
this.props.deps.detailsViewActionMessageCreator.rescanVisualizationWithoutTelemetry(
this.props.selectedVisualizationType,
requirement,
);
}

if (this.props.scanning) {
return this.renderSpinner('Scanning...');
}
Expand Down
10 changes: 10 additions & 0 deletions src/background/actions/action-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,16 @@ export class ActionCreator {
this.executingScope,
);
}
switch (payload.test) {
case VisualizationType.Issues:
await this.cardSelectionActions.toggleVisualHelper.invoke(null);
break;
case VisualizationType.NeedsReview:
await this.needsReviewCardSelectionActions.toggleVisualHelper.invoke(null);
break;
default:
break;
}
};

private onRescanVisualization = async (payload: RescanVisualizationPayload) => {
Expand Down
10 changes: 9 additions & 1 deletion src/background/actions/card-selection-action-creator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { VisualizationActions } from 'background/actions/visualization-actions';
import { StoreNames } from 'common/stores/store-names';

import * as TelemetryEvents from '../../common/extension-telemetry-events';
Expand All @@ -11,12 +12,14 @@ import {
BaseActionPayload,
CardSelectionPayload,
RuleExpandCollapsePayload,
VisualizationTogglePayload,
} from './action-payloads';

export class CardSelectionActionCreator {
constructor(
private readonly interpreter: Interpreter,
private readonly cardSelectionActions: CardSelectionActions,
private readonly visualizationActions: VisualizationActions,
private readonly telemetryEventHandler: TelemetryEventHandler,
) {}

Expand Down Expand Up @@ -67,8 +70,13 @@ export class CardSelectionActionCreator {
);
};

private onToggleVisualHelper = async (payload: BaseActionPayload): Promise<void> => {
private onToggleVisualHelper = async (payload: VisualizationTogglePayload): Promise<void> => {
await this.cardSelectionActions.toggleVisualHelper.invoke(null);
if (payload.enabled) {
await this.visualizationActions.disableVisualization.invoke(payload.test);
} else {
await this.visualizationActions.enableVisualization.invoke(payload);
}
this.telemetryEventHandler.publishTelemetry(TelemetryEvents.VISUAL_HELPER_TOGGLED, payload);
};

Expand Down
Loading

0 comments on commit 72ad1ed

Please sign in to comment.