From 42c692df946c9e65d39b768c5c7a9b4ac4420c74 Mon Sep 17 00:00:00 2001 From: Josef Kopriva Date: Mon, 13 Apr 2020 10:52:19 +0200 Subject: [PATCH] ContentAssist integration test(+ test framework update) (Fixes #225) Signed-off-by: Josef Kopriva --- package-lock.json | 233 +++++++++++++----- package.json | 2 +- .../vscodeUiTest/suite/contentAssistTest.ts | 105 ++++++++ 3 files changed, 273 insertions(+), 67 deletions(-) create mode 100644 src/test/vscodeUiTest/suite/contentAssistTest.ts diff --git a/package-lock.json b/package-lock.json index 68ce1884..a7fb7b1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,9 +69,9 @@ } }, "@nut-tree/nut-js": { - "version": "1.3.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/@nut-tree/nut-js/-/nut-js-1.3.1.tgz", - "integrity": "sha512-JvT308xTeygoYK1y7QJiuOqCG77wt/d29MRyCeJC4AkfAK2aaZKiWNyUxX6puLVCCkqJpDOS1zCQIYNIyoCT0w==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@nut-tree/nut-js/-/nut-js-1.3.2.tgz", + "integrity": "sha512-3ivf7SyHsrOtowrUUCvGCS4DwGVlidqkOefk/se1tX8rLnHFMs/se58aoMrfSiAW3yNGAthIRgcoBsFRDfPyZQ==", "dev": true, "requires": { "@nut-tree/libnut": "1.0.2", @@ -91,6 +91,90 @@ } } }, + "@nut-tree/opencv-build-darwin": { + "version": "4.1.1-5", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/@nut-tree/opencv-build-darwin/-/opencv-build-darwin-4.1.1-5.tgz", + "integrity": "sha512-GOiHi9EwE6HVSFeqeB+6UCG6O3O4SiCxrFJss7KLOQ3NNrMsDOJIlHWg/ypY4GSgzRRb3CtO2n+IdxerJw46CA==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "@types/bluebird": { "version": "3.5.29", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/@types/bluebird/-/bluebird-3.5.29.tgz", @@ -169,9 +253,9 @@ } }, "@types/selenium-webdriver": { - "version": "3.0.16", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz", - "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.17.tgz", + "integrity": "sha512-tGomyEuzSC1H28y2zlW6XPCaDaXFaD6soTdb4GNdmte2qfHtrKqhy0ZFs4r/1hpazCfEZqeTSRLvSasmEx89uw==", "dev": true }, "@types/semver": { @@ -939,9 +1023,9 @@ }, "dependencies": { "buffer": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", - "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -1389,13 +1473,22 @@ } }, "clipboardy": { - "version": "2.1.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/clipboardy/-/clipboardy-2.1.0.tgz", - "integrity": "sha512-2pzOUxWcLlXWtn+Jd6js3o12TysNOOVes/aQfg+MT/35vrxWzedHlLwyoJpXjsFKWm95BTNEcMGD9+a7mKzZkQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz", + "integrity": "sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==", "dev": true, "requires": { "arch": "^2.1.1", - "execa": "^1.0.0" + "execa": "^1.0.0", + "is-wsl": "^2.1.1" + }, + "dependencies": { + "is-wsl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz", + "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==", + "dev": true + } } }, "cliui": { @@ -1729,9 +1822,9 @@ "dev": true }, "compare-versions": { - "version": "3.5.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", - "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", "dev": true }, "component-emitter": { @@ -2096,12 +2189,6 @@ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true }, - "didyoumean": { - "version": "1.2.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz", - "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", - "dev": true - }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", @@ -3110,7 +3197,7 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minipass": { @@ -3143,7 +3230,7 @@ "dependencies": { "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true, "optional": true @@ -3301,7 +3388,7 @@ "dependencies": { "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true, "optional": true @@ -3963,9 +4050,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.5.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz", - "integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4412,7 +4499,7 @@ "dependencies": { "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } @@ -4438,9 +4525,9 @@ } }, "jszip": { - "version": "3.2.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", - "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.4.0.tgz", + "integrity": "sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==", "dev": true, "requires": { "lie": "~3.3.0", @@ -4504,6 +4591,12 @@ "flush-write-stream": "^1.0.2" } }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, "lie": { "version": "3.3.0", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/lie/-/lie-3.3.0.tgz", @@ -4701,16 +4794,24 @@ } }, "markdown-it": { - "version": "8.4.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", "dev": true, "requires": { "argparse": "^1.0.7", - "entities": "~1.1.1", + "entities": "~2.0.0", "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + } } }, "matchdep": { @@ -4799,9 +4900,8 @@ } }, "merge-deep": { - "version": "3.0.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/merge-deep/-/merge-deep-3.0.2.tgz", - "integrity": "sha512-T7qC8kg4Zoti1cFd8Cr0M+qaZfOwjlPDEdZIIPPB2JZctjaPM4fX+i7HOId69tAti2fvO6X5ldfYUONDODsrkA==", + "version": "github:jrichter1/merge-deep#9ffe23b32f281de41bce111e8c38294d96fed34e", + "from": "github:jrichter1/merge-deep#functions", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -4877,9 +4977,9 @@ "dev": true }, "mimic-response": { - "version": "2.0.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/mimic-response/-/mimic-response-2.0.0.tgz", - "integrity": "sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "dev": true }, "minimalistic-assert": { @@ -4904,7 +5004,7 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, @@ -4995,7 +5095,7 @@ "dependencies": { "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } @@ -5274,9 +5374,9 @@ } }, "napi-build-utils": { - "version": "1.0.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", - "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, "native-node-utils": { @@ -5307,9 +5407,9 @@ "dev": true }, "node-abi": { - "version": "2.13.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/node-abi/-/node-abi-2.13.0.tgz", - "integrity": "sha512-9HrZGFVTR5SOu3PZAnAY2hLO36aW1wmA+FDsVkr85BTST32TLCA1H/AEcatVRAsWLyXS3bqUDYCAjq5/QGuSTA==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.16.0.tgz", + "integrity": "sha512-+sa0XNlWDA6T+bDLmkCUYn6W5k5W6BPRL6mqzSCs6H/xUgtl4D5x2fORKDzopKiU6wsyn/+wXlRXwXeSp+mtoA==", "dev": true, "requires": { "semver": "^5.4.1" @@ -5587,6 +5687,7 @@ "integrity": "sha512-bdnSv+q1ng1oZAZZhLNsc7kNrYcS3abrna66nuwMu8ybodd0mQsb0EQJvXfrZz0VWmgyKb1Wo7/V2TUCl6tD1g==", "dev": true, "requires": { + "@nut-tree/opencv-build-darwin": "^4.1.1-5", "@types/node": ">6", "nan": "^2.14.0", "native-node-utils": "^0.2.7", @@ -6108,7 +6209,7 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, @@ -6283,7 +6384,7 @@ "dependencies": { "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } @@ -8119,9 +8220,9 @@ } }, "vsce": { - "version": "1.73.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vsce/-/vsce-1.73.0.tgz", - "integrity": "sha512-6W37Ebbkj3uF3WhT+SCfRtsneRQEFcGvf/XYz+b6OAgDCj4gPurWyDVrqw/HLsbP1WflGIyUfVZ8t5M7kQp6Uw==", + "version": "1.75.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.75.0.tgz", + "integrity": "sha512-qyAQTmolxKWc9bV1z0yBTSH4WEIWhDueBJMKB0GUFD6lM4MiaU1zJ9BtzekUORZu094YeNSKz0RmVVuxfqPq0g==", "dev": true, "requires": { "azure-devops-node-api": "^7.2.0", @@ -8129,10 +8230,10 @@ "cheerio": "^1.0.0-rc.1", "commander": "^2.8.1", "denodeify": "^1.2.1", - "didyoumean": "^1.2.1", "glob": "^7.0.6", - "lodash": "^4.17.10", - "markdown-it": "^8.3.1", + "leven": "^3.1.0", + "lodash": "^4.17.15", + "markdown-it": "^10.0.0", "mime": "^1.3.4", "minimatch": "^3.0.3", "osenv": "^0.1.3", @@ -8164,20 +8265,20 @@ } }, "vscode-extension-tester": { - "version": "2.3.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vscode-extension-tester/-/vscode-extension-tester-2.3.0.tgz", - "integrity": "sha512-4IAT1jDL9CJmJtXfdW9KDD8Zwiav8mGbUOy2lAMCaGaehgwYpSXw75HxfvVB6ugSQaB8Qm1OtewMxJCLQyPVcg==", + "version": "2.6.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vscode-extension-tester/-/vscode-extension-tester-2.6.2.tgz", + "integrity": "sha512-ETDjJ/RWTWPtiwQ8SMwfw29262Ecko8A6SRBl+HjAOYEX50nTiMBTeuggMU0eKGvAqm15e3nqHbSH5/0Vj5+MQ==", "dev": true, "requires": { "@nut-tree/nut-js": "^1.3.1", "@types/selenium-webdriver": "^3.0.15", "clipboardy": "^2.0.0", - "commander": "^3.0.1", + "commander": "^5.0.0", "compare-versions": "^3.5.1", "fs-extra": "^8.1.0", "glob": "^7.1.6", "js-yaml": "^3.13.1", - "merge-deep": "^3.0.2", + "merge-deep": "github:jrichter1/merge-deep#functions", "node-key-sender": "^1.0.11", "request": "^2.88.0", "selenium-webdriver": "^3.0.0", @@ -8188,9 +8289,9 @@ }, "dependencies": { "commander": { - "version": "3.0.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, "fs-extra": { diff --git a/package.json b/package.json index bbaea806..9629b7c2 100644 --- a/package.json +++ b/package.json @@ -362,7 +362,7 @@ "tslint": "^5.20.1", "typescript": "^3.7.2", "typescript-tslint-plugin": "^0.3.1", - "vscode-extension-tester": "^2.3.0", + "vscode-extension-tester": "^2.6.2", "vscode-test": "^1.2.3", "webpack": "^4.32.2", "webpack-cli": "^3.3.2", diff --git a/src/test/vscodeUiTest/suite/contentAssistTest.ts b/src/test/vscodeUiTest/suite/contentAssistTest.ts new file mode 100644 index 00000000..ad3c3bb6 --- /dev/null +++ b/src/test/vscodeUiTest/suite/contentAssistTest.ts @@ -0,0 +1,105 @@ +/** + * Copyright 2020 Red Hat, Inc. and others. + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as _ from 'lodash'; +import * as fs from 'fs-extra'; +import * as path from 'path'; + +import { InputBox, VSBrowser, Workbench, WebDriver, WebElement, By, Key, ContentAssist, EditorView, TextEditor } from 'vscode-extension-tester'; +import { ProjectGenerationWizard, QuickPickItemInfo } from '../ProjectGenerationWizard'; +import { expect, use } from 'chai'; + +use(require('chai-fs')); + +/** + * This file contains tests for the ContentAssist in application.properties + */ +describe('Content Assist tests', async () => { + let driver: WebDriver; + let assist: ContentAssist; + let editor: TextEditor; + const tempDir: string = path.join(__dirname, 'temp'); + + before(async () => { + driver = VSBrowser.instance.driver; + fs.removeSync(tempDir); + fs.mkdirSync(tempDir); + + }); + + after(async () => { + fs.removeSync(tempDir); + }); + + /** + * Tests if the project generation wizard correctly creates a new + * Quarkus Maven project with some extensions added + */ + it('Generate maven project and if content assist works in application.properties', async function() { + this.timeout(60000); + + const projectDestDir: string = path.join(tempDir, 'maven'); + const projectFolderName: string = 'quarkus-maven'; + + fs.mkdirSync(projectDestDir); + + expect(await ProjectGenerationWizard.generateProject(driver, { + buildTool: 'Maven', + artifactId: projectFolderName, + extensions: ['Camel Core', 'Eclipse Vert.x'], + dest: projectDestDir + })).to.be.true; + + const pathToProperties: string = path.join(projectDestDir, projectFolderName, 'src' , 'main', 'resources', 'application.properties'); + await new Workbench().executeCommand('extest open file'); + const input = await InputBox.create(); + await input.setText(path.resolve(pathToProperties)); + await input.confirm(); + + editor = new TextEditor(new EditorView(), 'application.properties'); + assist = await editor.toggleContentAssist(true) as ContentAssist; + + it('getItems retrieves the suggestions', async function() { + this.timeout(5000); + const items = await assist.getItems(); + expect(items).not.empty; + }); + + it('ContentAssist retrieves correct suggestions', async function() { + this.timeout(15000); + await editor.setTextAtLine(3, 'quarkus.'); + const assist = await editor.toggleContentAssist(true) as ContentAssist; + expect(await assist.isDisplayed()).is.true; + const item = await assist.getItem('quarkus.'); + expect(await item.getLabel()).equals('quarkus.'); + + await editor.toggleContentAssist(false); + }); + + await (new Workbench).executeCommand('Close Workspace'); + return new Promise(res => setTimeout(res, 5000)); + }); +}); + +async function wizardExists(): Promise { + const input: InputBox = new InputBox(); + try { + const enclosing: WebElement = input.getEnclosingElement(); + const title: WebElement = await enclosing.findElement(By.className('quick-input-title')); + return (await title.getText()).includes('Quarkus Tools'); + } catch (e) { + return false; + } +} \ No newline at end of file