@duetds/cli 2.8.23 → 2.9.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/package.json +2 -2
- package/src/index.js +18 -13
- package/templates/angular/12.2.16/package.file +1 -1
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts +6 -6
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-1-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/{angular-13-2-4-2-chromium-darwin.png → angular-2-chromium-darwin.png} +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-3-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-4-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/package.file +1 -1
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts +6 -6
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-1-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/{angular-13-2-4-2-chromium-darwin.png → angular-2-chromium-darwin.png} +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-3-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-4-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/package.file +1 -1
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-1-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-3-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-4-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-5-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/package.file +1 -1
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-1-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-3-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-4-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-5-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-1-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-3-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-4-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-5-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-1-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-3-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-4-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-5-chromium-darwin.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "This package includes Duet Design System CLI.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "LocalTapiola Services Ltd <duetdesignsystem@lahitapiola.fi>",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "33b2e4cbba17e0321d007954058c9968e513d9e6"
|
|
36
36
|
}
|
package/src/index.js
CHANGED
|
@@ -20,6 +20,7 @@ function parseArgumentsIntoOptions(rawArgs) {
|
|
|
20
20
|
"--git": Boolean,
|
|
21
21
|
"--install": Boolean,
|
|
22
22
|
"--title": String,
|
|
23
|
+
"--template": String,
|
|
23
24
|
"--version": String,
|
|
24
25
|
"-g": "--git",
|
|
25
26
|
"-i": "--install",
|
|
@@ -33,7 +34,7 @@ function parseArgumentsIntoOptions(rawArgs) {
|
|
|
33
34
|
return {
|
|
34
35
|
git: args["--git"] || false,
|
|
35
36
|
title: args._[0],
|
|
36
|
-
template: args
|
|
37
|
+
template: args["--template"],
|
|
37
38
|
runInstall: args["--install"] || true,
|
|
38
39
|
version: args["--version"] || false,
|
|
39
40
|
}
|
|
@@ -62,19 +63,23 @@ async function promptForMissingOptions(options) {
|
|
|
62
63
|
})
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
if (!options.version) {
|
|
67
|
+
questions.push({
|
|
68
|
+
type: "list",
|
|
69
|
+
name: "version",
|
|
70
|
+
message: "Which version would you like to use?",
|
|
71
|
+
choices: answers => versionObject[options.template ? options.template : answers.template.toLowerCase()],
|
|
72
|
+
})
|
|
73
|
+
}
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
if (!options.title) {
|
|
76
|
+
questions.push({
|
|
77
|
+
type: "input",
|
|
78
|
+
name: "title",
|
|
79
|
+
message: "Enter a name for this project",
|
|
80
|
+
default: defaultTitle,
|
|
81
|
+
})
|
|
82
|
+
}
|
|
78
83
|
|
|
79
84
|
if (!options.git) {
|
|
80
85
|
questions.push({
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@angular-eslint/template-parser": "12.7.0",
|
|
40
40
|
"@angular/cli": "12.2.16",
|
|
41
41
|
"@angular/compiler-cli": "12.2.16",
|
|
42
|
-
"@playwright/test": "1.
|
|
42
|
+
"@playwright/test": "1.25.0",
|
|
43
43
|
"@types/jest": "27.4.1",
|
|
44
44
|
"@types/node": "17.0.21",
|
|
45
45
|
"@typescript-eslint/eslint-plugin": "5.13.0",
|
|
@@ -7,7 +7,7 @@ import { test, expect } from '@playwright/test';
|
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
test('angular
|
|
10
|
+
test('angular test', async ({ page }, testInfo) => {
|
|
11
11
|
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
12
12
|
await page.waitForTimeout(1000 * testInfo.retry + 1)
|
|
13
13
|
await page.setViewportSize({ width: 1600, height: 1200 })
|
|
@@ -17,13 +17,13 @@ test('angular 13.2.4 test', async ({ page }, testInfo) => {
|
|
|
17
17
|
await page.goto("http://localhost:4200/");
|
|
18
18
|
await page.goto("http://localhost:4200/#/");
|
|
19
19
|
await page.locator('select');
|
|
20
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
20
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_1.png");
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
// Select 2
|
|
24
24
|
await page.locator('select').selectOption('2');
|
|
25
25
|
await page.waitForLoadState("networkidle")
|
|
26
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
26
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_2.png");
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
// Click input[type="number"]
|
|
@@ -31,19 +31,19 @@ test('angular 13.2.4 test', async ({ page }, testInfo) => {
|
|
|
31
31
|
await page.locator('input[type="number"]').fill('500');
|
|
32
32
|
await page.locator('#step1').click();
|
|
33
33
|
await page.waitForLoadState("networkidle")
|
|
34
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
34
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_3.png");
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
// summary loading
|
|
38
38
|
await page.locator('#step2').click();
|
|
39
39
|
await page.waitForLoadState("networkidle")
|
|
40
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
40
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_4.png");
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
// summary displaying
|
|
44
44
|
await page.locator('#step3').click();
|
|
45
45
|
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
46
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
46
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_5.png");
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@angular-eslint/template-parser": "^13.1.0",
|
|
40
40
|
"@angular/cli": "13.2.5",
|
|
41
41
|
"@angular/compiler-cli": "13.2.4",
|
|
42
|
-
"@playwright/test": "^1.
|
|
42
|
+
"@playwright/test": "^1.25.0",
|
|
43
43
|
"@types/jest": "^27.4.1",
|
|
44
44
|
"@types/node": "^17.0.21",
|
|
45
45
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
@@ -7,7 +7,7 @@ import { test, expect } from '@playwright/test';
|
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
test('angular
|
|
10
|
+
test('angular test', async ({ page }, testInfo) => {
|
|
11
11
|
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
12
12
|
await page.waitForTimeout(1000 * testInfo.retry + 1)
|
|
13
13
|
await page.setViewportSize({ width: 1600, height: 1200 })
|
|
@@ -17,13 +17,13 @@ test('angular 13.2.4 test', async ({ page }, testInfo) => {
|
|
|
17
17
|
await page.goto("http://localhost:4200/");
|
|
18
18
|
await page.goto("http://localhost:4200/#/");
|
|
19
19
|
await page.locator('select');
|
|
20
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
20
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_1.png");
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
// Select 2
|
|
24
24
|
await page.locator('select').selectOption('2');
|
|
25
25
|
await page.waitForLoadState("networkidle")
|
|
26
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
26
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_2.png");
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
// Click input[type="number"]
|
|
@@ -31,19 +31,19 @@ test('angular 13.2.4 test', async ({ page }, testInfo) => {
|
|
|
31
31
|
await page.locator('input[type="number"]').fill('500');
|
|
32
32
|
await page.locator('#step1').click();
|
|
33
33
|
await page.waitForLoadState("networkidle")
|
|
34
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
34
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_3.png");
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
// summary loading
|
|
38
38
|
await page.locator('#step2').click();
|
|
39
39
|
await page.waitForLoadState("networkidle")
|
|
40
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
40
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_4.png");
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
// summary displaying
|
|
44
44
|
await page.locator('#step3').click();
|
|
45
45
|
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
46
|
-
expect(await page.screenshot()).toMatchSnapshot("
|
|
46
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_5.png");
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|