@pega/custom-dx-components 0.25.19 → 0.25.20
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/package.json +1 -1
- package/src/tasks/build-jest-assets/index.js +5 -5
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/show-status/index.js +10 -6
- package/src/util.js +54 -0
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/functional/localCreateAllListDeleteAll.test.js +8 -8
- package/tests/functional/localLibCreateLibAlreadyDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibExportImportLib.test.js +27 -27
- package/tests/functional/localLibCreateLibExportLib.test.js +19 -19
- package/tests/functional/localLibCreateLibImportCompDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibListDeleteLib.test.js +22 -22
- package/tests/functional/localLibCreateLibListMoveDeleteLib.test.js +31 -31
- package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +13 -29
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +15 -15
- package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +27 -27
- package/tests/functional/localLibCreateLibPermDeleteLib.test.js +0 -144
|
@@ -12,13 +12,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -79,13 +79,13 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
it(`npm run createLib - ${
|
|
82
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
83
83
|
|
|
84
84
|
const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
|
|
85
|
-
const compConf = path.join("store", "Pega_Other","0.0.1
|
|
85
|
+
const compConf = path.join("store", "Pega_Other","0.0.1", "componentsconfig.json");
|
|
86
86
|
|
|
87
87
|
const { stdout, stderr } = await exec(script);
|
|
88
|
-
expect(stdout).toContain('Library Pega_Other/0.0.1
|
|
88
|
+
expect(stdout).toContain('Library Pega_Other/0.0.1 has been created!');
|
|
89
89
|
|
|
90
90
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
|
94
94
|
}, 30000);
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
it(`npm run importComponent - ${
|
|
97
|
+
it(`npm run importComponent - ${isLibraryBasedCL}`, async() => {
|
|
98
98
|
const assetDir = path.resolve(`tests/assets/${compType}/components/createAll/${serverDir}`);
|
|
99
99
|
|
|
100
100
|
// pulling in DXIL MyBoolean but should be renamed to Other MyBoolean
|
|
@@ -117,9 +117,9 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
|
|
|
117
117
|
// done();
|
|
118
118
|
}, 10000);
|
|
119
119
|
|
|
120
|
-
it(`npm run deleteLib - ${
|
|
120
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
121
121
|
|
|
122
|
-
const script = `npm run deleteLib Pega_Other 0.0.1
|
|
122
|
+
const script = `npm run deleteLib Pega_Other 0.0.1 Y --prefix ../../..`;
|
|
123
123
|
const { stdout, stderr } = await exec(script);
|
|
124
124
|
|
|
125
125
|
expect(stdout).toContain('Pega_Other is deleted from Local.');
|
|
@@ -12,13 +12,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -79,13 +79,13 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
it(`npm run createLib (other) - ${
|
|
82
|
+
it(`npm run createLib (other) - ${isLibraryBasedCL}`, async() => {
|
|
83
83
|
|
|
84
84
|
const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
|
|
85
|
-
const compConf = path.join("store", "Pega_Other","0.0.1
|
|
85
|
+
const compConf = path.join("store", "Pega_Other","0.0.1", "componentsconfig.json");
|
|
86
86
|
|
|
87
87
|
const { stdout, stderr } = await exec(script);
|
|
88
|
-
expect(stdout).toContain('Library Pega_Other/0.0.1
|
|
88
|
+
expect(stdout).toContain('Library Pega_Other/0.0.1 has been created!');
|
|
89
89
|
|
|
90
90
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
91
91
|
|
|
@@ -93,13 +93,13 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
93
93
|
|
|
94
94
|
}, 30000);
|
|
95
95
|
|
|
96
|
-
it(`npm run createLib (DXIL) - ${
|
|
96
|
+
it(`npm run createLib (DXIL) - ${isLibraryBasedCL}`, async() => {
|
|
97
97
|
|
|
98
98
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
99
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
99
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
100
100
|
|
|
101
101
|
const { stdout, stderr } = await exec(script);
|
|
102
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
102
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
103
103
|
|
|
104
104
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
105
105
|
|
|
@@ -223,10 +223,10 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
223
223
|
const assetFileData = fs.readFileSync(assetFilePath, { encoding: 'utf8' });
|
|
224
224
|
|
|
225
225
|
// so that we don't have to generate all new assets, change "version"
|
|
226
|
-
// from 0.0.1
|
|
226
|
+
// from 0.0.1 to 0.0.1 for now
|
|
227
227
|
if (file === "config.json") {
|
|
228
|
-
expect(componentFileData).toContain("0.0.1
|
|
229
|
-
// componentFileData = componentFileData.replace("0.0.1
|
|
228
|
+
expect(componentFileData).toContain("0.0.1");
|
|
229
|
+
// componentFileData = componentFileData.replace("0.0.1", "0.0.1");
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
expect(componentFileData).toEqual(assetFileData);
|
|
@@ -234,22 +234,22 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
|
|
|
234
234
|
});
|
|
235
235
|
}, 10000);
|
|
236
236
|
|
|
237
|
-
it(`npm run deleteLibVersion - ${
|
|
237
|
+
it(`npm run deleteLibVersion - ${isLibraryBasedCL}`, async() => {
|
|
238
238
|
|
|
239
239
|
// since only version, will delete the lib as well
|
|
240
240
|
|
|
241
|
-
const script = `npm run deleteLibVersion Pega_DXIL 0.0.1
|
|
241
|
+
const script = `npm run deleteLibVersion Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
242
242
|
const { stdout, stderr } = await exec(script);
|
|
243
243
|
|
|
244
244
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
245
|
-
expect(stdout).toContain('Switched to Pega_Other/0.0.1
|
|
245
|
+
expect(stdout).toContain('Switched to Pega_Other/0.0.1');
|
|
246
246
|
|
|
247
247
|
|
|
248
248
|
}, 50000);
|
|
249
249
|
|
|
250
|
-
it(`npm run deleteLib - ${
|
|
250
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
251
251
|
|
|
252
|
-
const script = `npm run deleteLib Pega_Other 0.0.1
|
|
252
|
+
const script = `npm run deleteLib Pega_Other 0.0.1 Y --prefix ../../..`;
|
|
253
253
|
const { stdout, stderr } = await exec(script);
|
|
254
254
|
|
|
255
255
|
expect(stdout).toContain('Pega_Other is deleted from Local.');
|
|
@@ -12,13 +12,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
describe(`createLib createAll list createVersion switchVersion move deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -78,13 +78,13 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
78
78
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
it(`npm run createLib - ${
|
|
81
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
82
82
|
|
|
83
83
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
84
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
84
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
85
85
|
|
|
86
86
|
const { stdout, stderr } = await exec(script);
|
|
87
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
87
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
88
88
|
|
|
89
89
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
90
90
|
|
|
@@ -163,67 +163,67 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
it(`npm run createLibVersion and NO copy - ${
|
|
166
|
+
it(`npm run createLibVersion and NO copy - ${isLibraryBasedCL}`, async() => {
|
|
167
167
|
|
|
168
168
|
const script = `npm run createLibVersion 0.0.2 N N NoAbout --prefix ../../..`;
|
|
169
169
|
const { stdout, stderr } = await exec(script);
|
|
170
170
|
|
|
171
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
172
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.2
|
|
171
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been stored.');
|
|
172
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.2 has been created!');
|
|
173
173
|
|
|
174
174
|
}, 50000);
|
|
175
175
|
|
|
176
|
-
it(`npm run switchLibVersion - ${
|
|
176
|
+
it(`npm run switchLibVersion - ${isLibraryBasedCL}`, async() => {
|
|
177
177
|
// we are at version 0.0.2, switch to 0.0.1
|
|
178
|
-
const script = `npm run switchLibVersion Y 0.0.1
|
|
178
|
+
const script = `npm run switchLibVersion Y 0.0.1 NoAbout --prefix ../../..`;
|
|
179
179
|
const { stdout, stderr } = await exec(script);
|
|
180
180
|
|
|
181
|
-
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1
|
|
181
|
+
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1!');
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
}, 50000);
|
|
185
185
|
|
|
186
|
-
it(`npm run move (move) - ${
|
|
186
|
+
it(`npm run move (move) - ${isLibraryBasedCL}`, async() => {
|
|
187
187
|
// move a component to version 0.0.2
|
|
188
|
-
const script = `npm run move Move Pega_DXIL_MyCurrency Pega_DXIL 0.0.2
|
|
188
|
+
const script = `npm run move Move Pega_DXIL_MyCurrency Pega_DXIL 0.0.2 Y --prefix ../../..`;
|
|
189
189
|
const { stdout, stderr } = await exec(script);
|
|
190
190
|
|
|
191
|
-
expect(stdout).toContain('Moved Pega_DXIL_MyCurrency to Pega_DXIL/0.0.2
|
|
191
|
+
expect(stdout).toContain('Moved Pega_DXIL_MyCurrency to Pega_DXIL/0.0.2 as Pega_DXIL_MyCurrency');
|
|
192
192
|
|
|
193
193
|
}, 50000);
|
|
194
194
|
|
|
195
|
-
it(`npm run move (copy) - ${
|
|
195
|
+
it(`npm run move (copy) - ${isLibraryBasedCL}`, async() => {
|
|
196
196
|
// copy a component to version 0.0.2
|
|
197
|
-
const script = `npm run move Copy Pega_DXIL_MyDetails Pega_DXIL 0.0.2
|
|
197
|
+
const script = `npm run move Copy Pega_DXIL_MyDetails Pega_DXIL 0.0.2 Y --prefix ../../..`;
|
|
198
198
|
const { stdout, stderr } = await exec(script);
|
|
199
199
|
|
|
200
|
-
expect(stdout).toContain('Copied Pega_DXIL_MyDetails to Pega_DXIL/0.0.2
|
|
200
|
+
expect(stdout).toContain('Copied Pega_DXIL_MyDetails to Pega_DXIL/0.0.2 as Pega_DXIL_MyDetails');
|
|
201
201
|
|
|
202
202
|
}, 50000);
|
|
203
203
|
|
|
204
|
-
it(`npm run listLib (0.0.2) - ${
|
|
205
|
-
// list 0.0.2
|
|
206
|
-
const script = `npm run listLib Pega_DXIL 0.0.2
|
|
204
|
+
it(`npm run listLib (0.0.2) - ${isLibraryBasedCL}`, async() => {
|
|
205
|
+
// list 0.0.2 and verify it is there
|
|
206
|
+
const script = `npm run listLib Pega_DXIL 0.0.2 --prefix ../../..`;
|
|
207
207
|
const { stdout, stderr } = await exec(script);
|
|
208
208
|
|
|
209
209
|
expect(stdout).toContain('Pega_DXIL_MyCurrency');
|
|
210
210
|
expect(stdout).toContain('Pega_DXIL_MyDetails');
|
|
211
|
-
expect(stdout).toContain('0.0.2
|
|
211
|
+
expect(stdout).toContain('0.0.2');
|
|
212
212
|
|
|
213
213
|
}, 30000);
|
|
214
214
|
|
|
215
|
-
it(`npm run list (0.0.1) - ${
|
|
216
|
-
// list 0.0.2
|
|
215
|
+
it(`npm run list (0.0.1) - ${isLibraryBasedCL}`, async() => {
|
|
216
|
+
// list 0.0.2 and verify it is there
|
|
217
217
|
const script = `npm run list --prefix ../../..`;
|
|
218
218
|
const { stdout, stderr } = await exec(script);
|
|
219
219
|
|
|
220
220
|
expect(stdout).not.toContain('Pega_DXIL_MyCurrency');
|
|
221
221
|
expect(stdout).toContain('Pega_DXIL_MyDetails');
|
|
222
|
-
expect(stdout).toContain('0.0.1
|
|
222
|
+
expect(stdout).toContain('0.0.1');
|
|
223
223
|
|
|
224
224
|
}, 40000);
|
|
225
225
|
|
|
226
|
-
it(`npm run deleteLib - ${
|
|
226
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
227
227
|
|
|
228
228
|
const script = `npm run deleteLib Pega_DXIL ALL Y --prefix ../../..`;
|
|
229
229
|
const { stdout, stderr } = await exec(script);
|
|
@@ -12,13 +12,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -74,14 +74,14 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
it(`npm run createLib - ${
|
|
77
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
81
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
81
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
82
82
|
|
|
83
83
|
const { stdout, stderr } = await exec(script);
|
|
84
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
84
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
85
85
|
|
|
86
86
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
87
87
|
|
|
@@ -158,13 +158,13 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
158
158
|
// done();
|
|
159
159
|
}, 10000);
|
|
160
160
|
|
|
161
|
-
it(`npm run createLib other - ${
|
|
161
|
+
it(`npm run createLib other - ${isLibraryBasedCL}`, async() => {
|
|
162
162
|
|
|
163
163
|
const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
|
|
164
|
-
const compConf = path.join("store", "Pega_Other","0.0.1
|
|
164
|
+
const compConf = path.join("store", "Pega_Other","0.0.1", "componentsconfig.json");
|
|
165
165
|
|
|
166
166
|
const { stdout, stderr } = await exec(script);
|
|
167
|
-
expect(stdout).toContain('Library Pega_Other/0.0.1
|
|
167
|
+
expect(stdout).toContain('Library Pega_Other/0.0.1 has been created!');
|
|
168
168
|
|
|
169
169
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
170
170
|
|
|
@@ -172,12 +172,12 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
172
172
|
|
|
173
173
|
}, 30000);
|
|
174
174
|
|
|
175
|
-
it(`npm run switchLib DXIL - ${
|
|
175
|
+
it(`npm run switchLib DXIL - ${isLibraryBasedCL}`, async() => {
|
|
176
176
|
|
|
177
|
-
const script = `npm run switchLib Pega_DXIL 0.0.1
|
|
177
|
+
const script = `npm run switchLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
178
178
|
|
|
179
179
|
const { stdout, stderr } = await exec(script);
|
|
180
|
-
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1
|
|
180
|
+
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1!');
|
|
181
181
|
|
|
182
182
|
}, 30000);
|
|
183
183
|
|
|
@@ -218,14 +218,14 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
218
218
|
}, 10000);
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
it(`npm run deleteLib - ${
|
|
221
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
222
222
|
|
|
223
|
-
let script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
223
|
+
let script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
224
224
|
let { stdout, stderr } = await exec(script);
|
|
225
225
|
|
|
226
226
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
227
227
|
|
|
228
|
-
script = `npm run deleteLib Pega_Other 0.0.1
|
|
228
|
+
script = `npm run deleteLib Pega_Other 0.0.1 Y --prefix ../../..`;
|
|
229
229
|
({ stdout, stderr } = await exec(script));
|
|
230
230
|
|
|
231
231
|
expect(stdout).toContain('Pega_Other is deleted from Local.');
|
|
@@ -12,13 +12,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -79,13 +79,13 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
it(`npm run createLib - ${
|
|
82
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
83
83
|
|
|
84
84
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
85
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
85
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
86
86
|
|
|
87
87
|
const { stdout, stderr } = await exec(script);
|
|
88
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
88
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
89
89
|
|
|
90
90
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
91
91
|
|
|
@@ -162,27 +162,11 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
162
162
|
// done();
|
|
163
163
|
}, 10000);
|
|
164
164
|
|
|
165
|
-
it(`npm run deleteLib- ${isLibraryBased}`, async() => {
|
|
166
165
|
|
|
167
|
-
const script = `npm run showStatus --prefix ../../..`;
|
|
168
|
-
const { stdout, stderr } = await exec(script);
|
|
169
|
-
|
|
170
|
-
expect(stdout).toContain('Organization:');
|
|
171
|
-
expect(stdout).toContain('Pega');
|
|
172
|
-
expect(stdout).toContain('Library:');
|
|
173
|
-
expect(stdout).toContain('DXIL');
|
|
174
|
-
expect(stdout).toContain('Version:');
|
|
175
|
-
expect(stdout).toContain('0.0.1-dev');
|
|
176
|
-
expect(stdout).toContain('Permanent:');
|
|
177
|
-
expect(stdout).toContain('false');
|
|
178
|
-
expect(stdout).toContain('Component count:');
|
|
179
|
-
expect(stdout).toContain('26');
|
|
180
|
-
|
|
181
|
-
}, 30000);
|
|
182
166
|
|
|
183
|
-
it(`npm run deleteLib- ${
|
|
167
|
+
it(`npm run deleteLib- ${isLibraryBasedCL}`, async() => {
|
|
184
168
|
|
|
185
|
-
const script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
169
|
+
const script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
186
170
|
const { stdout, stderr } = await exec(script);
|
|
187
171
|
|
|
188
172
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
@@ -13,13 +13,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
13
13
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
14
14
|
let packageJSON = JSON.parse(packageJSONData);
|
|
15
15
|
|
|
16
|
-
let
|
|
17
|
-
const savedLibraryBased =
|
|
16
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
17
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
18
18
|
const savedOrganization = packageJSON.organization;
|
|
19
19
|
|
|
20
20
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
21
21
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
22
|
-
let compType =
|
|
22
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -27,9 +27,9 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
27
27
|
beforeAll( async() => {
|
|
28
28
|
|
|
29
29
|
// make libraryBased
|
|
30
|
-
|
|
31
|
-
tasksConfigJSON['
|
|
32
|
-
compType =
|
|
30
|
+
isLibraryBasedCL = true;
|
|
31
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
32
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
33
33
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
34
34
|
|
|
35
35
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -56,8 +56,8 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
56
56
|
afterAll( async() => {
|
|
57
57
|
|
|
58
58
|
//restore
|
|
59
|
-
|
|
60
|
-
tasksConfigJSON['
|
|
59
|
+
isLibraryBasedCL = savedLibraryBased
|
|
60
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
61
61
|
|
|
62
62
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
63
63
|
|
|
@@ -76,13 +76,13 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
it(`npm run createLib - ${
|
|
79
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
80
80
|
|
|
81
81
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
82
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
82
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
83
83
|
|
|
84
84
|
const { stdout, stderr } = await exec(script);
|
|
85
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
85
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
86
86
|
|
|
87
87
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
88
88
|
|
|
@@ -186,7 +186,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
186
186
|
// }
|
|
187
187
|
}, 10000);
|
|
188
188
|
|
|
189
|
-
it(`npm run validate Pega_DXIL_MyTestText - ${
|
|
189
|
+
it(`npm run validate Pega_DXIL_MyTestText - ${isLibraryBasedCL}`, async() => {
|
|
190
190
|
|
|
191
191
|
const script = `npm run validate Pega_DXIL_MyTestText --prefix ../../..`;
|
|
192
192
|
const { stdout, stderr } = await exec(script);
|
|
@@ -196,7 +196,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
196
196
|
|
|
197
197
|
}, 200000);
|
|
198
198
|
|
|
199
|
-
it(`npm run validateAll - ${
|
|
199
|
+
it(`npm run validateAll - ${isLibraryBasedCL}`, async() => {
|
|
200
200
|
|
|
201
201
|
const script = `npm run validateAll --prefix ../../..`;
|
|
202
202
|
const { stdout, stderr } = await exec(script);
|
|
@@ -211,9 +211,9 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
211
211
|
}, 200000);
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
it(`npm run deleteLib - ${
|
|
214
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
215
215
|
|
|
216
|
-
const script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
216
|
+
const script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
217
217
|
const { stdout, stderr } = await exec(script);
|
|
218
218
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
219
219
|
|