545e421423
Github action CI workflows added for webdriver tests.
I've also refactored the `./scripts/e2e-*` scripts. These scripts were
somewhat unique compared to the other scripts. They are now more inline
with the other scripts in that directory and run via
```
% yarn e2e --help
Usage: yarn e2e <command> [options]
Commands:
yarn e2e serve start test server
yarn e2e test:ci [env] runner for CI (github-actions)
yarn e2e test:local run webdriver tests locally
yarn e2e test:browserstack run webdriver tests on browserstack
yarn e2e selenium:grid start selenium grid (test linux)
Options:
--help Show help [boolean]
--version Show version number [boolean]
```
I've also added an experimental linux runner see
2cca4ddb77/e2e/README.md (L320-L333)
### Change Type
- [x] `tests` — Changes to any testing-related code only (will not
publish a new version)
### Release Notes
- Github action CI workflows added for webdriver tests
- Refactored e2e test runner
14 lines
394 B
TypeScript
14 lines
394 B
TypeScript
import { promiseSpawn } from './util'
|
|
|
|
export default async function testLocal({ os, browser }: { os: string; browser: string[] }) {
|
|
const command = `yarn`
|
|
const args = [`workspace`, `@tldraw/e2e`, `test:local`]
|
|
return promiseSpawn(command, args, {
|
|
env: {
|
|
...process.env,
|
|
BROWSERS: browser.join(','),
|
|
OS: os,
|
|
},
|
|
stdio: [0, 0, 0], // Use parent's [stdin, stdout, stderr]
|
|
})
|
|
}
|