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:
@@ -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 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.
|
||||
|
||||
@@ -27,9 +27,9 @@ I created some `it` blocks but feel free to add more test if you like to.
|
||||
1. Fork the project
|
||||
2. clone it
|
||||
3. npm install
|
||||
4. `npx nx serve router-testing` to play with the application
|
||||
5. `npx nx test router-testing` to test your application with Testing Library
|
||||
6. `npx nx component-test router-testing --watch` to test your application with Cypress
|
||||
4. `npx nx serve testing-router-outlet` to play with the application
|
||||
5. `npx nx test testing-router-outlet` to test your application with Testing Library
|
||||
6. `npx nx component-test testing-router-outlet --watch` to test your application with Cypress
|
||||
7. _...work on it_
|
||||
8. Commit your work
|
||||
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 */
|
||||
export default {
|
||||
displayName: 'router-testing',
|
||||
displayName: 'testing-router-outlet',
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
globals: {},
|
||||
@@ -1,25 +1,25 @@
|
||||
{
|
||||
"name": "router-testing",
|
||||
"name": "testing-router-outlet",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"sourceRoot": "apps/router-testing/src",
|
||||
"sourceRoot": "apps/testing-router-outlet/src",
|
||||
"prefix": "app",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular-devkit/build-angular:browser",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/apps/router-testing",
|
||||
"index": "apps/router-testing/src/index.html",
|
||||
"main": "apps/router-testing/src/main.ts",
|
||||
"outputPath": "dist/apps/testing-router-outlet",
|
||||
"index": "apps/testing-router-outlet/src/index.html",
|
||||
"main": "apps/testing-router-outlet/src/main.ts",
|
||||
"polyfills": ["zone.js"],
|
||||
"tsConfig": "apps/router-testing/tsconfig.app.json",
|
||||
"tsConfig": "apps/testing-router-outlet/tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"apps/router-testing/src/favicon.ico",
|
||||
"apps/router-testing/src/assets"
|
||||
"apps/testing-router-outlet/src/favicon.ico",
|
||||
"apps/testing-router-outlet/src/assets"
|
||||
],
|
||||
"styles": ["apps/router-testing/src/styles.scss"],
|
||||
"styles": ["apps/testing-router-outlet/src/styles.scss"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
@@ -53,10 +53,10 @@
|
||||
"executor": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "router-testing:build:production"
|
||||
"browserTarget": "testing-router-outlet:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "router-testing:build:development"
|
||||
"browserTarget": "testing-router-outlet:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
@@ -64,7 +64,7 @@
|
||||
"extract-i18n": {
|
||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "router-testing:build"
|
||||
"browserTarget": "testing-router-outlet:build"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -72,8 +72,8 @@
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/router-testing/**/*.ts",
|
||||
"apps/router-testing/**/*.html"
|
||||
"apps/testing-router-outlet/**/*.ts",
|
||||
"apps/testing-router-outlet/**/*.html"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -81,17 +81,17 @@
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "apps/router-testing/jest.config.ts",
|
||||
"jestConfig": "apps/testing-router-outlet/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
}
|
||||
},
|
||||
"component-test": {
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": {
|
||||
"cypressConfig": "apps/router-testing/cypress.config.ts",
|
||||
"cypressConfig": "apps/testing-router-outlet/cypress.config.ts",
|
||||
"testingType": "component",
|
||||
"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