@capillarytech/cap-ui-dev-tools 1.0.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CAPVISION_USAGE.md +488 -0
- package/README.md +199 -48
- package/package.json +39 -10
- package/src/LibraryWatcherPlugin.js +53 -0
- package/src/capvision-recorder/adapters/WebdriverIOAdapter.js +312 -0
- package/src/capvision-recorder/assets/capvision-player.css +1 -0
- package/src/capvision-recorder/assets/capvision-player.min.js +31 -0
- package/src/capvision-recorder/assets/capvision-plugins/console-record.min.js +93 -0
- package/src/capvision-recorder/assets/capvision-plugins/console-replay.min.js +85 -0
- package/src/capvision-recorder/assets/capvision-plugins/network-record.min.js +542 -0
- package/src/capvision-recorder/assets/capvision-plugins/network-replay.min.js +434 -0
- package/src/capvision-recorder/assets/capvision.min.js +19 -0
- package/src/capvision-recorder/core/CapVisionRecorder.js +1338 -0
- package/src/capvision-recorder/core/ReportEnhancer.js +755 -0
- package/src/capvision-recorder/index.js +58 -0
- package/src/index.js +34 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CapVision Recorder Module for @capillarytech/cap-ui-dev-tools
|
|
3
|
+
*
|
|
4
|
+
* Session recording and playback functionality for WebdriverIO tests
|
|
5
|
+
*
|
|
6
|
+
* @module capvision-recorder
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
// Import core modules
|
|
12
|
+
const { CapVisionRecorder, DEFAULT_CONFIG: CAPVISION_DEFAULT_CONFIG } = require('./core/CapVisionRecorder');
|
|
13
|
+
const { ReportEnhancer, DEFAULT_ENHANCER_CONFIG } = require('./core/ReportEnhancer');
|
|
14
|
+
const {
|
|
15
|
+
WebdriverIOBrowserExecutor,
|
|
16
|
+
WebdriverIOCapVisionRecorder,
|
|
17
|
+
createWDIOCapVisionHooks
|
|
18
|
+
} = require('./adapters/WebdriverIOAdapter');
|
|
19
|
+
|
|
20
|
+
// Update default asset paths to match cap-ui-dev-tools structure
|
|
21
|
+
const ASSET_BASE_PATH = path.join(__dirname, 'assets');
|
|
22
|
+
|
|
23
|
+
CAPVISION_DEFAULT_CONFIG.capVisionScriptPath = path.join(ASSET_BASE_PATH, 'capvision.min.js');
|
|
24
|
+
CAPVISION_DEFAULT_CONFIG.consoleRecordPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/console-record.min.js');
|
|
25
|
+
CAPVISION_DEFAULT_CONFIG.consoleReplayPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/console-replay.min.js');
|
|
26
|
+
CAPVISION_DEFAULT_CONFIG.networkRecordPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/network-record.min.js');
|
|
27
|
+
CAPVISION_DEFAULT_CONFIG.networkReplayPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/network-replay.min.js');
|
|
28
|
+
|
|
29
|
+
DEFAULT_ENHANCER_CONFIG.playerCSSPath = path.join(ASSET_BASE_PATH, 'capvision-player.css');
|
|
30
|
+
DEFAULT_ENHANCER_CONFIG.playerScriptPath = path.join(ASSET_BASE_PATH, 'capvision-player.min.js');
|
|
31
|
+
DEFAULT_ENHANCER_CONFIG.consoleReplayPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/console-replay.min.js');
|
|
32
|
+
DEFAULT_ENHANCER_CONFIG.networkReplayPluginPath = path.join(ASSET_BASE_PATH, 'capvision-plugins/network-replay.min.js');
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Export all CapVision recorder components
|
|
36
|
+
*/
|
|
37
|
+
module.exports = {
|
|
38
|
+
// Core classes
|
|
39
|
+
CapVisionRecorder,
|
|
40
|
+
ReportEnhancer,
|
|
41
|
+
|
|
42
|
+
// WebdriverIO adapters
|
|
43
|
+
WebdriverIOBrowserExecutor,
|
|
44
|
+
WebdriverIOCapVisionRecorder,
|
|
45
|
+
|
|
46
|
+
// Convenience helpers
|
|
47
|
+
createWDIOCapVisionHooks,
|
|
48
|
+
|
|
49
|
+
// Default configurations
|
|
50
|
+
CAPVISION_DEFAULT_CONFIG,
|
|
51
|
+
DEFAULT_ENHANCER_CONFIG
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Default export - most commonly used function
|
|
56
|
+
*/
|
|
57
|
+
module.exports.default = createWDIOCapVisionHooks;
|
|
58
|
+
|
package/src/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @capillarytech/cap-ui-dev-tools
|
|
3
|
+
*
|
|
4
|
+
* Development tools for Capillary UI projects
|
|
5
|
+
*
|
|
6
|
+
* @module cap-ui-dev-tools
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Webpack Plugin for library hot-reloading
|
|
10
|
+
const LibraryWatcherPlugin = require('./LibraryWatcherPlugin');
|
|
11
|
+
|
|
12
|
+
// CapVision Recorder for test session recording
|
|
13
|
+
const capVisionRecorder = require('./capvision-recorder');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Main exports for cap-ui-dev-tools
|
|
17
|
+
*/
|
|
18
|
+
module.exports = {
|
|
19
|
+
// Webpack plugin (existing functionality)
|
|
20
|
+
LibraryWatcherPlugin,
|
|
21
|
+
|
|
22
|
+
// CapVision recorder module (new functionality)
|
|
23
|
+
capVisionRecorder,
|
|
24
|
+
|
|
25
|
+
// Convenience exports for CapVision (most commonly used)
|
|
26
|
+
createWDIOCapVisionHooks: capVisionRecorder.createWDIOCapVisionHooks,
|
|
27
|
+
CapVisionRecorder: capVisionRecorder.CapVisionRecorder,
|
|
28
|
+
ReportEnhancer: capVisionRecorder.ReportEnhancer
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Default export - LibraryWatcherPlugin for backward compatibility
|
|
33
|
+
*/
|
|
34
|
+
module.exports.default = LibraryWatcherPlugin;
|