Skip to content

Commit 0b720be

Browse files
Merge pull request #102 from muratkeremozcan/q/feature/upgrade_repo_to_current
Q/feature/upgrade repo to current
2 parents d201a73 + 3970e47 commit 0b720be

File tree

75 files changed

+50780
-16115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+50780
-16115
lines changed

angular.json

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": "4733bdc6-4499-456d-a65e-edf55e5fe368"
5+
},
36
"version": 1,
47
"newProjectRoot": "projects",
58
"projects": {
@@ -35,7 +38,6 @@
3538
"optimization": true,
3639
"outputHashing": "all",
3740
"sourceMap": false,
38-
"extractCss": true,
3941
"namedChunks": false,
4042
"extractLicenses": true,
4143
"vendorChunk": false,
@@ -53,6 +55,32 @@
5355
],
5456
"serviceWorker": true,
5557
"ngswConfigPath": "ngsw-config.json"
58+
},
59+
"dev": {
60+
"fileReplacements": [{
61+
"replace": "src/environments/environment.ts",
62+
"with": "src/environments/environment.dev.ts"
63+
}],
64+
"optimization": false,
65+
"outputHashing": "all",
66+
"sourceMap": true,
67+
"namedChunks": true,
68+
"extractLicenses": false,
69+
"vendorChunk": true,
70+
"buildOptimizer": false,
71+
"budgets": [{
72+
"type": "initial",
73+
"maximumWarning": "2mb",
74+
"maximumError": "5mb"
75+
},
76+
{
77+
"type": "anyComponentStyle",
78+
"maximumWarning": "6kb",
79+
"maximumError": "10kb"
80+
}
81+
],
82+
"serviceWorker": true,
83+
"ngswConfigPath": "ngsw-config.json"
5684
}
5785
}
5886
},
@@ -65,6 +93,9 @@
6593
"configurations": {
6694
"production": {
6795
"browserTarget": "angular-unit-testing:build:production"
96+
},
97+
"dev": {
98+
"browserTarget": "angular-unit-testing:build:dev"
6899
}
69100
}
70101
},
@@ -77,7 +108,7 @@
77108
"test": {
78109
"builder": "@angular-builders/jest:run",
79110
"options": {
80-
"polyfills": "src/polyfills.ts",
111+
"polyfills": ["src/polyfills.ts"],
81112
"tsConfig": "tsconfig.spec.json",
82113
"assets": [
83114
"src/favicon.ico",
@@ -99,4 +130,4 @@
99130
}
100131
},
101132
"defaultProject": "angular-unit-testing"
102-
}
133+
}

cypress.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { defineConfig } from "cypress";
2+
import * as cyExtendsTask from "@bahmutov/cypress-extends";
3+
import * as cyCodeCoverageTask from "@cypress/code-coverage/task";
4+
5+
export default defineConfig({
6+
projectId: "4mhoqq",
7+
chromeWebSecurity: false,
8+
retries: {
9+
runMode: 2,
10+
openMode: 0,
11+
},
12+
videoUploadOnPasses: false,
13+
e2e: {
14+
setupNodeEvents(on, config) {
15+
// implement node event listeners here
16+
return Object.assign(
17+
{},
18+
cyCodeCoverageTask(on, config),
19+
cyExtendsTask(config.configFile)
20+
);
21+
},
22+
baseUrl: "http://localhost:4200",
23+
specPattern: "cypress/e2e/**/*.ts",
24+
},
25+
component: {
26+
devServer: {
27+
framework: "angular",
28+
bundler: "webpack",
29+
},
30+
specPattern: "**/*.cy.ts",
31+
},
32+
});

cypress.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

cypress/config/dev.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig } from 'cypress';
2+
import * as cyExtendsTask from '@bahmutov/cypress-extends';
3+
import * as cyCodeCoverageTask from '@cypress/code-coverage/task';
4+
5+
export default defineConfig({
6+
projectId: '4mhoqq',
7+
chromeWebSecurity: false,
8+
retries: {
9+
runMode: 2,
10+
openMode: 0
11+
},
12+
videoUploadOnPasses: false,
13+
e2e: {
14+
setupNodeEvents(on, config) {
15+
// implement node event listeners here
16+
return Object.assign({}, cyCodeCoverageTask(on, config), cyExtendsTask(config.configFile));
17+
},
18+
baseUrl: 'https://d1kaucldkbcik4.cloudfront.net',
19+
specPattern: 'cypress/e2e/**/*.ts'
20+
}
21+
});

cypress/config/dev.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config/local.config.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { defineConfig } from "cypress";
2+
import * as cyExtendsTask from "@bahmutov/cypress-extends";
3+
import * as cyCodeCoverageTask from "@cypress/code-coverage/task";
4+
5+
export default defineConfig({
6+
projectId: "4mhoqq",
7+
chromeWebSecurity: false,
8+
9+
retries: {
10+
runMode: 2,
11+
openMode: 0,
12+
},
13+
14+
videoUploadOnPasses: false,
15+
16+
e2e: {
17+
setupNodeEvents(on, config) {
18+
// implement node event listeners here
19+
return Object.assign(
20+
{},
21+
cyCodeCoverageTask(on, config),
22+
cyExtendsTask(config.configFile)
23+
);
24+
},
25+
baseUrl: "http://localhost:4200",
26+
specPattern: "cypress/e2e/**/*.ts",
27+
},
28+
29+
component: {
30+
devServer: {
31+
framework: "angular",
32+
bundler: "webpack",
33+
},
34+
specPattern: "**/*.cy.ts",
35+
},
36+
});

cypress/config/local.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/coverage.webpack.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
module.exports = {
2-
module: {
3-
rules: [
4-
{
5-
test: /\.(js|ts)$/,
6-
loader: '@skyux-sdk/istanbul-instrumenter-loader',
7-
options: { esModules: true },
8-
enforce: 'post',
9-
include: require('path').join(__dirname, '..', 'src'),
10-
exclude: [
11-
/\.(e2e|spec|module|mock)\.ts$/,
12-
/node_modules/,
13-
/(ngfactory|ngstyle)\.js/
14-
]
15-
}
16-
]
17-
}
18-
};
1+
// module.exports = {
2+
// module: {
3+
// rules: [
4+
// {
5+
// test: /\.(js|ts)$/,
6+
// loader: '@skyux-sdk/istanbul-instrumenter-loader',
7+
// options: { esModules: true },
8+
// enforce: 'post',
9+
// include: require('path').join(__dirname, '..', 'src'),
10+
// exclude: [
11+
// /\.(e2e|spec|module|mock)\.ts$/,
12+
// /node_modules/,
13+
// /(ngfactory|ngstyle)\.js/
14+
// ]
15+
// }
16+
// ]
17+
// }
18+
// };
File renamed without changes.

cypress/integration/dashboard.spec.ts renamed to cypress/e2e/dashboard.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
describe('dashboard', () => {
1+
/// <reference types="Cypress" />
22

3+
describe('dashboard', () => {
34
before(() => cy.visit('/'));
45

56
it('should default to dashboard', () => {

0 commit comments

Comments
 (0)