forked from microsoft/accessibility-insights-web
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge with master #18
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* wire up button * use stateful component instead of hooks * lint fix
#### Description of changes This PR sets unified up to bundle Accessibility Insights for Android Service via the new `accessibility-insights-for-android-service-bin` NPM package. It does this by: * Updating `Gruntfile.js` with a new unified-specific copy step based on the new NPM wrapper to include the APK and notice file in a specific known location in the unified drop * Adding a new `AndroidServiceApkLocator` that encapsulates knowledge of that specific known location, intended for use in the `install-service` state machine step via a state machine dep * Since you can't use `__dirname` from within an electron renderer process, and the recommended alternative (electron's `app.getAppPath()`) is only invokable from the main process, hooks up IPC machinery to enable the `AndroidServiceApkLocator` to invoke `getAppPath` via the main process * `electron-builder` bundles the app contents into a single `.asar` archive by default, but that's not very helpful for bundling the APK since we need it as its own file to send to ADB. Updates `electron-builder` config to bundle it as an "extra resource" instead, which gets installed as-is outside of the `.asar` archive. Since this involves build machinery, besides the unit tests, I've manually validated that it works end to end in both dev and release builds by performing the following steps: 1. Adding the following code to the end of `renderer-initializer.ts`: ```ts const androidServiceApkLocator = new AndroidServiceApkLocator(ipcRendererShim.getAppPath); androidServiceApkLocator.locateBundledApk() .then(info => console.log(`locateBundledApk: ${info.path} v${info.versionName}`)) .catch(error => console.error(`locateBundledApk: ${error}`)); ``` 2. `yarn build:unified; yarn start:unified:dev` 3. Observing the following text in the dev console: `locateBundledApk: C:\repos\accessibility-insights-web\drop\electron\unified-dev\product\android-service\android-service.apk v1.2.0` 4. Verifying that the `C:\repos\accessibility-insights-web\drop\electron\unified-dev\product\android-service\android-service.apk` file exists with the expected content 5. `yarn build:unified:all` 6. `& '.\drop\electron\unified-production\packed\Accessibility Insights for Android setup.exe'` 7. `npx cross-env DEV_MODE=true "C:\Users\dbjor\AppData\Local\Programs\Accessibility Insights for Android\Accessibility Insights for Android.exe"` 8. Observing the following text in the dev console: `locateBundledApk: C:\Users\dbjor\AppData\Local\Programs\Accessibility Insights for Android\resources\android-service\android-service.apk v1.2.0` 9. Verifying that the `C:\Users\dbjor\AppData\Local\Programs\Accessibility Insights for Android\resources\android-service\android-service.apk` file exists with the expected content #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] Addresses an existing issue: 1724328 - [x] Ran `yarn fastpass` - [x] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage` - [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`. - [n/a] (UI changes only) Added screenshots/GIFs to description above - [n/a] (UI changes only) Verified usability with NVDA/JAWS
* added the spinner to the detect-adb-step ui * added a standalone scss file for android-setup styling. simplified detect-adb-step to just return the spinner and not call a method
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.