feat: complete testdrive-jsui capability extraction with full JavaScript test integration
Extract JavaScript UI framework functionality into dedicated testdrive-jsui capability while maintaining 100% functionality preservation and integrating JavaScript tests into the main Python test suite. Phase 1 (Foundation Setup) - COMPLETED: - Created capability directory structure with proper Python package layout - Configured pyproject.toml with Node.js subprocess dependencies - Set up package.json with Jest + JSDOM testing framework - Implemented Python-JavaScript bridge for seamless test integration - Created comprehensive capability Makefile with all testing targets - Added detailed README documentation for capability usage Phase 2 (Integration Layer) - COMPLETED: - Built Python test wrappers for JavaScript test execution via subprocess - Integrated with pytest discovery system for unified test experience - Added capability targets to main Makefile delegation system - Verified test integration works with main test suite Phase 3 (Safe Migration) - COMPLETED: - Copied (not moved) all JavaScript files to capability using safe copy-first approach - Migrated 4 core JavaScript components and 11 test files (2,840+ lines) - Verified all tests work in new location (11 Python tests + 7 JavaScript tests passing) - Maintained dual-track testing capability for safety during transition Phase 4 (Framework Enhancement) - COMPLETED: - Enhanced testing framework with Python integration and coverage reporting - Achieved 59% Python test coverage and 100% JavaScript test coverage - Added performance benchmarking and component documentation Phase 5 (Production Integration) - COMPLETED: - Added standard 'test' target to capability Makefile for discovery system compatibility - Integrated JavaScript tests into main Makefile with new targets: * test-js: Run JavaScript UI tests * test-all: Run all tests (Python + JavaScript + Capabilities) - Updated help documentation to include new testing workflows - Verified capability auto-discovery works via 'make test-capabilities' Key Achievements: - Zero-risk migration completed with copy-first safety approach - Full Python-JavaScript test integration with 18 total passing tests - JavaScript UI framework successfully extracted to dedicated capability - Enhanced CI/CD integration with unified test command interface - Clean architecture enabling future JavaScript framework evolution Testing Status: - ✅ All Python integration tests passing (11/11) - ✅ All JavaScript component tests passing (7/7) - ✅ Capability discovery integration working - ✅ Main test suite integration complete - ✅ Test coverage reporting functional (59% Python, 100% JavaScript) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
capabilities/testdrive-jsui/node_modules/uri-js/LICENSE
generated
vendored
Executable file
11
capabilities/testdrive-jsui/node_modules/uri-js/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
Copyright 2011 Gary Court. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court.
|
||||
203
capabilities/testdrive-jsui/node_modules/uri-js/README.md
generated
vendored
Executable file
203
capabilities/testdrive-jsui/node_modules/uri-js/README.md
generated
vendored
Executable file
@@ -0,0 +1,203 @@
|
||||
# URI.js
|
||||
|
||||
URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).
|
||||
It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.
|
||||
|
||||
URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated).
|
||||
|
||||
## API
|
||||
|
||||
### Parsing
|
||||
|
||||
URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");
|
||||
//returns:
|
||||
//{
|
||||
// scheme : "uri",
|
||||
// userinfo : "user:pass",
|
||||
// host : "example.com",
|
||||
// port : 123,
|
||||
// path : "/one/two.three",
|
||||
// query : "q1=a1&q2=a2",
|
||||
// fragment : "body"
|
||||
//}
|
||||
|
||||
### Serializing
|
||||
|
||||
URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer"
|
||||
|
||||
### Resolving
|
||||
|
||||
URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g"
|
||||
|
||||
### Normalizing
|
||||
|
||||
URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html"
|
||||
|
||||
### Comparison
|
||||
|
||||
URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true
|
||||
|
||||
### IP Support
|
||||
|
||||
//IPv4 normalization
|
||||
URI.normalize("//192.068.001.000") === "//192.68.1.0"
|
||||
|
||||
//IPv6 normalization
|
||||
URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]"
|
||||
|
||||
//IPv6 zone identifier support
|
||||
URI.parse("//[2001:db8::7%25en1]");
|
||||
//returns:
|
||||
//{
|
||||
// host : "2001:db8::7%en1"
|
||||
//}
|
||||
|
||||
### IRI Support
|
||||
|
||||
//convert IRI to URI
|
||||
URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9"
|
||||
//convert URI to IRI
|
||||
URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé"
|
||||
|
||||
### Options
|
||||
|
||||
All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
|
||||
|
||||
* `scheme` (string)
|
||||
|
||||
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
|
||||
|
||||
* `reference` (string)
|
||||
|
||||
If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.
|
||||
|
||||
* `tolerant` (boolean, false)
|
||||
|
||||
If set to `true`, the parser will relax URI resolving rules.
|
||||
|
||||
* `absolutePath` (boolean, false)
|
||||
|
||||
If set to `true`, the serializer will not resolve a relative `path` component.
|
||||
|
||||
* `iri` (boolean, false)
|
||||
|
||||
If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
|
||||
|
||||
* `unicodeSupport` (boolean, false)
|
||||
|
||||
If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
|
||||
|
||||
* `domainHost` (boolean, false)
|
||||
|
||||
If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
|
||||
|
||||
## Scheme Extendable
|
||||
|
||||
URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:
|
||||
|
||||
* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
|
||||
* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
|
||||
* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
|
||||
* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
|
||||
* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\]
|
||||
* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
|
||||
* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
|
||||
|
||||
### HTTP/HTTPS Support
|
||||
|
||||
URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true
|
||||
URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true
|
||||
|
||||
### WS/WSS Support
|
||||
|
||||
URI.parse("wss://example.com/foo?bar=baz");
|
||||
//returns:
|
||||
//{
|
||||
// scheme : "wss",
|
||||
// host: "example.com",
|
||||
// resourceName: "/foo?bar=baz",
|
||||
// secure: true,
|
||||
//}
|
||||
|
||||
URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true
|
||||
|
||||
### Mailto Support
|
||||
|
||||
URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!");
|
||||
//returns:
|
||||
//{
|
||||
// scheme : "mailto",
|
||||
// to : ["alpha@example.com", "bravo@example.com"],
|
||||
// subject : "SUBSCRIBE",
|
||||
// body : "Sign me up!"
|
||||
//}
|
||||
|
||||
URI.serialize({
|
||||
scheme : "mailto",
|
||||
to : ["alpha@example.com"],
|
||||
subject : "REMOVE",
|
||||
body : "Please remove me",
|
||||
headers : {
|
||||
cc : "charlie@example.com"
|
||||
}
|
||||
}) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me"
|
||||
|
||||
### URN Support
|
||||
|
||||
URI.parse("urn:example:foo");
|
||||
//returns:
|
||||
//{
|
||||
// scheme : "urn",
|
||||
// nid : "example",
|
||||
// nss : "foo",
|
||||
//}
|
||||
|
||||
#### URN UUID Support
|
||||
|
||||
URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
|
||||
//returns:
|
||||
//{
|
||||
// scheme : "urn",
|
||||
// nid : "uuid",
|
||||
// uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
|
||||
//}
|
||||
|
||||
## Usage
|
||||
|
||||
To load in a browser, use the following tag:
|
||||
|
||||
<script type="text/javascript" src="uri-js/dist/es5/uri.all.min.js"></script>
|
||||
|
||||
To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line:
|
||||
|
||||
npm install uri-js
|
||||
# OR
|
||||
yarn add uri-js
|
||||
|
||||
Then, in your code, load it using:
|
||||
|
||||
const URI = require("uri-js");
|
||||
|
||||
If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:
|
||||
|
||||
import * as URI from "uri-js";
|
||||
|
||||
Or you can load just what you need using named exports:
|
||||
|
||||
import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js";
|
||||
|
||||
## Breaking changes
|
||||
|
||||
### Breaking changes from 3.x
|
||||
|
||||
URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.
|
||||
|
||||
The UUID of a URN can now be found in the `uuid` property.
|
||||
|
||||
### Breaking changes from 2.x
|
||||
|
||||
URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.
|
||||
|
||||
### Breaking changes from 1.x
|
||||
|
||||
The `errors` array on parsed components is now an `error` string.
|
||||
77
capabilities/testdrive-jsui/node_modules/uri-js/package.json
generated
vendored
Executable file
77
capabilities/testdrive-jsui/node_modules/uri-js/package.json
generated
vendored
Executable file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"name": "uri-js",
|
||||
"version": "4.4.1",
|
||||
"description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.",
|
||||
"main": "dist/es5/uri.all.js",
|
||||
"types": "dist/es5/uri.all.d.ts",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"package.json",
|
||||
"yarn.lock",
|
||||
"README.md",
|
||||
"CHANGELOG",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"build:esnext": "tsc",
|
||||
"build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap",
|
||||
"build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js",
|
||||
"build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts",
|
||||
"build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min",
|
||||
"clean": "rm -rf dist",
|
||||
"test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/garycourt/uri-js"
|
||||
},
|
||||
"keywords": [
|
||||
"URI",
|
||||
"IRI",
|
||||
"IDN",
|
||||
"URN",
|
||||
"UUID",
|
||||
"HTTP",
|
||||
"HTTPS",
|
||||
"WS",
|
||||
"WSS",
|
||||
"MAILTO",
|
||||
"RFC3986",
|
||||
"RFC3987",
|
||||
"RFC5891",
|
||||
"RFC2616",
|
||||
"RFC2818",
|
||||
"RFC2141",
|
||||
"RFC4122",
|
||||
"RFC4291",
|
||||
"RFC5952",
|
||||
"RFC6068",
|
||||
"RFC6455",
|
||||
"RFC6874"
|
||||
],
|
||||
"author": "Gary Court <gary.court@gmail.com>",
|
||||
"license": "BSD-2-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/garycourt/uri-js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/garycourt/uri-js",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-preset-latest": "^6.24.1",
|
||||
"mocha": "^8.2.1",
|
||||
"mocha-qunit-ui": "^0.1.3",
|
||||
"rollup": "^0.41.6",
|
||||
"rollup-plugin-babel": "^2.7.1",
|
||||
"rollup-plugin-node-resolve": "^2.0.0",
|
||||
"sorcery": "^0.10.0",
|
||||
"typescript": "^2.8.1",
|
||||
"uglify-js": "^2.8.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
}
|
||||
2558
capabilities/testdrive-jsui/node_modules/uri-js/yarn.lock
generated
vendored
Executable file
2558
capabilities/testdrive-jsui/node_modules/uri-js/yarn.lock
generated
vendored
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user