Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library - Install Playwright for end-to-end testing - Configure Jest with proper TypeScript support and module mapping - Create test setup files and utilities for both unit and e2e tests Components: * Jest configuration with coverage thresholds * Playwright configuration with browser automation * Unit tests for LoginForm, AuthContext, and useSocketIO hook * E2E tests for authentication, dashboard, and agents workflows * GitHub Actions workflow for automated testing * Mock data and API utilities for consistent testing * Test documentation with best practices Testing features: - Unit tests with 70% coverage threshold - E2E tests with API mocking and user journey testing - CI/CD integration for automated test runs - Cross-browser testing support with Playwright - Authentication system testing end-to-end 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
frontend/node_modules/css.escape/LICENSE-MIT.txt
generated
vendored
Normal file
20
frontend/node_modules/css.escape/LICENSE-MIT.txt
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
39
frontend/node_modules/css.escape/README.md
generated
vendored
Normal file
39
frontend/node_modules/css.escape/README.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# `CSS.escape` polyfill [](https://travis-ci.org/mathiasbynens/CSS.escape) [](https://coveralls.io/r/mathiasbynens/CSS.escape)
|
||||
|
||||
A robust polyfill for [the `CSS.escape` utility method as defined in CSSOM](https://drafts.csswg.org/cssom/#the-css.escape%28%29-method).
|
||||
|
||||
For a more powerful alternative, consider using [cssesc](https://mths.be/cssesc), which automatically takes care of excessive whitespace, and has many options to customize the output.
|
||||
|
||||
## Installation
|
||||
|
||||
In a browser:
|
||||
|
||||
```html
|
||||
<script src="css.escape.js"></script>
|
||||
```
|
||||
|
||||
Via [npm](https://www.npmjs.com/):
|
||||
|
||||
```bash
|
||||
npm install css.escape
|
||||
```
|
||||
|
||||
Then, in [Node.js](https://nodejs.org/):
|
||||
|
||||
```js
|
||||
require('css.escape');
|
||||
|
||||
// On Windows and on Mac systems with default settings, case doesn’t matter,
|
||||
// which allows you to do this instead:
|
||||
require('CSS.escape');
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|
|
||||
| [Mathias Bynens](https://mathiasbynens.be/) |
|
||||
|
||||
## License
|
||||
|
||||
This polyfill is available under the [MIT](https://mths.be/mit) license.
|
||||
106
frontend/node_modules/css.escape/css.escape.js
generated
vendored
Normal file
106
frontend/node_modules/css.escape/css.escape.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
||||
;(function(root, factory) {
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof exports == 'object') {
|
||||
// For Node.js.
|
||||
module.exports = factory(root);
|
||||
} else if (typeof define == 'function' && define.amd) {
|
||||
// For AMD. Register as an anonymous module.
|
||||
define([], factory.bind(root, root));
|
||||
} else {
|
||||
// For browser globals (not exposing the function separately).
|
||||
factory(root);
|
||||
}
|
||||
}(typeof global != 'undefined' ? global : this, function(root) {
|
||||
|
||||
if (root.CSS && root.CSS.escape) {
|
||||
return root.CSS.escape;
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#serialize-an-identifier
|
||||
var cssEscape = function(value) {
|
||||
if (arguments.length == 0) {
|
||||
throw new TypeError('`CSS.escape` requires an argument.');
|
||||
}
|
||||
var string = String(value);
|
||||
var length = string.length;
|
||||
var index = -1;
|
||||
var codeUnit;
|
||||
var result = '';
|
||||
var firstCodeUnit = string.charCodeAt(0);
|
||||
while (++index < length) {
|
||||
codeUnit = string.charCodeAt(index);
|
||||
// Note: there’s no need to special-case astral symbols, surrogate
|
||||
// pairs, or lone surrogates.
|
||||
|
||||
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
||||
// (U+FFFD).
|
||||
if (codeUnit == 0x0000) {
|
||||
result += '\uFFFD';
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
||||
// U+007F, […]
|
||||
(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
|
||||
// If the character is the first character and is in the range [0-9]
|
||||
// (U+0030 to U+0039), […]
|
||||
(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
||||
// If the character is the second character and is in the range [0-9]
|
||||
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
||||
(
|
||||
index == 1 &&
|
||||
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
|
||||
firstCodeUnit == 0x002D
|
||||
)
|
||||
) {
|
||||
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
||||
result += '\\' + codeUnit.toString(16) + ' ';
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
// If the character is the first character and is a `-` (U+002D), and
|
||||
// there is no second character, […]
|
||||
index == 0 &&
|
||||
length == 1 &&
|
||||
codeUnit == 0x002D
|
||||
) {
|
||||
result += '\\' + string.charAt(index);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the character is not handled by one of the above rules and is
|
||||
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
||||
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
||||
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
||||
if (
|
||||
codeUnit >= 0x0080 ||
|
||||
codeUnit == 0x002D ||
|
||||
codeUnit == 0x005F ||
|
||||
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
|
||||
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
|
||||
codeUnit >= 0x0061 && codeUnit <= 0x007A
|
||||
) {
|
||||
// the character itself
|
||||
result += string.charAt(index);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Otherwise, the escaped character.
|
||||
// https://drafts.csswg.org/cssom/#escape-a-character
|
||||
result += '\\' + string.charAt(index);
|
||||
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
if (!root.CSS) {
|
||||
root.CSS = {};
|
||||
}
|
||||
|
||||
root.CSS.escape = cssEscape;
|
||||
return cssEscape;
|
||||
|
||||
}));
|
||||
38
frontend/node_modules/css.escape/package.json
generated
vendored
Normal file
38
frontend/node_modules/css.escape/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "css.escape",
|
||||
"version": "1.5.1",
|
||||
"description": "A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.",
|
||||
"homepage": "https://mths.be/cssescape",
|
||||
"main": "css.escape.js",
|
||||
"keywords": [
|
||||
"string",
|
||||
"unicode",
|
||||
"identifier",
|
||||
"css",
|
||||
"cssom",
|
||||
"polyfill"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Mathias Bynens",
|
||||
"url": "https://mathiasbynens.be/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mathiasbynens/CSS.escape.git"
|
||||
},
|
||||
"bugs": "https://github.com/mathiasbynens/CSS.escape/issues",
|
||||
"files": [
|
||||
"LICENSE-MIT.txt",
|
||||
"css.escape.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "node tests/tests.js",
|
||||
"cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js",
|
||||
"coveralls": "istanbul cover --verbose --dir coverage tests/tests.js && coveralls < coverage/lcov.info; rm -rf coverage/lcov*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.4",
|
||||
"istanbul": "^0.4.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user