Add browser extension sg cli support (#27276)

* Add 'sg test bext|bext-integration|bext-e2e' to run corresponding tests
* Add 'sg run bext' to start bext in dev mode
This commit is contained in:
Erzhan Torokulov 2021-11-10 12:26:15 +03:00 committed by GitHub
parent 3baea32880
commit f1ccea5a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

View File

@ -127,10 +127,13 @@ Click reload for Sourcegraph at `about:debugging`
## Testing
- Unit tests: `yarn test`
- E2E tests: `yarn test-e2e`
- Unit tests: `sg test bext`
- Integration tests: `sg test bext-integration`
- E2E tests:
- `EXTENSION_PERMISSIONS_ALL_URLS=true yarn --cwd client/browser build`
- `sg test bext-e2e`
### e2e tests
### E2E tests
The test suite in `end-to-end/github.test.ts` runs on the release branch `bext/release` in both Chrome and Firefox against a Sourcegraph Docker instance.

View File

@ -708,6 +708,10 @@ commands:
debug-env:
cmd: env
bext:
cmd: yarn --cwd client/browser dev
install: yarn
checks:
docker:
cmd: docker version
@ -973,6 +977,18 @@ tests:
cmd: yarn test-integration
install: ENTERPRISE=1 yarn build-web
bext:
cmd: yarn --cwd client/browser test
bext-integration:
cmd: yarn --cwd client/browser test-integration
bext-e2e:
cmd: yarn run download-puppeteer-browser && yarn --cwd client/browser mocha ./src/end-to-end/github.test.ts ./src/end-to-end/gitlab.test.ts
env:
SOURCEGRAPH_BASE_URL: https://sourcegraph.com
PERCY_BROWSER_EXECUTABLE: node_modules/puppeteer/.local-chromium/linux-901812/chrome-linux/chrome
frontend:
cmd: yarn run jest --testPathIgnorePatterns end-to-end regression integration storybook