Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
An interactive, graphical test runner for [CodeceptJS](https://codecept.io).


![codeceptui](https://github.com/codeceptjs/ui/raw/master/codecept-ui2.gif)
![codeceptui](codecept-ui2.gif)

* Runs as Electron app or as a web server
* Headless & window mode supported
Expand Down Expand Up @@ -44,7 +44,7 @@ npx codecept run --config tests/codecept.conf.js

### WebServer Mode

![](https://github.com/codeceptjs/ui/raw/master/codeceptui.gif)
![webserver mode](codeceptui.gif)

Run CodeceptUI as a web server (recommended for headless mode, remote debug):

Expand Down Expand Up @@ -85,19 +85,19 @@ npx codecept-ui --app --wsPort=4444

## Development

See [CONTRIBUTING.md](https://github.com/codeceptjs/ui/blob/master/.github/CONTRIBUTING.md)
See [CONTRIBUTING.md](.github/CONTRIBUTING.md)


## Start CodeceptUI with debug output

codepress uses the debug package to output debug information. This is useful to troubleshoot problems or just to see what codepress is doing. To turn on debug information do
CodeceptUI uses the [debug](https://github.com/debug-js/debug) package to output debug information. This is useful to troubleshoot problems or just to see what CodeceptUI is doing. To turn on debug information do

```
# verbose: get all debug information
DEBUG=codepress:* npx codecept-ui
DEBUG=codeceptjs:* npx codecept-ui

# just get debug output of one module
DEBUG=codepress:codeceptjs-factory npx codecept-ui
DEBUG=codeceptjs:codeceptjs-factory npx codecept-ui
```

# Credits
Expand All @@ -120,5 +120,6 @@ Thanks all for the contributions!
<a href="https://github.com/kaflan"><img src="https://avatars3.githubusercontent.com/u/3959504?v=4" title="kaflan" width="80" height="80"></a>
<a href="https://github.com/lukasf98"><img src="https://avatars2.githubusercontent.com/u/22434650?v=4" title="lukasf98" width="80" height="80"></a>
<a href="https://github.com/geilix10"><img src="https://avatars3.githubusercontent.com/u/16301998?v=4" title="geilix10" width="80" height="80"></a>
<a href="https://github.com/Teomik129"><img src="https://avatars3.githubusercontent.com/u/23395221?v=4" title="Teomik129" width="80" height="80"></a>

[//]: contributor-faces
2 changes: 1 addition & 1 deletion bin/codecept-ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
const debug = require('debug')('codepress:codepress');
const debug = require('debug')('codeceptjs:ui');

// initialize CodeceptJS and return startup options
const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/get-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const codeceptjsFactory = require('../model/codeceptjs-factory');

module.exports = (req, res) => {
const internalHelpers = Object.keys(codeceptjsFactory.codepressHelpersConfig.helpers);
const internalHelpers = Object.keys(codeceptjsFactory.codeceptjsHelpersConfig.helpers);
const { config, container } = codeceptjsFactory.getInstance();
const helpers = Object.keys(container.helpers()).filter(helper => internalHelpers.indexOf(helper) < 0);

Expand Down
2 changes: 1 addition & 1 deletion lib/api/get-scenario-status.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:get-scenario-status');
const debug = require('debug')('codeceptjs:get-scenario-status');
const scenarioStatusRepository = require('../model/scenario-status-repository');

module.exports = (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/get-snapshot-html.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:get-snapshot-html');
const debug = require('debug')('codeceptjs:get-snapshot-html');
const snapshotStore = require('../model/snapshot-store');

module.exports = (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/get-snapshot-image.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:get-snapshot-image');
const debug = require('debug')('codeceptjs:get-snapshot-image');
const snapshotStore = require('../model/snapshot-store');
const fs = require('fs');
const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/list-actions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function _interopDefault(ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex.default : ex; }
const acorn = require('acorn');
const parser = _interopDefault(require('parse-function'))({ parse: acorn.parse, ecmaVersion: 11 });
const debug = require('debug')('codepress:codeceptjs-factory');
const debug = require('debug')('codeceptjs:codeceptjs-factory');
const fs = require('fs');
const path = require('path');
const codeceptjsFactory = require('../model/codeceptjs-factory');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/new-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:run-scenario');
const debug = require('debug')('codeceptjs:run-scenario');
const wsEvents = require('../model/ws-events');
const pause = require('../codeceptjs/brk');
const { event } = require('codeceptjs');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/run-scenario-parallel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const os = require('os');
const debug = require('debug')('codepress:run-scenario-multiple');
const debug = require('debug')('codeceptjs:run-scenario-multiple');
const wsEvents = require('../model/ws-events');
const { event } = require('codeceptjs');
const codeceptjsFactory = require('../model/codeceptjs-factory');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/run-scenario.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:run-scenario');
const debug = require('debug')('codeceptjs:run-scenario');
const wsEvents = require('../model/ws-events');
const { event } = require('codeceptjs');
const codeceptjsFactory = require('../model/codeceptjs-factory');
Expand Down
2 changes: 1 addition & 1 deletion lib/api/stop.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:run-scenario');
const debug = require('debug')('codeceptjs:run-scenario');
const { event } = require('codeceptjs');

module.exports = async (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/codeceptjs/console-recorder.helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:console-recorder-helper');
const debug = require('debug')('codeceptjs:console-recorder-helper');
const wsEvents = require('../model/ws-events');
const { v4: uuid } = require('uuid');
// eslint-disable-next-line no-undef
Expand Down
2 changes: 1 addition & 1 deletion lib/codeceptjs/network-recorder.helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:network-helper');
const debug = require('debug')('codeceptjs:network-helper');
const wsEvents = require('../model/ws-events');

// eslint-disable-next-line no-undef
Expand Down
2 changes: 1 addition & 1 deletion lib/codeceptjs/realtime-reporter.helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:realtime-reporter-helper');
const debug = require('debug')('codeceptjs:realtime-reporter-helper');
const assert = require('assert');
const { nanoid } = require('nanoid');
const scenarioStatusRepository = require('../model/scenario-status-repository');
Expand Down
2 changes: 1 addition & 1 deletion lib/codeceptjs/reporter-utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:reporter-utils');
const debug = require('debug')('codeceptjs:reporter-utils');
const assert = require('assert');
const crypto = require('crypto');

Expand Down
8 changes: 4 additions & 4 deletions lib/model/codeceptjs-factory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:codeceptjs-factory');
const debug = require('debug')('codeceptjs:codeceptjs-factory');
const path = require('path');
const { codecept: Codecept, container, config } = require('codeceptjs');

Expand All @@ -15,7 +15,7 @@ module.exports = new class CodeceptjsFactory {
this.configFile = configFile;
}

loadCodepressHelpers() {
loadCodeceptJSHelpers() {
debug('Loading helpers...');
const RealtimeReporterHelper = require('../codeceptjs/realtime-reporter.helper');
const NetworkRecorderHelper = require('../codeceptjs/network-recorder.helper');
Expand Down Expand Up @@ -86,8 +86,8 @@ module.exports = new class CodeceptjsFactory {
// create helpers, support files, mocha
container.create(cfg, opts);

this.codepressHelpersConfig = this.loadCodepressHelpers(container);
container.append(this.codepressHelpersConfig);
this.codeceptjsHelpersConfig = this.loadCodeceptJSHelpers(container);
container.append(this.codeceptjsHelpersConfig);

debug('Running hooks...');
codecept.runHooks();
Expand Down
2 changes: 1 addition & 1 deletion lib/model/open-in-editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:open-in-editor');
const debug = require('debug')('codeceptjs:open-in-editor');
const { execSync } = require('child_process');
const { getSettings } = require('./settings-repository');

Expand Down
6 changes: 3 additions & 3 deletions lib/model/profile-repository.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const debug = require('debug')('codepress:profile-repository');
const debug = require('debug')('codeceptjs:profile-repository');
const fs = require('fs');
const path = require('path');

const CodepressDir = path.join(process.cwd(), '.codepress');
const ProfileConfigFile = path.join(CodepressDir, 'profile.conf.js');
const CodeceptJSDir = path.join(process.cwd(), '.codeceptjs');
const ProfileConfigFile = path.join(CodeceptJSDir, 'profile.conf.js');

const getProfiles = () => {
if (!fs.existsSync(ProfileConfigFile)) return;
Expand Down
2 changes: 1 addition & 1 deletion lib/model/scenario-repository.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:scenario-repository');
const debug = require('debug')('codeceptjs:scenario-repository');
const fs = require('fs');
const path = require('path');
const chokidar = require('chokidar');
Expand Down
2 changes: 1 addition & 1 deletion lib/model/scenario-status-repository.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const assert = require('assert');
const debug = require('debug')('codepress:scenario-status-repository');
const debug = require('debug')('codeceptjs:scenario-status-repository');
const fs = require('fs');
const path = require('path');
const mkdir = require('../utils/mkdir');
Expand Down
2 changes: 1 addition & 1 deletion lib/model/settings-repository.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:settings-repository');
const debug = require('debug')('codeceptjs:settings-repository');

const settings = {};

Expand Down
2 changes: 1 addition & 1 deletion lib/model/snapshot-store/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:snapshot-store');
const debug = require('debug')('codeceptjs:snapshot-store');
const assert = require('assert');
const fs = require('fs');
const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion lib/model/testrun-repository.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const debug = require('debug')('codepress:testRunRepository');
const debug = require('debug')('codeceptjs:testRunRepository');
const fs = require('fs');
const path = require('path');
const mkdir = require('../utils/mkdir');
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</head>
<body>
<noscript>
<strong>We're sorry but codepress doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but CodeceptUI doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down
6 changes: 3 additions & 3 deletions src/services/selector-finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const findShortSelector = (doc, el) => {

export const dehighlightAll = doc => {
try {
const oldOutlines = doc.querySelectorAll('.codepress-outline');
const oldOutlines = doc.querySelectorAll('.codeceptjs-outline');
oldOutlines.forEach(ol => ol.remove());
} catch (err) {
// eslint-disable-next-line
Expand All @@ -81,7 +81,7 @@ export const highlightElement = (el, doc, win) => {
const highlightColor = 'hsl(348, 100%, 61%)';

var newOutline = doc.createElement('div');
newOutline.className = 'codepress-outline';
newOutline.className = 'codeceptjs-outline';
newOutline.style.position = 'absolute';
newOutline.style['z-index'] = '9999999999';
newOutline.style['color'] = 'white';
Expand All @@ -98,7 +98,7 @@ export const highlightElement = (el, doc, win) => {
newOutline.style.left = rect.left + win.pageXOffset + 'px';

const textContainer = doc.createElement('div');
textContainer.className = 'codepress-outline';
textContainer.className = 'codeceptjs-outline';
textContainer.append(doc.createTextNode(shortestSelector));
textContainer.style.position = 'absolute';
textContainer.style['z-index'] = '9999999999';
Expand Down