@scifeon/sdk 0.91.0 → 0.92.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/dist/cli/commands/app/e2e-test.js +6 -1
- package/dist/cli/commands/app/post-process.d.ts +8 -0
- package/dist/cli/commands/app/post-process.js +122 -0
- package/dist/cli/commands/app/scaffold.d.ts +4 -0
- package/dist/cli/commands/app/scaffold.js +19 -0
- package/dist/cli/index.js +48 -38
- package/dist/index.js +6 -1
- package/dist/plugin-types.d.ts +3 -0
- package/dist/plugin-types.js +3 -0
- package/package.json +3 -3
- package/resources/scaffold-templates/scaffold-e2e-test.ts +19 -0
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.E2ETestCommand = void 0;
|
|
4
|
+
const path = require("path");
|
|
4
5
|
const resolve = require("resolve");
|
|
5
6
|
const logger_1 = require("../../../logger");
|
|
6
7
|
class E2ETestCommand {
|
|
7
8
|
execute(options) {
|
|
8
|
-
|
|
9
|
+
if (__dirname.includes(`${path.sep}packages${path.sep}sdk${path.sep}`)) {
|
|
10
|
+
require("../../../../../e2e-test/dist").e2eTestRunner(options);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
resolve("@scifeon/e2e-test", { basedir: process.cwd() }, (err, res) => {
|
|
9
14
|
if (err) {
|
|
10
15
|
logger_1.LOGGER.error(`You must install the @scifeon/e2e-test package to use this command: 'npm install @scifeon/e2e-test --save-dev'`);
|
|
11
16
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.PostProcessCommand = void 0;
|
|
20
|
+
const fs = require("fs");
|
|
21
|
+
const readline = require("readline");
|
|
22
|
+
const logger_1 = require("../../../logger");
|
|
23
|
+
class PostProcessCommand {
|
|
24
|
+
updateTestFile(testFile, recordingFile) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const lines = yield this.parseFile(testFile);
|
|
27
|
+
const newLines = [];
|
|
28
|
+
for (const line of lines) {
|
|
29
|
+
if (line.includes(`import { runChromeRecording } from`)) {
|
|
30
|
+
newLines.push(`import { runChromeRecording } from "./${recordingFile.replace(/\.js/, "")}";`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
newLines.push(line);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
fs.writeFileSync(testFile, newLines.join("\n"), { flag: "w" });
|
|
37
|
+
logger_1.LOGGER.msg(`Updating test file: "${testFile}".`);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
postProcessFiles(recordingFile) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const recordingLines = yield this.parseFile(recordingFile);
|
|
43
|
+
const functionBlocks = this.findBlocks(recordingLines, " async function", " }");
|
|
44
|
+
const blocks = this.findBlocks(recordingLines, " {", " }");
|
|
45
|
+
blocks.splice(1, 1);
|
|
46
|
+
const functionLines = functionBlocks.reduce((ary, block) => ary.concat(block), []);
|
|
47
|
+
functionLines.unshift(`import { e2eConfig } from "@scifeon/e2e-test";`);
|
|
48
|
+
const blockLines = blocks.reduce((ary, block) => ary.concat(block), []);
|
|
49
|
+
blockLines.unshift("");
|
|
50
|
+
blockLines.unshift(" const timeout = e2eConfig.puppeteer.timeout;");
|
|
51
|
+
blockLines.unshift("async function runChromeRecording(page) {");
|
|
52
|
+
blockLines.push("};");
|
|
53
|
+
blockLines.push("");
|
|
54
|
+
blockLines.push("export { runChromeRecording };");
|
|
55
|
+
return [...functionLines, ...blockLines];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
parseFile(filePath) {
|
|
59
|
+
var e_1, _a;
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const lines = [];
|
|
62
|
+
const fileInterface = readline.createInterface({
|
|
63
|
+
input: fs.createReadStream(filePath),
|
|
64
|
+
output: process.stdout,
|
|
65
|
+
terminal: false,
|
|
66
|
+
});
|
|
67
|
+
try {
|
|
68
|
+
for (var fileInterface_1 = __asyncValues(fileInterface), fileInterface_1_1; fileInterface_1_1 = yield fileInterface_1.next(), !fileInterface_1_1.done;) {
|
|
69
|
+
const line = fileInterface_1_1.value;
|
|
70
|
+
lines.push(line);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
74
|
+
finally {
|
|
75
|
+
try {
|
|
76
|
+
if (fileInterface_1_1 && !fileInterface_1_1.done && (_a = fileInterface_1.return)) yield _a.call(fileInterface_1);
|
|
77
|
+
}
|
|
78
|
+
finally { if (e_1) throw e_1.error; }
|
|
79
|
+
}
|
|
80
|
+
return lines;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
findBlocks(lines, startPattern, endPattern) {
|
|
84
|
+
const blocks = [];
|
|
85
|
+
let gotStart = false;
|
|
86
|
+
let gotEnd = false;
|
|
87
|
+
let block = [];
|
|
88
|
+
for (const line of lines) {
|
|
89
|
+
if (line.startsWith(startPattern)) {
|
|
90
|
+
gotStart = true;
|
|
91
|
+
gotEnd = false;
|
|
92
|
+
}
|
|
93
|
+
if (line.startsWith(endPattern)) {
|
|
94
|
+
gotEnd = true;
|
|
95
|
+
}
|
|
96
|
+
if (gotStart) {
|
|
97
|
+
block.push(line);
|
|
98
|
+
}
|
|
99
|
+
if (gotStart && gotEnd) {
|
|
100
|
+
blocks.push(block);
|
|
101
|
+
block = [];
|
|
102
|
+
gotStart = false;
|
|
103
|
+
gotEnd = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return blocks;
|
|
107
|
+
}
|
|
108
|
+
execute(options) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
if (options.test && options.recording) {
|
|
111
|
+
const testFile = options.test;
|
|
112
|
+
const recordingFile = options.recording;
|
|
113
|
+
const outputFile = recordingFile.replace(/\.js$/, ".post-processed.js");
|
|
114
|
+
yield this.updateTestFile(testFile, outputFile);
|
|
115
|
+
const outputLines = yield this.postProcessFiles(recordingFile);
|
|
116
|
+
fs.writeFileSync(outputFile, outputLines.join("\n"));
|
|
117
|
+
logger_1.LOGGER.msg(`Writing post-processed file: "${outputFile}".`);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.PostProcessCommand = PostProcessCommand;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScaffoldCommand = void 0;
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const logger_1 = require("../../../logger");
|
|
7
|
+
class ScaffoldCommand {
|
|
8
|
+
execute(options) {
|
|
9
|
+
const basePath = path.resolve(__dirname, "..", "..", "..", "..", "resources", "scaffold-templates");
|
|
10
|
+
if (options.e2eTest) {
|
|
11
|
+
const fileName = options.e2eTest;
|
|
12
|
+
const template = path.resolve(basePath, "scaffold-e2e-test.ts");
|
|
13
|
+
const scaffold = fs.readFileSync(template);
|
|
14
|
+
fs.writeFileSync(fileName, scaffold);
|
|
15
|
+
logger_1.LOGGER.msg(`Writing scaffold file: "${fileName}".`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ScaffoldCommand = ScaffoldCommand;
|
package/dist/cli/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ScifeonCLI = void 0;
|
|
27
27
|
const chalk_1 = require("chalk");
|
|
28
|
-
const
|
|
28
|
+
const commander_1 = require("commander");
|
|
29
29
|
const logger_1 = require("../logger");
|
|
30
30
|
const build_1 = require("./commands/app/build");
|
|
31
31
|
const clean_1 = require("./commands/app/clean");
|
|
@@ -33,6 +33,8 @@ const debug_1 = require("./commands/app/debug");
|
|
|
33
33
|
const e2e_test_1 = require("./commands/app/e2e-test");
|
|
34
34
|
const new_1 = require("./commands/app/new");
|
|
35
35
|
const package_1 = require("./commands/app/package");
|
|
36
|
+
const post_process_1 = require("./commands/app/post-process");
|
|
37
|
+
const scaffold_1 = require("./commands/app/scaffold");
|
|
36
38
|
const unit_test_1 = require("./commands/app/unit-test");
|
|
37
39
|
const validate_1 = require("./commands/app/validate");
|
|
38
40
|
const version_1 = require("./commands/app/version");
|
|
@@ -41,32 +43,33 @@ const download_1 = require("./commands/scifeon/download");
|
|
|
41
43
|
__exportStar(require("../utils/test-helper"), exports);
|
|
42
44
|
class ScifeonCLI {
|
|
43
45
|
constructor() {
|
|
44
|
-
this.program =
|
|
46
|
+
this.program = commander_1.program;
|
|
45
47
|
this.package = require("../../package.json");
|
|
46
48
|
this.initialize();
|
|
47
49
|
this.setup();
|
|
50
|
+
const padding = new Array(20).join(" ");
|
|
51
|
+
const header = `${padding}Scifeon CLI | Version: ${this.package.version}${padding}`;
|
|
52
|
+
console.log(chalk_1.default.bgBlue.white(" ".repeat(header.length)));
|
|
53
|
+
console.log(chalk_1.default.bgBlue.white(header));
|
|
54
|
+
console.log(chalk_1.default.bgBlue.white("-".repeat(header.length)));
|
|
55
|
+
const options = this.program.opts();
|
|
56
|
+
new logger_1.LOGGER(options.quiet, options.verbose);
|
|
57
|
+
logger_1.LOGGER.warn("Verbose logging enabled.");
|
|
48
58
|
}
|
|
49
59
|
initialize() {
|
|
50
60
|
this.program
|
|
51
61
|
.version(this.package.version)
|
|
52
62
|
.description(this.package.description)
|
|
53
63
|
.option("-v, --verbose", "Verbose logging.")
|
|
54
|
-
.option("-q, --quiet", "No logging.")
|
|
55
|
-
.parse(process.argv);
|
|
56
|
-
const header = " Scifeon CLI | Version: " + this.package.version + " ";
|
|
57
|
-
console.log(chalk_1.default.bgBlue.white(" ".repeat(header.length)));
|
|
58
|
-
console.log(chalk_1.default.bgBlue.white(header));
|
|
59
|
-
console.log(chalk_1.default.bgBlue.white("-".repeat(header.length)));
|
|
60
|
-
new logger_1.LOGGER(this.program.quiet, this.program.verbose);
|
|
61
|
-
logger_1.LOGGER.warn("Verbose logging enabled.");
|
|
64
|
+
.option("-q, --quiet", "No logging.");
|
|
62
65
|
}
|
|
63
66
|
setup() {
|
|
64
67
|
this.program
|
|
65
68
|
.command("build")
|
|
66
|
-
.option("--branch
|
|
69
|
+
.option("--branch <branch>", "Platform branch to use for SDK types.")
|
|
67
70
|
.allowUnknownOption()
|
|
68
71
|
.description("Build the App into the folder /build.\n")
|
|
69
|
-
.action((options) => __awaiter(this, void 0, void 0, function* () { return
|
|
72
|
+
.action((filename, options, command) => __awaiter(this, void 0, void 0, function* () { return new build_1.BuildCommand().execute(options); }));
|
|
70
73
|
this.program
|
|
71
74
|
.command("clean")
|
|
72
75
|
.description("Remove the /build-folder.\n")
|
|
@@ -76,8 +79,8 @@ class ScifeonCLI {
|
|
|
76
79
|
.allowUnknownOption()
|
|
77
80
|
.option("--disable-browser-launch", "Don't launch http://localhost:5000 in the default browser.")
|
|
78
81
|
.description("Starts Scifeon development version and builds App with watch-mode.\n")
|
|
79
|
-
.action((options) => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
return
|
|
82
|
+
.action((filename, options, command) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return new debug_1.DebugCommand()
|
|
81
84
|
.execute(options.disableBrowserLaunch !== undefined && options.disableBrowserLaunch);
|
|
82
85
|
}));
|
|
83
86
|
this.program
|
|
@@ -101,45 +104,52 @@ class ScifeonCLI {
|
|
|
101
104
|
.option("--cli", "Run tests on the command-line, i.e. not in the browser.")
|
|
102
105
|
.option("--junit-report")
|
|
103
106
|
.option("--html-report")
|
|
104
|
-
.option("--dir
|
|
107
|
+
.option("--dir <dir>")
|
|
105
108
|
.description("Run all unit-tests located in the /test/unit-folder.\n")
|
|
106
|
-
.action(options => new unit_test_1.TestCommand().execute(options));
|
|
109
|
+
.action((filename, options, command) => new unit_test_1.TestCommand().execute(options));
|
|
107
110
|
this.program
|
|
108
111
|
.command("e2e-test")
|
|
109
|
-
.option("--url
|
|
110
|
-
.option("--key
|
|
111
|
-
.option("--pdf-report", "Generate a PDF report with the result")
|
|
112
|
-
.option("--junit-report", "Generate a JUnit formatted XML-file with the result")
|
|
113
|
-
.option("--trx-report", "Generate a TRX formatted XML-file with the result")
|
|
114
|
-
.option("--headless", "Run Chrome in headless mode")
|
|
115
|
-
.option("--tag
|
|
116
|
-
.option("--file-pattern
|
|
117
|
-
.option("--dir
|
|
118
|
-
.option("--test
|
|
119
|
-
.option("--timeout
|
|
120
|
-
.option("--chrome
|
|
112
|
+
.option("--url <url>", "URL for the scifeon instance to test", "http://localhost:5000")
|
|
113
|
+
.option("--key <key>", "Optionally add a /test/e2e/key.config-file with this content (make sure the file is ignored by .git).")
|
|
114
|
+
.option("--pdf-report", "Generate a PDF report with the result.")
|
|
115
|
+
.option("--junit-report", "Generate a JUnit formatted XML-file with the result.")
|
|
116
|
+
.option("--trx-report", "Generate a TRX formatted XML-file with the result.")
|
|
117
|
+
.option("--headless", "Run Chrome in headless mode.")
|
|
118
|
+
.option("--tag <tag>", "Run only tests with tag.")
|
|
119
|
+
.option("--file-pattern <filePattern>", "Run only tests in files matching file pattern.")
|
|
120
|
+
.option("--dir <dir>", "Run only tests in provided directory.")
|
|
121
|
+
.option("--test <file>", "Run only specific test file.")
|
|
122
|
+
.option("--timeout <timeout>", "Set the timeout for when to fail a test", "30")
|
|
123
|
+
.option("--chrome <path>", "Optionally specify the full path to the Chrome-installation to use.")
|
|
121
124
|
.description("Run all end-to-end-tests located in the /test/e2e-folder. All options above can be added to the /test/e2e/config.ts-file.\n")
|
|
122
125
|
.action(options => new e2e_test_1.E2ETestCommand().execute(options));
|
|
126
|
+
this.program
|
|
127
|
+
.command("scaffold")
|
|
128
|
+
.option("--e2e-test <filename>", "Create an e2e test file with the specified filename.")
|
|
129
|
+
.description("Create a scaffold file with boilerplate code.\n")
|
|
130
|
+
.action(options => new scaffold_1.ScaffoldCommand().execute(options));
|
|
131
|
+
this.program
|
|
132
|
+
.command("post-process")
|
|
133
|
+
.option("--test <file>", "Test file created with 'scifeon-cli scaffold --e2e-test'.")
|
|
134
|
+
.option("--recording <file>", "Puppeteer file exported from Chrome Recorder.")
|
|
135
|
+
.description("Post-process the content of a Chrome recording for use with the test file.")
|
|
136
|
+
.action(options => new post_process_1.PostProcessCommand().execute(options));
|
|
123
137
|
this.program
|
|
124
138
|
.command("watch")
|
|
125
139
|
.allowUnknownOption()
|
|
126
140
|
.description("Build the App and watch for changes.\n")
|
|
127
|
-
.action(() => __awaiter(this, void 0, void 0, function* () { return
|
|
141
|
+
.action(() => __awaiter(this, void 0, void 0, function* () { return new watch_1.WatchCommand().execute(); }));
|
|
128
142
|
this.program
|
|
129
143
|
.command("download")
|
|
130
144
|
.description("Download the latest version of the Scifeon runtime.\n")
|
|
131
|
-
.action(() => __awaiter(this, void 0, void 0, function* () { return
|
|
145
|
+
.action(() => __awaiter(this, void 0, void 0, function* () { return new download_1.DownloadCommand().execute(); }));
|
|
146
|
+
this.program.configureHelp({
|
|
147
|
+
sortSubcommands: true,
|
|
148
|
+
});
|
|
132
149
|
}
|
|
133
150
|
start() {
|
|
134
151
|
try {
|
|
135
|
-
this.program.parse(process.argv);
|
|
136
|
-
if (this.program.args.length) {
|
|
137
|
-
const command = this.program.args[this.program.args.length - 1];
|
|
138
|
-
if (typeof command === "string") {
|
|
139
|
-
logger_1.LOGGER.error(`The command ${command} was not recognized.`);
|
|
140
|
-
this.program.help();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
152
|
+
const command = this.program.parse(process.argv);
|
|
143
153
|
}
|
|
144
154
|
catch (err) {
|
|
145
155
|
logger_1.LOGGER.error(err.toString());
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const path = require("path");
|
|
4
5
|
const resolve = require("resolve");
|
|
5
6
|
const cli_1 = require("./cli");
|
|
6
7
|
process.title = "scifeon";
|
|
7
8
|
resolve("@scifeon/sdk", { basedir: process.cwd() }, function (err, res) {
|
|
8
9
|
let cli;
|
|
9
|
-
if (
|
|
10
|
+
if (__dirname.includes(`client${path.sep}packages${path.sep}sdk${path.sep}dist`)) {
|
|
11
|
+
console.log("Using development version...");
|
|
12
|
+
cli = cli_1.ScifeonCLI;
|
|
13
|
+
}
|
|
14
|
+
else if (err) {
|
|
10
15
|
console.log("Using global NPM package...");
|
|
11
16
|
cli = cli_1.ScifeonCLI;
|
|
12
17
|
}
|
package/dist/plugin-types.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export declare enum PLUGIN_TYPE {
|
|
|
32
32
|
ELN_EXPERIMENT_COMPLETE = "eln.experiment.complete",
|
|
33
33
|
ELN_EXPERIMENT_LOCK = "eln.experiment.lock",
|
|
34
34
|
ELN_STEP_FORM_MODE = "eln.step.form.mode",
|
|
35
|
+
ELN_STEP_CONTROL = "eln.step.control",
|
|
35
36
|
PRE_PROCESS_SAVE_ENTITY = "pre_process_save_entity",
|
|
37
|
+
ADMINISTRATION_SETTINGS = "administration.settings",
|
|
38
|
+
ADMINISTRATION_SETTINGS_SECURITY = "administration.settings.security",
|
|
36
39
|
ADMINISTRATION_SETTINGS_ELN = "administration.settings.eln"
|
|
37
40
|
}
|
package/dist/plugin-types.js
CHANGED
|
@@ -36,6 +36,9 @@ var PLUGIN_TYPE;
|
|
|
36
36
|
PLUGIN_TYPE["ELN_EXPERIMENT_COMPLETE"] = "eln.experiment.complete";
|
|
37
37
|
PLUGIN_TYPE["ELN_EXPERIMENT_LOCK"] = "eln.experiment.lock";
|
|
38
38
|
PLUGIN_TYPE["ELN_STEP_FORM_MODE"] = "eln.step.form.mode";
|
|
39
|
+
PLUGIN_TYPE["ELN_STEP_CONTROL"] = "eln.step.control";
|
|
39
40
|
PLUGIN_TYPE["PRE_PROCESS_SAVE_ENTITY"] = "pre_process_save_entity";
|
|
41
|
+
PLUGIN_TYPE["ADMINISTRATION_SETTINGS"] = "administration.settings";
|
|
42
|
+
PLUGIN_TYPE["ADMINISTRATION_SETTINGS_SECURITY"] = "administration.settings.security";
|
|
40
43
|
PLUGIN_TYPE["ADMINISTRATION_SETTINGS_ELN"] = "administration.settings.eln";
|
|
41
44
|
})(PLUGIN_TYPE = exports.PLUGIN_TYPE || (exports.PLUGIN_TYPE = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scifeon/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
4
4
|
"description": "A tool for developing Apps for Scifeon.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Scifeon",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"aurelia-webpack-plugin": "4.0.0",
|
|
32
32
|
"chai": "4.3.6",
|
|
33
33
|
"chalk": "2.4.2",
|
|
34
|
-
"commander": "4.0.0",
|
|
35
34
|
"chokidar": "3.5.3",
|
|
35
|
+
"commander": "9.3.0",
|
|
36
36
|
"copy-webpack-plugin": "5.1.1",
|
|
37
37
|
"css-loader": "3.5.3",
|
|
38
38
|
"file-loader": "6.0.0",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"@types/node": "17.0.41",
|
|
70
70
|
"rimraf": "3.0.2"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { runChromeRecording } from "";
|
|
2
|
+
import { E2EUtils, ScifeonPage } from "@scifeon/e2e-test";
|
|
3
|
+
|
|
4
|
+
describe("Scaffold", () => {
|
|
5
|
+
let page: ScifeonPage;
|
|
6
|
+
|
|
7
|
+
before(async () => {
|
|
8
|
+
page = await E2EUtils.newPage();
|
|
9
|
+
await page.login("USER");
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("should execute Chrome Recording and assert ...", async () => {
|
|
13
|
+
await runChromeRecording(page);
|
|
14
|
+
|
|
15
|
+
const selector = "My selector";
|
|
16
|
+
const value = "My value";
|
|
17
|
+
await page.assert.textContains(selector, value);
|
|
18
|
+
});
|
|
19
|
+
});
|