mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
feat(test): rename project to feat upcoming challenges
This commit is contained in:
@@ -57,7 +57,7 @@ This goal of this project is to help you get better at Angular and NgRx by resol
|
|||||||
</br>
|
</br>
|
||||||
<img src="https://img.shields.io/badge/Testing--gray" alt="testing"/>
|
<img src="https://img.shields.io/badge/Testing--gray" alt="testing"/>
|
||||||
|
|
||||||
<a href="./apps/router-testing/README.md"><img src="https://img.shields.io/badge/17-Router Testing-orange" alt="router Testing"/></a>
|
<a href="./apps/testing-router-outlet/README.md"><img src="https://img.shields.io/badge/17-Router Testing-orange" alt="router outlet Testing"/></a>
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
||||||
<title>router-testing Components App</title>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div data-cy-root></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -16,9 +16,9 @@ We have a functional application that lists available books for borrowing inside
|
|||||||
|
|
||||||
The goal is to test this behavior with Testing library and Cypress
|
The goal is to test this behavior with Testing library and Cypress
|
||||||
|
|
||||||
The file named `app.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test router-testing`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks.
|
The file named `app.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test testing-router-outlet`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks.
|
||||||
|
|
||||||
For testing cypress, you will execute your test inside the `app.component.cy.ts` and run `npx nx component-test router-testing` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode.
|
For testing cypress, you will execute your test inside the `app.component.cy.ts` and run `npx nx component-test testing-router-outlet` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode.
|
||||||
|
|
||||||
I created some `it` blocks but feel free to add more test if you like to.
|
I created some `it` blocks but feel free to add more test if you like to.
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ I created some `it` blocks but feel free to add more test if you like to.
|
|||||||
1. Fork the project
|
1. Fork the project
|
||||||
2. clone it
|
2. clone it
|
||||||
3. npm install
|
3. npm install
|
||||||
4. `npx nx serve router-testing` to play with the application
|
4. `npx nx serve testing-router-outlet` to play with the application
|
||||||
5. `npx nx test router-testing` to test your application with Testing Library
|
5. `npx nx test testing-router-outlet` to test your application with Testing Library
|
||||||
6. `npx nx component-test router-testing --watch` to test your application with Cypress
|
6. `npx nx component-test testing-router-outlet --watch` to test your application with Cypress
|
||||||
7. _...work on it_
|
7. _...work on it_
|
||||||
8. Commit your work
|
8. Commit your work
|
||||||
9. Submit a PR with a title beginning with **Answer:17** that I will review and other dev can review.
|
9. Submit a PR with a title beginning with **Answer:17** that I will review and other dev can review.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
|
<title>router-testing Components App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div data-cy-root></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
displayName: 'router-testing',
|
displayName: 'testing-router-outlet',
|
||||||
preset: '../../jest.preset.js',
|
preset: '../../jest.preset.js',
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
globals: {},
|
globals: {},
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "router-testing",
|
"name": "testing-router-outlet",
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"sourceRoot": "apps/router-testing/src",
|
"sourceRoot": "apps/testing-router-outlet/src",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/router-testing",
|
"outputPath": "dist/apps/testing-router-outlet",
|
||||||
"index": "apps/router-testing/src/index.html",
|
"index": "apps/testing-router-outlet/src/index.html",
|
||||||
"main": "apps/router-testing/src/main.ts",
|
"main": "apps/testing-router-outlet/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/router-testing/tsconfig.app.json",
|
"tsConfig": "apps/testing-router-outlet/tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/router-testing/src/favicon.ico",
|
"apps/testing-router-outlet/src/favicon.ico",
|
||||||
"apps/router-testing/src/assets"
|
"apps/testing-router-outlet/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/router-testing/src/styles.scss"],
|
"styles": ["apps/testing-router-outlet/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "router-testing:build:production"
|
"browserTarget": "testing-router-outlet:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "router-testing:build:development"
|
"browserTarget": "testing-router-outlet:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "router-testing:build"
|
"browserTarget": "testing-router-outlet:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/router-testing/**/*.ts",
|
"apps/testing-router-outlet/**/*.ts",
|
||||||
"apps/router-testing/**/*.html"
|
"apps/testing-router-outlet/**/*.html"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -81,17 +81,17 @@
|
|||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nrwl/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/router-testing/jest.config.ts",
|
"jestConfig": "apps/testing-router-outlet/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nrwl/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/router-testing/cypress.config.ts",
|
"cypressConfig": "apps/testing-router-outlet/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
"skipServe": true,
|
"skipServe": true,
|
||||||
"devServerTarget": "router-testing:build"
|
"devServerTarget": "testing-router-outlet:build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Reference in New Issue
Block a user