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

+34-3
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

+32
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

-11
This file was deleted.

cypress/config/dev.config.ts

+21
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

-5
This file was deleted.

cypress/config/local.config.ts

+36
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

-5
This file was deleted.

cypress/coverage.webpack.js

+18-18
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

+2-1
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', () => {
File renamed without changes.

cypress/plugins/index.js

-13
This file was deleted.

cypress/support/component-index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<title>Components App</title>
8+
</head>
9+
<body>
10+
<div data-cy-root></div>
11+
</body>
12+
</html>

cypress/support/component.ts

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// ***********************************************************
2+
// This example support/component.ts is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands'
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')
21+
22+
import { mount } from 'cypress/angular'
23+
24+
// Augment the Cypress namespace to include type definitions for
25+
// your custom command.
26+
// Alternatively, can be defined in cypress/support/component.d.ts
27+
// with a <reference path="./component" /> at the top of your spec.
28+
declare global {
29+
namespace Cypress {
30+
interface Chainable {
31+
mount: typeof mount
32+
}
33+
}
34+
}
35+
36+
Cypress.Commands.add('mount', mount)
37+
38+
// Example use:
39+
// cy.mount(MyComponent)

cypress/support/index.js renamed to cypress/support/e2e.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ***********************************************************
2-
// This example support/index.js is processed and
2+
// This example support/e2e.ts is processed and
33
// loaded automatically before your test files.
44
//
55
// This is a great place to put global configuration and
@@ -13,7 +13,8 @@
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
1515

16-
// When a command from ./commands is ready to use, import with `import './commands'` syntax
17-
// import './commands';
16+
// Import commands.js using ES2015 syntax:
17+
import './commands'
1818

19-
import '@cypress/code-coverage/support'
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

0 commit comments

Comments
 (0)