yarn install
yarn build
We use Cloudflare pages for hosting the app.
Local development powered by Create React App with local proxy middleware, that proxies requests to httpbin API.
Static data is stored in the build
directory, CF pages functions are in the functions
directory.
To launch functions in the dev mode run:
wrangler pages dev build
If you want to update public directory in the watch mode run:
yarn build:watch
While making any tests data changes, run yarn build:static
to rebuild public static data needed for autotesting.
- Install dependencies:
yarn install
- Add to the
/etc/hosts
next line:127.0.0.1 local.testcases.agrd.dev
- Create
cert
directory if there is no one in the repository root:mkdir cert
- Install
mkcert
- Create locally-trusted development certificate:
# Install root certificate mkcert -install # Create certificate for the domain mkcert -key-file cert/key.pem -cert-file cert/cert.pem local.testcases.agrd.dev
- Build static content:
yarn build
- Run the local server:
yarn serve
The app will be available on https://local.testcases.agrd.dev:4000/
Please note, that AdGuard for Mac does not filter localhost connections by default!.
If you are using Windows, you can run the app locally with the following steps:
- Install dependencies:
yarn install
- Add to the
C:\Windows\System32\drivers\etc\hosts
next line:127.0.0.1 local.testcases.agrd.dev
- Create
cert
directory if there is no one in the repository root:mkdir cert
- Install
mkcert
(or you can built it frommkcert
sources by issuinggo build
command which producesmkcert.exe
file, but it requiresgo
installed) - Create locally-trusted development certificate:
# Install root certificate mkcert -install # Create certificate for the domain mkcert -key-file cert/key.pem -cert-file cert/cert.pem local.testcases.agrd.dev
- Build static content:
yarn build
- Run the local server:
yarn serve
Note 1: if you want to uninstall the root certificate, you can use
mkcert -uninstall
command.
Note 2: it is not recommended to run the app on WSL2, because its an OS withing an OS, which means two different hosts files, two certificate store, etc. Its better to use it on Windows directly.
The main data file is ./src/testsData.js
- Copy rules functionality doesn't work in FF and Safari:
document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.