-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AXON-32] (WIP) Use of RedHat UI testing framework vscode-extension-t…
…ester * Simple working example * clean up mocha config, add dependency to package.json * clean tsconfig. Change test to a positive verificaiton. Note: I saw some flakes here * Reduce flakes. Don't get the y/n question * [AXON-32] compiling typescript tests manually * ts test work * lint * normal test should ignore ui-tests
- Loading branch information
1 parent
2d20902
commit a749c41
Showing
8 changed files
with
3,458 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,6 @@ TEMP-* | |
.yalc | ||
yalc.lock | ||
.env | ||
coverage | ||
coverage | ||
.test-extensions/ | ||
generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// increase default test case timeout to 5 seconds | ||
module.exports = { | ||
"timeout": 5000, | ||
// For further investigation | ||
// "extension": ["ts"], | ||
// "exit": true, | ||
// "require": ["ts-node/register"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// import the webdriver and the high level browser wrapper | ||
import { assert } from 'chai'; | ||
import { before, VSBrowser, WebDriver } from 'vscode-extension-tester'; | ||
|
||
// Create a Mocha suite | ||
describe('My Test Suite', () => { | ||
let browser: VSBrowser; | ||
let driver: WebDriver; | ||
|
||
// initialize the browser and webdriver | ||
before(async () => { | ||
browser = VSBrowser.instance; | ||
driver = browser.driver; | ||
}); | ||
|
||
// test whatever we want using webdriver, here we are just checking the page title | ||
it('My Test Case', async () => { | ||
const title = await driver.getTitle(); | ||
assert.isTrue(title === 'Getting Started' || title === 'Walkthrough: Setup VS Code'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "generated/ui-test", | ||
"module": "CommonJS", | ||
"target": "es6", | ||
"lib": ["esnext", "dom"], | ||
"skipDefaultLibCheck": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"allowJs": true, | ||
"jsx": "react", | ||
"moduleResolution": "node", | ||
"rootDir": "src/ui-test", | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"ignoreDeprecations": "5.0", | ||
"noUnusedLocals": true, | ||
"typeRoots": ["node_modules/@types", "src/typings/"] | ||
}, | ||
"include": ["src/ui-test/**/*"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"typescript.updateImportsOnFileMove.enabled": "always", | ||
"workbench.editor.enablePreview": true, | ||
"git.autoRepositoryDetection": false, | ||
"terminal.integrated.sendKeybindingsToShell": true, | ||
"workbench.remoteIndicator.showExtensionRecommendations": false, | ||
"extensions.ignoreRecommendations": true | ||
} |