@duetds/cli 4.1.5 → 4.1.7
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/templates/angular/18.1.0-standalone/.browserlistrc +16 -0
- package/templates/angular/18.1.0-standalone/.depcheckrc +2 -0
- package/templates/angular/18.1.0-standalone/.editorconfig +16 -0
- package/templates/angular/18.1.0-standalone/.eslintrc.json +52 -0
- package/templates/angular/18.1.0-standalone/.prettierignore +3 -0
- package/templates/angular/18.1.0-standalone/.prettierrc +14 -0
- package/templates/angular/18.1.0-standalone/LICENSE.md +29 -0
- package/templates/angular/18.1.0-standalone/README.md +32 -0
- package/templates/angular/18.1.0-standalone/angular.json +138 -0
- package/templates/angular/18.1.0-standalone/config/jest.base.ts +17 -0
- package/templates/angular/18.1.0-standalone/config/jest.setup.ts +24 -0
- package/templates/angular/18.1.0-standalone/package.file +59 -0
- package/templates/angular/18.1.0-standalone/playwright.config.ts +26 -0
- package/templates/angular/18.1.0-standalone/src/app/agreement.model.ts +3 -0
- package/templates/angular/18.1.0-standalone/src/app/app-routing.module.ts +11 -0
- package/templates/angular/18.1.0-standalone/src/app/app.component.html +5 -0
- package/templates/angular/18.1.0-standalone/src/app/app.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/app.component.ts +25 -0
- package/templates/angular/18.1.0-standalone/src/app/currency-formatter.service.ts +12 -0
- package/templates/angular/18.1.0-standalone/src/app/footer/footer.component.html +22 -0
- package/templates/angular/18.1.0-standalone/src/app/footer/footer.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/footer/footer.component.ts +12 -0
- package/templates/angular/18.1.0-standalone/src/app/header/header.component.html +1 -0
- package/templates/angular/18.1.0-standalone/src/app/header/header.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/header/header.component.ts +12 -0
- package/templates/angular/18.1.0-standalone/src/app/index-page/index-page.component.html +49 -0
- package/templates/angular/18.1.0-standalone/src/app/index-page/index-page.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/index-page/index-page.component.ts +74 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-amount/investment-amount.component.html +87 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-amount/investment-amount.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-amount/investment-amount.component.ts +41 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-origin/investment-origin.component.html +12 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-origin/investment-origin.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/investment-origin/investment-origin.component.ts +35 -0
- package/templates/angular/18.1.0-standalone/src/app/summary/summary.component.html +74 -0
- package/templates/angular/18.1.0-standalone/src/app/summary/summary.component.scss +0 -0
- package/templates/angular/18.1.0-standalone/src/app/summary/summary.component.ts +24 -0
- package/templates/angular/18.1.0-standalone/src/app/value-accessors.ts +156 -0
- package/templates/angular/18.1.0-standalone/src/assets/.gitkeep +0 -0
- package/templates/angular/18.1.0-standalone/src/assets/img/android-chrome-192x192.png +0 -0
- package/templates/angular/18.1.0-standalone/src/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/angular/18.1.0-standalone/src/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/angular/18.1.0-standalone/src/environments/environment.prod.ts +3 -0
- package/templates/angular/18.1.0-standalone/src/environments/environment.ts +16 -0
- package/templates/angular/18.1.0-standalone/src/favicon.ico +0 -0
- package/templates/angular/18.1.0-standalone/src/index.html +24 -0
- package/templates/angular/18.1.0-standalone/src/main.ts +35 -0
- package/templates/angular/18.1.0-standalone/src/manifest.json +19 -0
- package/templates/angular/18.1.0-standalone/src/polyfills.ts +62 -0
- package/templates/angular/18.1.0-standalone/src/styles.scss +3 -0
- package/templates/angular/18.1.0-standalone/src/tests/app.test.ts +13 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts +54 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/angular-1-chromium-darwin.png +0 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/angular-2-chromium-darwin.png +0 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/angular-3-chromium-darwin.png +0 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/angular-4-chromium-darwin.png +0 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
- package/templates/angular/18.1.0-standalone/src/tests/playwright/playwright.test.ts-snapshots/code-chromium-darwin.json +16 -0
- package/templates/angular/18.1.0-standalone/src/utils/string.utils.ts +1 -0
- package/templates/angular/18.1.0-standalone/tsconfig.app.json +9 -0
- package/templates/angular/18.1.0-standalone/tsconfig.base.json +17 -0
- package/templates/angular/18.1.0-standalone/tsconfig.json +9 -0
- package/templates/angular/18.1.0-standalone/tsconfig.spec.json +15 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/guide/browser-support
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
22
|
+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Web Animations `@angular/platform-browser/animations`
|
|
26
|
+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
27
|
+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
28
|
+
*/
|
|
29
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
33
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
34
|
+
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
35
|
+
* will put import in the top of bundle, so user need to create a separate file
|
|
36
|
+
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
37
|
+
* into that file, and then add the following code before importing zone.js.
|
|
38
|
+
* import './zone-flags';
|
|
39
|
+
*
|
|
40
|
+
* The flags allowed in zone-flags.ts are listed here.
|
|
41
|
+
*
|
|
42
|
+
* The following flags will work for all browsers.
|
|
43
|
+
*
|
|
44
|
+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
45
|
+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
46
|
+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
47
|
+
*
|
|
48
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
49
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
50
|
+
*
|
|
51
|
+
* (window as any).__Zone_enable_cross_context_check = true;
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/***************************************************************************************************
|
|
56
|
+
* Zone JS is required by default for Angular itself.
|
|
57
|
+
*/
|
|
58
|
+
import "zone.js" // Included with Angular CLI.
|
|
59
|
+
|
|
60
|
+
/***************************************************************************************************
|
|
61
|
+
* APPLICATION IMPORTS
|
|
62
|
+
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {currencyFormatFI} from "../utils/string.utils"
|
|
2
|
+
|
|
3
|
+
describe('Example test of the jest setup running', () => {
|
|
4
|
+
test('formatter should format correctly', () => {
|
|
5
|
+
console.log(currencyFormatFI)
|
|
6
|
+
const formatStub = currencyFormatFI.format(12.90)
|
|
7
|
+
expect(formatStub).toBe("12,90 €")
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test('Should do another thing', () => {
|
|
11
|
+
// do something...
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.use({
|
|
4
|
+
viewport: { width: 1800, height: 2500 },
|
|
5
|
+
bypassCSP: true,
|
|
6
|
+
deviceScaleFactor: 1,
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
test('angular test', async ({ page }, testInfo) => {
|
|
11
|
+
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
12
|
+
await page.waitForTimeout(1000 * testInfo.retry + 1)
|
|
13
|
+
await page.setViewportSize({ width: 1600, height: 1200 })
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// initial loading
|
|
17
|
+
await page.goto("http://localhost:4200/");
|
|
18
|
+
await page.goto("http://localhost:4200/#/");
|
|
19
|
+
await page.locator('select');
|
|
20
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_1.png", {maxDiffPixelRatio: 0.01});
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// Select 2
|
|
24
|
+
await page.locator('select').selectOption('2');
|
|
25
|
+
await page.waitForLoadState("networkidle")
|
|
26
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_2.png", {maxDiffPixelRatio: 0.01});
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
// Click input[type="number"]
|
|
30
|
+
await page.locator('input[type="number"]').click();
|
|
31
|
+
await page.locator('input[type="number"]').fill('500');
|
|
32
|
+
await page.locator('#step1').click();
|
|
33
|
+
await page.waitForLoadState("networkidle")
|
|
34
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_3.png", {maxDiffPixelRatio: 0.01});
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
// summary loading
|
|
38
|
+
await page.locator('#step2').click();
|
|
39
|
+
await page.waitForLoadState("networkidle")
|
|
40
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_4.png", {maxDiffPixelRatio: 0.01});
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// summary displaying
|
|
44
|
+
await page.locator('#step3').click();
|
|
45
|
+
await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
|
|
46
|
+
expect(await page.screenshot()).toMatchSnapshot("angular_5.png", {maxDiffPixelRatio: 0.01});
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Click code, store json
|
|
51
|
+
await page.locator('code').click();
|
|
52
|
+
expect(await page.textContent('code')).toMatchSnapshot('code.json');
|
|
53
|
+
|
|
54
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"investmentAmount": {
|
|
3
|
+
"agreement": "2",
|
|
4
|
+
"additionalInvestment": 500
|
|
5
|
+
},
|
|
6
|
+
"investmentOrigin": {
|
|
7
|
+
"salary": false,
|
|
8
|
+
"gift": false,
|
|
9
|
+
"heritage": false,
|
|
10
|
+
"entrepreneurialIncome": false,
|
|
11
|
+
"assets": false,
|
|
12
|
+
"otherIncome": false,
|
|
13
|
+
"investment": false,
|
|
14
|
+
"extras": null
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const currencyFormatFI = new Intl.NumberFormat("fi-FI", { style: "currency", currency: "EUR" })
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"esModuleInterop":true,
|
|
5
|
+
"baseUrl": "./",
|
|
6
|
+
"outDir": "./dist/out-tsc",
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"declaration": false,
|
|
9
|
+
"downlevelIteration": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"target": "es2015",
|
|
14
|
+
"module": "es2020",
|
|
15
|
+
"lib": ["es2018", "dom"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/app",
|
|
5
|
+
"types": ["jest","jest-image-snapshot","node"],
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"emitDecoratorMetadata": true
|
|
8
|
+
},
|
|
9
|
+
"files": ["src/main.ts", "src/polyfills.ts"],
|
|
10
|
+
"include": ["src/**/*.d.ts",
|
|
11
|
+
"src/**/*.spec.ts",
|
|
12
|
+
"src/**/*.test.ts",
|
|
13
|
+
"src/**/*.spec.tsx",
|
|
14
|
+
"src/**/*.test.tsx"]
|
|
15
|
+
}
|