diff --git a/package-lock.json b/package-lock.json index a4f49835..22850421 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://repository.engineering.redhat.com/nexus/repository/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", @@ -169,9 +169,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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.17.tgz", + "integrity": "sha512-tGomyEuzSC1H28y2zlW6XPCaDaXFaD6soTdb4GNdmte2qfHtrKqhy0ZFs4r/1hpazCfEZqeTSRLvSasmEx89uw==", "dev": true }, "@types/semver": { @@ -510,9 +510,9 @@ "dev": true }, "arch": { - "version": "2.1.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", + "version": "2.1.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/arch/-/arch-2.1.2.tgz", + "integrity": "sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==", "dev": true }, "archy": { @@ -928,43 +928,13 @@ } }, "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "version": "1.2.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "dev": true, "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "buffer": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", - "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "readable-stream": { - "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", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" } }, "bluebird": { @@ -1389,13 +1359,25 @@ } }, "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://repository.engineering.redhat.com/nexus/repository/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.2.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + } } }, "cliui": { @@ -1637,6 +1619,12 @@ "ansi-regex": "^2.0.0" } }, + "url-join": { + "version": "0.0.1", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/url-join/-/url-join-0.0.1.tgz", + "integrity": "sha1-HbSK1CLTQCRpqH99l73r/k+x48g=", + "dev": true + }, "y18n": { "version": "3.2.1", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", @@ -1729,9 +1717,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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", "dev": true }, "component-emitter": { @@ -2096,12 +2084,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 +3092,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 +3125,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 +3283,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 +3945,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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4191,6 +4173,12 @@ } } }, + "is-docker": { + "version": "2.0.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz", + "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==", + "dev": true + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -4412,7 +4400,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 +4426,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.5.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", + "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", "dev": true, "requires": { "lie": "~3.3.0", @@ -4504,6 +4492,12 @@ "flush-write-stream": "^1.0.2" } }, + "leven": { + "version": "3.1.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/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 +4695,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://repository.engineering.redhat.com/nexus/repository/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.3", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + } } }, "matchdep": { @@ -4799,9 +4801,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 +4878,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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "dev": true }, "minimalistic-assert": { @@ -4904,7 +4905,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,16 +4996,16 @@ "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 } } }, "mkdirp-classic": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.2.tgz", - "integrity": "sha512-ejdnDQcR75gwknmMw/tx02AuRs8jCtqFoFqDZMjiNxsu85sRIJVXDKHuLYvUUPRBUtV2FpSZa9bL1BUa3BdR2g==", + "version": "0.5.3", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "mocha": { @@ -5216,6 +5217,38 @@ "normalize-path": "^2.1.1" } }, + "monaco-page-objects": { + "version": "1.1.1", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/monaco-page-objects/-/monaco-page-objects-1.1.1.tgz", + "integrity": "sha512-yAhamkx0GpCeGI91FgvHeIUZaefLtJfdWTAIfoNUQYXz+wiD7F/ANpOJMV9Kp0ki4Vx8n6SfPB9zpFZ725Q6FQ==", + "dev": true, + "requires": { + "clipboardy": "^2.0.0", + "compare-versions": "^3.5.1", + "fs-extra": "^8.1.0", + "merge-deep": "github:jrichter1/merge-deep#functions", + "ts-essentials": "^3.0.5" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -5274,9 +5307,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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, "native-node-utils": { @@ -5307,18 +5340,18 @@ "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.18.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", + "integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", "dev": true, "requires": { "semver": "^5.4.1" } }, "node-addon-api": { - "version": "1.7.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.1.tgz", - "integrity": "sha512-2+DuKodWvwRTrCfKOeR24KIc5unKjOh8mz17NCzVnHWfjAdDqbfbjqh7gUT+BkXBRQM52+xCHciKWonJ3CbJMQ==", + "version": "1.7.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", "dev": true }, "node-environment-flags": { @@ -5331,12 +5364,6 @@ "semver": "^5.7.0" } }, - "node-key-sender": { - "version": "1.0.11", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/node-key-sender/-/node-key-sender-1.0.11.tgz", - "integrity": "sha512-vv2IXd8QdZBFYXaIy02uy2rK6EKj+tOTEuoTxJKS9l8zw8Cz6DeLffR8ompj7N2A3h6XK7aiy+YAcTaeOqwp2Q==", - "dev": true - }, "node-libs-browser": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", @@ -6043,15 +6070,15 @@ "dev": true }, "prebuild-install": { - "version": "5.3.3", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", - "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", + "version": "5.3.5", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.5.tgz", + "integrity": "sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw==", "dev": true, "requires": { "detect-libc": "^1.0.3", "expand-template": "^2.0.3", "github-from-package": "0.0.0", - "minimist": "^1.2.0", + "minimist": "^1.2.3", "mkdirp": "^0.5.1", "napi-build-utils": "^1.0.1", "node-abi": "^2.7.0", @@ -6081,6 +6108,46 @@ "readable-stream": "^2.0.6" } }, + "bl": { + "version": "4.0.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/bl/-/bl-4.0.2.tgz", + "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "buffer": { + "version": "5.6.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/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", + "ieee754": "^1.1.4" + } + }, "gauge": { "version": "2.7.4", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -6106,12 +6173,6 @@ "number-is-nan": "^1.0.0" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "npmlog": { "version": "4.1.2", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -6143,6 +6204,44 @@ "requires": { "ansi-regex": "^2.0.0" } + }, + "tar-fs": { + "version": "2.1.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", + "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "tar-stream": { + "version": "2.1.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", + "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "dev": true, + "requires": { + "bl": "^4.0.1", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } } } }, @@ -6279,14 +6378,6 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } } }, "read": { @@ -7237,43 +7328,44 @@ } }, "tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "version": "1.16.3", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", "dev": true, "requires": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "pump": { + "version": "1.0.3", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } } } }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "targz": { "version": "1.0.1", "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/targz/-/targz-1.0.1.tgz", @@ -7281,55 +7373,6 @@ "dev": true, "requires": { "tar-fs": "^1.8.1" - }, - "dependencies": { - "bl": { - "version": "1.2.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "pump": { - "version": "1.0.3", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "tar-fs": { - "version": "1.16.3", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", - "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", - "dev": true, - "requires": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" - } - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - } } }, "terser": { @@ -7983,9 +8026,9 @@ } }, "url-join": { - "version": "0.0.1", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/url-join/-/url-join-0.0.1.tgz", - "integrity": "sha1-HbSK1CLTQCRpqH99l73r/k+x48g=", + "version": "1.1.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", + "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=", "dev": true }, "use": { @@ -8119,9 +8162,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.77.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vsce/-/vsce-1.77.0.tgz", + "integrity": "sha512-8vOTCI3jGmOm0JJFu/BMAbqxpaSuka4S3hV9E6K5aWBUsDM1SGFExkIxHblnsI8sls43xP61DHorYT+K0F+GFA==", "dev": true, "requires": { "azure-devops-node-api": "^7.2.0", @@ -8129,10 +8172,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", @@ -8154,43 +8197,34 @@ "requires": { "os-tmpdir": "~1.0.1" } - }, - "url-join": { - "version": "1.1.0", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", - "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=", - "dev": true } } }, "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": "3.0.2", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vscode-extension-tester/-/vscode-extension-tester-3.0.2.tgz", + "integrity": "sha512-IzH6Fc9K/LpqPhvAJjlxm0aoJQ9fNRjXxsPUqXaNTl8ygK0dmM8G+WKGn3DoCVj1GuISySXNEs7M4Z4H3A/iBQ==", "dev": true, "requires": { - "@nut-tree/nut-js": "^1.3.1", "@types/selenium-webdriver": "^3.0.15", - "clipboardy": "^2.0.0", - "commander": "^3.0.1", - "compare-versions": "^3.5.1", + "commander": "^5.0.0", + "compare-versions": "^3.6.0", "fs-extra": "^8.1.0", "glob": "^7.1.6", "js-yaml": "^3.13.1", - "merge-deep": "^3.0.2", - "node-key-sender": "^1.0.11", + "monaco-page-objects": "^1.0.0-0", "request": "^2.88.0", "selenium-webdriver": "^3.0.0", "targz": "^1.0.1", - "ts-essentials": "^3.0.5", "unzip-stream": "^0.3.0", - "vsce": "^1.71.0" + "vsce": "^1.71.0", + "vscode-extension-tester-locators": "^1.44.0" }, "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://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, "fs-extra": { @@ -8219,9 +8253,45 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.4", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "vscode-extension-tester-locators": { + "version": "1.46.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vscode-extension-tester-locators/-/vscode-extension-tester-locators-1.46.0.tgz", + "integrity": "sha512-HiPZIfkoZUZ94+q/vFUydQCDGkxxQ0txZvHx+C3Rt3ZOUnhJoF4PK8wSUOENqsjKVUR4MmPKhWXGxXTwk8thvw==", + "dev": true + }, + "vscode-extension-tester-native": { + "version": "3.0.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/vscode-extension-tester-native/-/vscode-extension-tester-native-3.0.0.tgz", + "integrity": "sha512-lpmEeudGVfet0DOVX5OjDTIp8gDxKneTliwOPiJgw2HgaK96lHCzopmwb5Bk2yGU6+LY66Pyk2UkitTcKBaoHA==", + "dev": true, + "requires": { + "@nut-tree/nut-js": "1.3.2", + "clipboardy": "^2.0.0", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true } } diff --git a/package.json b/package.json index 8582e167..77fabade 100644 --- a/package.json +++ b/package.json @@ -362,7 +362,8 @@ "tslint": "^5.20.1", "typescript": "^3.7.2", "typescript-tslint-plugin": "^0.3.1", - "vscode-extension-tester": "^2.3.0", + "vscode-extension-tester": "^3.0.1", + "vscode-extension-tester-native": "^3.0.0", "vscode-test": "^1.2.3", "webpack": "^4.32.2", "webpack-cli": "^3.3.2", diff --git a/src/test/vscodeUiTest/ProjectGenerationWizard.ts b/src/test/vscodeUiTest/ProjectGenerationWizard.ts index 60507bc3..cb6999f0 100644 --- a/src/test/vscodeUiTest/ProjectGenerationWizard.ts +++ b/src/test/vscodeUiTest/ProjectGenerationWizard.ts @@ -15,7 +15,7 @@ */ import * as _ from 'lodash'; -import { InputBox, QuickPickItem, DialogHandler, Workbench, WebDriver, WebElement, By, OpenDialog, until, Key } from 'vscode-extension-tester'; +import { InputBox, QuickPickItem, Workbench, WebDriver, WebElement, By, until, Key } from 'vscode-extension-tester'; /** * This class represents the project generation wizard visible @@ -80,9 +80,10 @@ export class ProjectGenerationWizard extends InputBox { } await wizard.next(); - const dialog: OpenDialog = await DialogHandler.getOpenDialog(); - await dialog.selectPath(options.dest); - await dialog.confirm(); + await new Workbench().executeCommand('extest open file'); + const input = await InputBox.create(); + await input.setText(options.dest); + await input.confirm(); } catch { return false; } diff --git a/src/test/vscodeUiTest/suite/contentAssistTest.ts b/src/test/vscodeUiTest/suite/contentAssistTest.ts new file mode 100644 index 00000000..7b9e9b97 --- /dev/null +++ b/src/test/vscodeUiTest/suite/contentAssistTest.ts @@ -0,0 +1,104 @@ +/** + * 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