Skip to content

Commit

Permalink
Merge pull request #12 from gemini-testing/TESTPLANE-265.do_not_activ…
Browse files Browse the repository at this point in the history
…ate_by_default

fix: do not activate extension if config is not found
  • Loading branch information
DudaGod authored Oct 7, 2024
2 parents 0589939 + 22fab0a commit fd3b789
Show file tree
Hide file tree
Showing 29 changed files with 14,862 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
os: [macos-latest]
node-version: [20.x]
vscodeVersion:
- stable
- 1.93.0

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_modules
.DS_Store
vscode.d.ts
.eslintcache
samples/**/.*
samples/**/.testplane
.wdio*
.tmp
tests/e2e/**/screens-on-fail
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ Adds a keybinding (`cmd+shift+8` for mac and `ctrl+shift+8` for others) to run a
[testplane]: https://testplane.io/
[testplane-repl-mode]: https://github.com/gemini-testing/testplane/blob/master/docs/cli.md#repl-mode
[vscode-keyboard-shortcuts]: https://code.visualstudio.com/docs/getstarted/keybindings

## Configuration

You can configure Testplane using [user and workspace settings](https://code.visualstudio.com/docs/getstarted/settings#_workspace-settings). Available settings:

- `testplane.configPath`: The path to the Testplane [configuration file](https://testplane.io/docs/v8/config/main/).
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
"name": "Testplane"
}
]
},
"configuration": {
"title": "Testplane",
"properties": {
"testplane.configPath": {
"markdownDescription": "The path to the Testplane [configuration file](https://testplane.io/docs/v8/config/main/)",
"type": "string",
"scope": "window"
}
}
}
},
"repository": {
Expand All @@ -50,9 +60,11 @@
"build": "tsup --minify --clean",
"watch": "tsup --watch --sourcemap",
"test": "npm run lint && npm run test-e2e",
"test-e2e": "npm run test-e2e:basic && npm run test-e2e:settings-view",
"test-e2e": "npm run test-e2e:basic && npm run test-e2e:settings-view && npm run test-e2e:vscode-settings && npm run test-e2e:empty",
"test-e2e:basic": "wdio run ./tests/e2e/basic/wdio.conf.ts",
"test-e2e:settings-view": "wdio run ./tests/e2e/settings-view/wdio.conf.ts",
"test-e2e:vscode-settings": "wdio run ./tests/e2e/vscode-settings/wdio.conf.ts",
"test-e2e:empty": "wdio run ./tests/e2e/empty/wdio.conf.ts",
"eslint": "eslint src --ext ts --cache",
"lint": "eslint --cache . && prettier --check .",
"reformat": "eslint --fix . && prettier --write .",
Expand Down
12 changes: 12 additions & 0 deletions samples/empty/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "empty",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
3 changes: 3 additions & 0 deletions samples/vscode-settings/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"testplane.configPath": "./another-config/testplane.config.ts"
}
27 changes: 27 additions & 0 deletions samples/vscode-settings/another-config/testplane.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export default {
gridUrl: "http://localhost:4444/wd/hub",
baseUrl: "http://localhost",
pageLoadTimeout: 0,
httpTimeout: 60000,
testTimeout: 90000,
resetCursor: false,
takeScreenshotOnFails: {
testFail: false,
assertViewFail: false,
},
sets: {
desktop: {
files: ["tests/**/*.testplane.ts"],
browsers: ["another-bro"],
},
},
browsers: {
"another-bro": {
automationProtocol: "devtools",
headless: true,
desiredCapabilities: {
browserName: "another-bro",
},
},
},
};
Loading

0 comments on commit fd3b789

Please sign in to comment.