plum-e2e 1.0.0 โ 1.0.2
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/bin/plum.js +27 -17
- package/package.json +1 -1
package/bin/plum.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
* This file is part of Plum.
|
|
4
4
|
*
|
|
@@ -60,9 +60,9 @@ function copyEnvFile() {
|
|
|
60
60
|
try {
|
|
61
61
|
if (fs.existsSync(rootEnvPath)) {
|
|
62
62
|
fse.copySync(rootEnvPath, backendEnvPath);
|
|
63
|
-
console.log('.env file copied to the backend folder.\n');
|
|
63
|
+
console.log('๐ฆ .env file copied to the backend folder.\n');
|
|
64
64
|
} else {
|
|
65
|
-
console.log('.env file not found in the root directory.\n');
|
|
65
|
+
console.log('โ ๏ธ .env file not found in the root directory.\n');
|
|
66
66
|
}
|
|
67
67
|
} catch (err) {
|
|
68
68
|
console.error('Error copying .env file:', err);
|
|
@@ -77,28 +77,38 @@ function copyEnvFile() {
|
|
|
77
77
|
* ------------------------------------------------------ */
|
|
78
78
|
switch (command) {
|
|
79
79
|
case 'init':
|
|
80
|
-
console.log('
|
|
81
|
-
console.log('๐ฃ
|
|
80
|
+
console.log('--------------------------------------\n');
|
|
81
|
+
console.log('๐ฃ Preparing Plum...\n');
|
|
82
82
|
|
|
83
83
|
if (fs.existsSync(userTestsPath)) {
|
|
84
84
|
console.log('โ ๏ธ A `tests/` folder already exists.\n');
|
|
85
85
|
} else {
|
|
86
|
-
console.log('
|
|
86
|
+
console.log('๐ฆ Creating test scaffold...\n');
|
|
87
87
|
fse.copySync(scaffoldTestsPath, userTestsPath);
|
|
88
88
|
console.log('โ
`tests/` initialized with example files.\n');
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// Create .env file with default values
|
|
92
92
|
createEnvFile();
|
|
93
|
+
|
|
94
|
+
// Initialize project
|
|
95
|
+
console.log('--------------------------------------\n');
|
|
96
|
+
console.log('๐ Initializing Plum...');
|
|
97
|
+
execSync('npm run init', {
|
|
98
|
+
cwd: plumRoot,
|
|
99
|
+
stdio: 'inherit'
|
|
100
|
+
});
|
|
101
|
+
|
|
93
102
|
console.log(
|
|
94
|
-
'๐ฃ Plum is now ready!\n\n Scaffold test cases are included in the `tests/` folder.\n For more information about Cucumber, visit: https://cucumber.io/\n\n - To start the server, run:\n `plum start` \n\n - If you are developing locally, run:\n `plum
|
|
103
|
+
'๐ฃ Plum is now ready!\n\n Scaffold test cases are included in the `tests/` folder.\n For more information about Cucumber, visit: https://cucumber.io/\n\n - To start the server, run:\n `plum start` \n\n - If you are developing locally, run:\n `plum dev <@tag/blank if you want to run all tests>`'
|
|
95
104
|
);
|
|
96
|
-
console.log('
|
|
105
|
+
console.log('--------------------------------------\n');
|
|
97
106
|
break;
|
|
98
107
|
|
|
99
108
|
case 'start':
|
|
100
|
-
console.log('
|
|
101
|
-
|
|
109
|
+
console.log('--------------------------------------\n');
|
|
110
|
+
|
|
111
|
+
console.log('๐ Running Plum via Docker Compose...');
|
|
102
112
|
|
|
103
113
|
// Copy .env file from root to backend
|
|
104
114
|
copyEnvFile();
|
|
@@ -124,12 +134,12 @@ switch (command) {
|
|
|
124
134
|
cwd: plumRoot,
|
|
125
135
|
stdio: 'inherit'
|
|
126
136
|
});
|
|
127
|
-
console.log('
|
|
137
|
+
console.log('--------------------------------------\n');
|
|
128
138
|
break;
|
|
129
139
|
|
|
130
|
-
case '
|
|
140
|
+
case 'dev': {
|
|
131
141
|
console.log('--------------------------------------\n');
|
|
132
|
-
console.log('๐ Running Plum
|
|
142
|
+
console.log('๐ Running Plum in Development Mode...');
|
|
133
143
|
|
|
134
144
|
// Copy .env file from root to backend
|
|
135
145
|
copyEnvFile();
|
|
@@ -177,12 +187,12 @@ switch (command) {
|
|
|
177
187
|
TRIGGER: 'command-line-trigger'
|
|
178
188
|
}
|
|
179
189
|
});
|
|
180
|
-
console.log('
|
|
190
|
+
console.log('--------------------------------------\n');
|
|
181
191
|
break;
|
|
182
192
|
}
|
|
183
193
|
|
|
184
194
|
default:
|
|
185
|
-
console.log('
|
|
186
|
-
console.log('Usage: plum <init|start|
|
|
187
|
-
console.log('
|
|
195
|
+
console.log('--------------------------------------\n');
|
|
196
|
+
console.log('Usage: plum <init|start|dev>');
|
|
197
|
+
console.log('--------------------------------------\n');
|
|
188
198
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plum-e2e",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A detached test automation environment that combines Playwright and Cucumber with a Svelte frontend and an Express backend. It allows users to trigger tests, monitor reports, and schedule test runs through an intuitive UI.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|