Skip to content

Commit 0f121fa

Browse files
authored
feat: allow custom nvda install directory (#26)
1 parent bddc5e8 commit 0f121fa

18 files changed

+564
-102
lines changed

.github/CODEOWNERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @cmorten

.github/CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing to this repository
2+
3+
First of all, thanks for taking the time to read this document and contributing to our codebase!
4+
5+
## Getting started
6+
7+
If you're working on an existing issue then awesome! Let us know by dropping a comment in the issue.
8+
9+
If it's a new bug fix or feature that you would like to contribute, then please raise an issue so it can be tracked (and to help out others who are experiencing the same issue / want the new thing know that it's being looked at!). Be sure to check for existing issues before raising your own!
10+
11+
## Working on your feature
12+
13+
### Branching
14+
15+
On this project we follow mainline development (or trunk based development), and our default branch is `main`.
16+
17+
Therefore you need to branch from `main` and merge into `main`.
18+
19+
### Coding style
20+
21+
Generally try to match the style and conventions of the code around your changes. Ultimately we want code that is clear, concise, consistent and easy to read.
22+
23+
We use `eslint` and `prettier` for linting. You can check and correct the code style using the following commands:
24+
25+
```console
26+
# Check linting
27+
yarn lint
28+
29+
# Fix linting
30+
yarn lint:fix
31+
```
32+
33+
## Opening a PR
34+
35+
Once you're confident your branch is ready to review, open a PR against `main` on this repo.
36+
37+
Please use the PR template as a guide, but if your change doesn't quite fit it, feel free to customize.
38+
39+
## Merging and publishing
40+
41+
When your feature branch / PR has been tested and has an approval, it is then ready to merge. Please contact a maintainer to action the merge.

.github/ISSUE_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Issue
2+
3+
Setup:
4+
5+
- NPM version: <replace_with_npm_version (try `npm --version`)>
6+
- OS Platform: <replace_with_os_platform>
7+
- OS Release: <replace_with_os_release_version>
8+
9+
## Details
10+
11+
> Please replace this quote block with the details of the feature / bug you wish to be addressed. If it is a bug please do your best to add steps to reproduce.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Issue
2+
3+
Fixes #<issue_number>.
4+
5+
## Details
6+
7+
> Please replace this quote block with a brief summary of PR purpose and code changes.
8+
9+
## CheckList
10+
11+
- [ ] Has been tested (where required).

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,22 @@ jobs:
2727
name: artifacts
2828
path: |
2929
**/recordings/**/*
30+
test-nvda-install-dir:
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
os: [windows-2019, windows-2022]
35+
steps:
36+
- uses: actions/checkout@v3
37+
- uses: actions/setup-node@v3
38+
with:
39+
node-version: 18
40+
- run: yarn install --frozen-lockfile
41+
- run: yarn ci:nvda-install-dir
42+
- run: Get-ChildItem $env:USERPROFILE\nvda
43+
- uses: actions/upload-artifact@v3
44+
if: always()
45+
with:
46+
name: artifacts
47+
path: |
48+
**/recordings/**/*

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
<[email protected]>. All complaints will be reviewed and investigated promptly
64+
and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
<https://www.contributor-covenant.org/faq>. Translations are available at
128+
<https://www.contributor-covenant.org/translations>.

