Skip to content

Commit 3d98e49

Browse files
datho7561rgrunber
authored andcommitted
Use the extensions from ./test-resources/extensions during UI tests
Also: - skip compiling the code when running from the command line, since `extest` does this for us - use the `-i` flag in the call to `extest`, which installs the dependencies of the extension - make more timeout changes to the git import test suite to try to stabilize the suite Fixes #2919 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 868509c commit 3d98e49

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.vscode/launch.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@
8989
"${workspaceFolder}/test/ui/settings.json",
9090
"-m",
9191
"--mocha_config",
92-
"${workspaceFolder}/test/ui/.mocharc.js"
92+
"${workspaceFolder}/test/ui/.mocharc.js",
93+
"-e",
94+
"./test-resources/extensions",
95+
"-i"
9396
],
9497
"outFiles": [
9598
"${workspaceFolder}/out/**/*.js"
@@ -114,7 +117,9 @@
114117
"${workspaceFolder}/test/ui/settings.json",
115118
"-m",
116119
"--mocha_config",
117-
"${workspaceFolder}/test/ui/.mocharc.js"
120+
"${workspaceFolder}/test/ui/.mocharc.js",
121+
"-e",
122+
"./test-resources/extensions"
118123
],
119124
"outFiles": [
120125
"${workspaceFolder}/out/**/*.js"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
"update-deps": "ncu --upgrade --loglevel verbose --packageFile package.json && npm update",
6868
"coverage:upload": "codecov -f coverage/coverage-final.json",
6969
"build": "npm run clean && npm run lint && npm run compile && npm run bundle-tools",
70-
"smoke-test": "npm run compile && extest setup-and-run out/test/ui/smoke-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -c max",
71-
"public-ui-test": "npm run compile && extest setup-and-run out/test/ui/public-ui-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -c max"
70+
"smoke-test": "extest setup-and-run out/test/ui/smoke-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -e ./test-resources/extensions -c max -i",
71+
"public-ui-test": "extest setup-and-run out/test/ui/public-ui-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -e ./test-resources/extensions -c max -i"
7272
},
7373
"dependencies": {
7474
"@kubernetes/client-node": "^0.16.1",

test/ui/public-ui-test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { checkFocusOnCommands } from './suite/focusOn';
1010
import { testImportFromGit } from './suite/import-from-git';
1111
import { checkOpenshiftView } from './suite/openshift';
1212

13+
require('source-map-support').install();
14+
1315
describe('Extension public-facing UI tests', function() {
1416
checkExtension();
1517
checkOpenshiftView();

test/ui/suite/import-from-git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export function testImportFromGit() {
1717

1818
before(async function () {
1919
this.timeout(20000);
20-
const view: SideBarView = await (await new ActivityBar().getViewControl(VIEWS.openshift)).openView();
21-
editorView = (new Workbench().getEditorView());
20+
const view: SideBarView = await (await (await new ActivityBar().wait(5_000)).getViewControl(VIEWS.openshift)).openView();
21+
editorView = await ((await new Workbench().wait(5_000)).getEditorView().wait(5_000));
2222
await new Promise(res => setTimeout(res, 5000));
2323
await (await new Workbench().openNotificationsCenter()).clearAllNotifications();
2424

0 commit comments

Comments
 (0)