Installation • Local Usage • Documentation • Known Issues
UI tests Utils for Camel tooling is a package built on ExTester. It provides more specific functions, wait conditions, sets of features and others for UI testing of Camel Tooling extensions for Visual Studio Code.
Install vscode-uitests-tooling into your extension devDependencies:
npm install --save-dev vscode-uitests-tooling@latest
These are necessary steps for local contribution and writing tests with vscode-uitests-tooling package.
-
Inside
vscode-uitests-tooling
project execute prepared script, which includes all necessary stepsnpm run dev
-
Only for the first time - inside project where you are writing tests, you need to link local version of
vscode-uitests-tooling
packagenpm link vscode-uitests-tooling
Example how to use this library in daily work in some project where you want to write UI tests with usage of vscode-extension-tester
testing framework and vscode-uitests-tooling
utils package.
-
Git clone
vscode-uitests-tooling
on same dir level as your projectgit clone https://github.com/djelinek/vscode-uitests-tooling.git
-
Inside tests use only
import { XYZ } from 'vscode-uitests-tooling'
package to import all page-objects includingvscode-extension-tester
ones -
To easily build made utils changes and run tests in one step you can use
npm --prefix ../vscode-uitests-tooling run dev && npm run ui-test
In this version we are trying to simplify whole process of maintaining utils in one place and writing tests in another. To enable this approach we are now re-exporting whole vscode-extension-tester
API which means this dependency is not required to be installed in destination where the tests are written because it will be provided as transitive dependency.
It also means that vscode-extension-tester
version upgrades can be done only in one place and it will be propagated to all dependant proejcts.
To use vscode-uitests-tooling
package in version 3.0.0 you need to change just few easy things and other should stay same.
-
Remove
ExTester
devDependencynpm uninstall vscode-extension-tester
-
Install
UI tests Utils for Camel Tooling
package in version 3.0.0npm install -D [email protected]
-
Replace all
vscode-extension-tester
imports byvscode-uitests-tooling
-
Run tests!
Did you found some bug? Are you missing some feature? Please feel free to open new Issue or Create PR to our GitHub repository.