README.md

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
<h1 align="center">Guidepup Setup</h1>
2-
<p align="center">
3-
<i>Setup your environment for screen reader test automation.</i>
4-
</p>
5-
<p align="center">
6-
<a href="https://www.npmjs.com/package/@guidepup/setup"><img alt="Guidepup Setup available on NPM" src="https://img.shields.io/npm/v/@guidepup/setup" /></a>
7-
<a href="https://www.npmjs.com/package/@guidepup/setup"><img alt="Guidepup available on NPM" src="https://img.shields.io/npm/dt/@guidepup/setup"></a>
8-
<a href="https://github.com/guidepup/setup/actions/workflows/test.yml"><img alt="Guidepup Setup test workflows" src="https://github.com/guidepup/setup/workflows/Test/badge.svg" /></a>
9-
<a href="https://github.com/guidepup/setup/blob/main/LICENSE"><img alt="Guidepup Setup uses the MIT license" src="https://img.shields.io/github/license/guidepup/setup" /></a>
10-
</p>
1+
# Guidepup Setup
2+
3+
<a href="https://www.npmjs.com/package/@guidepup/setup"><img alt="Guidepup Setup available on NPM" src="https://img.shields.io/npm/v/@guidepup/setup" /></a>
4+
<a href="https://github.com/guidepup/setup/actions/workflows/test.yml"><img alt="Guidepup Setup test workflows" src="https://github.com/guidepup/setup/workflows/Test/badge.svg" /></a>
5+
<a href="https://github.com/guidepup/setup/blob/main/LICENSE"><img alt="Guidepup Setup uses the MIT license" src="https://img.shields.io/github/license/guidepup/setup" /></a>
6+
7+
## [Documentation](https://www.guidepup.dev/docs/guides/automated-environment-setup)
8+
9+
[![MacOS Big Sur Support](https://img.shields.io/badge/macos-Big_Sur-blue.svg?logo=apple)](https://apps.apple.com/id/app/macos-big-sur/id1526878132)
10+
[![MacOS Monetary Support](https://img.shields.io/badge/macos-Monetary-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-monterey/id1576738294)
11+
[![MacOS Ventura Support](https://img.shields.io/badge/macos-Ventura-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-ventura/id1638787999)
12+
[![Windows 10 Support](https://img.shields.io/badge/windows-10-blue.svg?logo=windows10)](https://www.microsoft.com/en-gb/software-download/windows10ISO)
13+
[![Windows Server 2019 Support](https://img.shields.io/badge/windows_server-2019-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019)
14+
[![Windows Server 2022 Support](https://img.shields.io/badge/windows_server-2022-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022)
15+
16+
This package sets up your environment for screen reader automation.
17+
18+
It enables automation for <a href="https://www.guidepup.dev/docs/api/class-voiceover"><b>VoiceOver on MacOS</b></a> and <a href="https://www.guidepup.dev/docs/api/class-nvda"><b>NVDA on Windows</b></a>.
1119

1220
## Getting Started
1321

@@ -17,17 +25,11 @@ Run this command:
1725
npx @guidepup/setup
1826
```
1927

20-
And get cracking with your screen reader test automation code!
28+
And get cracking with your screen reader automation code!
2129

2230
## Usage
2331

24-
If you are running this command locally, you might find it prompts you to pass in credentials so that it can using UI automation to change a checkbox value which enables the automation of VoiceOver. If you are uncomfortable with providing your credentials you can manually achieve these steps by following the [manual VoiceOver setup documentation](https://www.guidepup.dev/docs/guides/manual-voiceover-setup).
25-
26-
If you are running this command in CI/CD, it is recommended to add the `--ci` flag to prevent interactive prompts:
27-
28-
```console
29-
npx @guidepup/setup --ci
30-
```
32+
### GitHub Actions
3133

3234
If you are using GitHub Actions, check out the dedicated [`guidepup/setup-action`](https://github.com/marketplace/actions/guidepup-setup):
3335

@@ -36,21 +38,35 @@ If you are using GitHub Actions, check out the dedicated [`guidepup/setup-action
3638
uses: guidepup/setup-action
3739
```
3840
41+
### MacOS
42+
43+
If you are running this command locally, you might find it prompts you to pass in credentials so that it can using UI automation to change a checkbox value which enables the automation of VoiceOver. If you are uncomfortable with providing your credentials you can manually achieve these steps by following the [manual VoiceOver setup documentation](https://www.guidepup.dev/docs/guides/manual-voiceover-setup).
44+
45+
If you are running this command in CI/CD, it is recommended to add the `--ci` flag to prevent interactive prompts:
46+
47+
```console
48+
npx @guidepup/setup --ci
49+
```
50+
3951
If you are encountering errors in CI for MacOS you can pass a `--record` flag to the command which will output a screen-recording of the setup to a `./recordings/` directory:
4052

4153
```console
4254
npx @guidepup/setup --ci --record
4355
```
4456

45-
Check out the [Documentation Website](https://www.guidepup.dev/docs/guides/environment) for more information.
57+
### Windows
4658

47-
## Windows
48-
49-
### NVDA Installation
59+
#### NVDA Installation
5060

5161
When running on windows a portable NVDA instance compatible with Guidepup will be installed to a temporary directory. The location of this installation directory is stored in the Windows registry under the key `HKCU\Software\Guidepup\Nvda`.
5262

53-
### Foreground Timeout Lock
63+
If you want to specify the directory that NVDA is installed to you can pass a `--nvda-install-dir` flag to the command:
64+
65+
```console
66+
npx @guidepup/setup --nvda-install-dir <NVDA_INSTALLATION_DIRECTORY>
67+
```
68+
69+
#### Foreground Timeout Lock
5470

5571
Modern versions of Windows have a setting which prevents new application instances launching in front of other applications in quick succession, requiring over 3 minutes between activations before it will actually show the window - in the interim it launches the window minimized.
5672

@@ -63,18 +79,18 @@ To mitigate this the setup script updates two keys in the Windows registry under
6379

6480
Both of these are set to `0` by the setup script.
6581

66-
## See Also
82+
## Powerful Tooling
6783

6884
Check out some of the other Guidepup modules:
6985

70-
- [`@guidepup/guidepup`](https://github.com/guidepup/guidepup/)
71-
- [`@guidepup/playwright`](https://github.com/guidepup/guidepup-playwright/)
72-
73-
## Support
74-
75-
- VoiceOver on MacOS
76-
- NVDA on Windows
86+
- [`@guidepup/guidepup`](https://github.com/guidepup/guidepup/) - Reliable automation for your screen reader a11y workflows through JavaScript supporting VoiceOver and NVDA.
87+
- [`@guidepup/playwright`](https://github.com/guidepup/guidepup-playwright/) - Seemless integration of Guidepup with Playwright.
88+
- [`@guidepup/virtual-screen-reader`](https://github.com/guidepup/virtual-screen-reader/) - Reliable unit testing for your screen reader a11y workflows.
89+
- [`@guidepup/jest`](https://github.com/guidepup/jest/) - Jest matchers for reliable unit testing of your screen reader a11y workflows.
7790

78-
## License
91+
## Resources
7992

80-
[MIT](https://github.com/guidepup/setup/blob/main/LICENSE)
93+
- [Documentation](https://www.guidepup.dev/docs/guides/automated-environment-setup)
94+
- [Contributing](.github/CONTRIBUTING.md)
95+
- [Changelog](https://github.com/guidepup/setup/releases)
96+
- [MIT License](https://github.com/guidepup/setup/blob/main/LICENSE)

SECURITY.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Security Policies and Procedures
2+
3+
This document outlines security procedures and general policies for the Guidepup
4+
project.
5+
6+
- [Reporting a Bug](#reporting-a-bug)
7+
- [Disclosure Policy](#disclosure-policy)
8+
- [Comments on this Policy](#comments-on-this-policy)
9+
10+
## Reporting a Bug
11+
12+
The Guidepup maintainers and community take all security bugs in Guidepup seriously.
13+
Thank you for improving the security of Guidepup. We appreciate your efforts and
14+
responsible disclosure and will make every effort to acknowledge your
15+
contributions.
16+
17+
Report security bugs by emailing the lead maintainer in the
18+
[CODEOWNERS](.github/CODEOWNERS.md) file.
19+
20+
The lead maintainer will acknowledge your email, and will send a response
21+
indicating the next steps in handling your report. After the initial reply
22+
to your report, the maintainer team will endeavor to keep you informed of the
23+
progress towards a fix and full announcement, and may ask for additional
24+
information or guidance.
25+
26+
Report security bugs in third-party modules to the person or team maintaining
27+
the module.
28+
29+
## Disclosure Policy
30+
31+
When the maintainer team receives a security bug report, they will assign it to a
32+
primary handler. This person will coordinate the fix and release process,
33+
involving the following steps:
34+
35+
- Confirm the problem and determine the affected versions.
36+
- Audit code to find any potential similar problems.
37+
- Prepare fixes for all releases still under maintenance. These fixes will be
38+
released as fast as possible to GitHub.
39+
40+
## Comments on this Policy
41+
42+
If you have suggestions on how this process could be improved please submit a
43+
pull request.

0 commit comments

Comments
 (0)