From 05951bd4df920a0923eb5e076bb017edeac2d99b Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 17 Oct 2023 23:13:44 +0200 Subject: [PATCH] feat(doc): move table --- .../table}/.eslintrc.json | 2 +- apps/{testing-table => test/table}/README.md | 12 +++--- .../table}/cypress.config.ts | 0 .../table}/cypress/fixtures/example.json | 0 .../table}/cypress/support/commands.ts | 0 .../cypress/support/component-index.html | 12 ++++++ .../table}/cypress/support/component.ts | 0 .../table}/cypress/tsconfig.json | 0 .../table}/jest.config.ts | 4 +- .../table}/project.json | 36 +++++++++--------- .../table}/src/app/app.component.ts | 0 .../table}/src/app/table.component.spec.ts | 0 .../table}/src/app/table.component.ts | 0 .../table}/src/assets/.gitkeep | 0 .../table}/src/favicon.ico | Bin .../table}/src/index.html | 0 .../{testing-table => test/table}/src/main.ts | 0 .../table}/src/styles.scss | 0 .../table}/src/test-setup.ts | 0 .../table}/tailwind.config.js | 0 .../table}/tsconfig.app.json | 2 +- .../table}/tsconfig.editor.json | 0 .../table}/tsconfig.json | 2 +- .../table}/tsconfig.spec.json | 2 +- .../cypress/support/component-index.html | 13 ------- 25 files changed, 42 insertions(+), 43 deletions(-) rename apps/{testing-table => test/table}/.eslintrc.json (94%) rename apps/{testing-table => test/table}/README.md (70%) rename apps/{testing-table => test/table}/cypress.config.ts (100%) rename apps/{testing-table => test/table}/cypress/fixtures/example.json (100%) rename apps/{testing-table => test/table}/cypress/support/commands.ts (100%) create mode 100644 apps/test/table/cypress/support/component-index.html rename apps/{testing-table => test/table}/cypress/support/component.ts (100%) rename apps/{testing-table => test/table}/cypress/tsconfig.json (100%) rename apps/{testing-table => test/table}/jest.config.ts (89%) rename apps/{testing-table => test/table}/project.json (69%) rename apps/{testing-table => test/table}/src/app/app.component.ts (100%) rename apps/{testing-table => test/table}/src/app/table.component.spec.ts (100%) rename apps/{testing-table => test/table}/src/app/table.component.ts (100%) rename apps/{testing-table => test/table}/src/assets/.gitkeep (100%) rename apps/{testing-table => test/table}/src/favicon.ico (100%) rename apps/{testing-table => test/table}/src/index.html (100%) rename apps/{testing-table => test/table}/src/main.ts (100%) rename apps/{testing-table => test/table}/src/styles.scss (100%) rename apps/{testing-table => test/table}/src/test-setup.ts (100%) rename apps/{testing-table => test/table}/tailwind.config.js (100%) rename apps/{testing-table => test/table}/tsconfig.app.json (89%) rename apps/{testing-table => test/table}/tsconfig.editor.json (100%) rename apps/{testing-table => test/table}/tsconfig.json (94%) rename apps/{testing-table => test/table}/tsconfig.spec.json (89%) delete mode 100644 apps/testing-table/cypress/support/component-index.html diff --git a/apps/testing-table/.eslintrc.json b/apps/test/table/.eslintrc.json similarity index 94% rename from apps/testing-table/.eslintrc.json rename to apps/test/table/.eslintrc.json index b428c22..bf8df14 100644 --- a/apps/testing-table/.eslintrc.json +++ b/apps/test/table/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json"], + "extends": ["../../../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { diff --git a/apps/testing-table/README.md b/apps/test/table/README.md similarity index 70% rename from apps/testing-table/README.md rename to apps/test/table/README.md index f5e232e..6ccd8a1 100644 --- a/apps/testing-table/README.md +++ b/apps/test/table/README.md @@ -8,13 +8,13 @@ NOT IMPLEMENTED YET @@ -23,9 +23,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 ci -4. `npx nx serve testing-table` to play with the application -5. `npx nx test testing-table` to test your application with Testing Library -6. `npx nx component-test testing-table --watch` to test your application with Cypress +4. `npx nx serve test-table` to play with the application +5. `npx nx test test-table` to test your application with Testing Library +6. `npx nx component-test test-table --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:22** that I will review and other dev can review. diff --git a/apps/testing-table/cypress.config.ts b/apps/test/table/cypress.config.ts similarity index 100% rename from apps/testing-table/cypress.config.ts rename to apps/test/table/cypress.config.ts diff --git a/apps/testing-table/cypress/fixtures/example.json b/apps/test/table/cypress/fixtures/example.json similarity index 100% rename from apps/testing-table/cypress/fixtures/example.json rename to apps/test/table/cypress/fixtures/example.json diff --git a/apps/testing-table/cypress/support/commands.ts b/apps/test/table/cypress/support/commands.ts similarity index 100% rename from apps/testing-table/cypress/support/commands.ts rename to apps/test/table/cypress/support/commands.ts diff --git a/apps/test/table/cypress/support/component-index.html b/apps/test/table/cypress/support/component-index.html new file mode 100644 index 0000000..a749e54 --- /dev/null +++ b/apps/test/table/cypress/support/component-index.html @@ -0,0 +1,12 @@ + + + + + + + testing-table Components App + + +
+ + diff --git a/apps/testing-table/cypress/support/component.ts b/apps/test/table/cypress/support/component.ts similarity index 100% rename from apps/testing-table/cypress/support/component.ts rename to apps/test/table/cypress/support/component.ts diff --git a/apps/testing-table/cypress/tsconfig.json b/apps/test/table/cypress/tsconfig.json similarity index 100% rename from apps/testing-table/cypress/tsconfig.json rename to apps/test/table/cypress/tsconfig.json diff --git a/apps/testing-table/jest.config.ts b/apps/test/table/jest.config.ts similarity index 89% rename from apps/testing-table/jest.config.ts rename to apps/test/table/jest.config.ts index 8a36e0f..b0a0ac3 100644 --- a/apps/testing-table/jest.config.ts +++ b/apps/test/table/jest.config.ts @@ -1,7 +1,7 @@ /* eslint-disable */ export default { - displayName: 'testing-table', - preset: '../../jest.preset.js', + displayName: 'test-table', + preset: '../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/testing-table/project.json b/apps/test/table/project.json similarity index 69% rename from apps/testing-table/project.json rename to apps/test/table/project.json index d512dc3..c43b56b 100644 --- a/apps/testing-table/project.json +++ b/apps/test/table/project.json @@ -1,25 +1,25 @@ { - "name": "testing-table", - "$schema": "../node_modules/nx/schemas/project-schema.json", + "name": "test-table", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "application", - "sourceRoot": "apps/testing-table/src", + "sourceRoot": "apps/test/table/src", "prefix": "app", "targets": { "build": { "executor": "@angular-devkit/build-angular:browser", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/apps/testing-table", - "index": "apps/testing-table/src/index.html", - "main": "apps/testing-table/src/main.ts", + "outputPath": "dist/apps/test/table", + "index": "apps/test/table/src/index.html", + "main": "apps/test/table/src/main.ts", "polyfills": ["zone.js"], - "tsConfig": "apps/testing-table/tsconfig.app.json", + "tsConfig": "apps/test/table/tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": [ - "apps/testing-table/src/favicon.ico", - "apps/testing-table/src/assets" + "apps/test/table/src/favicon.ico", + "apps/test/table/src/assets" ], - "styles": ["apps/testing-table/src/styles.scss"], + "styles": ["apps/test/table/src/styles.scss"], "scripts": [], "allowedCommonJsDependencies": ["seedrandom"] }, @@ -54,10 +54,10 @@ "executor": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "testing-table:build:production" + "browserTarget": "test-table:build:production" }, "development": { - "browserTarget": "testing-table:build:development" + "browserTarget": "test-table:build:development" } }, "defaultConfiguration": "development" @@ -65,7 +65,7 @@ "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "testing-table:build" + "browserTarget": "test-table:build" } }, "lint": { @@ -73,8 +73,8 @@ "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ - "apps/testing-table/**/*.ts", - "apps/testing-table/**/*.html" + "apps/test/table/**/*.ts", + "apps/test/table/**/*.html" ] } }, @@ -82,7 +82,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/testing-table/jest.config.ts", + "jestConfig": "apps/test/table/jest.config.ts", "passWithNoTests": true }, "configurations": { @@ -95,10 +95,10 @@ "component-test": { "executor": "@nx/cypress:cypress", "options": { - "cypressConfig": "apps/testing-table/cypress.config.ts", + "cypressConfig": "apps/test/table/cypress.config.ts", "testingType": "component", "skipServe": true, - "devServerTarget": "testing-table:build" + "devServerTarget": "test-table:build" } } }, diff --git a/apps/testing-table/src/app/app.component.ts b/apps/test/table/src/app/app.component.ts similarity index 100% rename from apps/testing-table/src/app/app.component.ts rename to apps/test/table/src/app/app.component.ts diff --git a/apps/testing-table/src/app/table.component.spec.ts b/apps/test/table/src/app/table.component.spec.ts similarity index 100% rename from apps/testing-table/src/app/table.component.spec.ts rename to apps/test/table/src/app/table.component.spec.ts diff --git a/apps/testing-table/src/app/table.component.ts b/apps/test/table/src/app/table.component.ts similarity index 100% rename from apps/testing-table/src/app/table.component.ts rename to apps/test/table/src/app/table.component.ts diff --git a/apps/testing-table/src/assets/.gitkeep b/apps/test/table/src/assets/.gitkeep similarity index 100% rename from apps/testing-table/src/assets/.gitkeep rename to apps/test/table/src/assets/.gitkeep diff --git a/apps/testing-table/src/favicon.ico b/apps/test/table/src/favicon.ico similarity index 100% rename from apps/testing-table/src/favicon.ico rename to apps/test/table/src/favicon.ico diff --git a/apps/testing-table/src/index.html b/apps/test/table/src/index.html similarity index 100% rename from apps/testing-table/src/index.html rename to apps/test/table/src/index.html diff --git a/apps/testing-table/src/main.ts b/apps/test/table/src/main.ts similarity index 100% rename from apps/testing-table/src/main.ts rename to apps/test/table/src/main.ts diff --git a/apps/testing-table/src/styles.scss b/apps/test/table/src/styles.scss similarity index 100% rename from apps/testing-table/src/styles.scss rename to apps/test/table/src/styles.scss diff --git a/apps/testing-table/src/test-setup.ts b/apps/test/table/src/test-setup.ts similarity index 100% rename from apps/testing-table/src/test-setup.ts rename to apps/test/table/src/test-setup.ts diff --git a/apps/testing-table/tailwind.config.js b/apps/test/table/tailwind.config.js similarity index 100% rename from apps/testing-table/tailwind.config.js rename to apps/test/table/tailwind.config.js diff --git a/apps/testing-table/tsconfig.app.json b/apps/test/table/tsconfig.app.json similarity index 89% rename from apps/testing-table/tsconfig.app.json rename to apps/test/table/tsconfig.app.json index e46d4fc..01a02ed 100644 --- a/apps/testing-table/tsconfig.app.json +++ b/apps/test/table/tsconfig.app.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": [] }, "files": ["src/main.ts"], diff --git a/apps/testing-table/tsconfig.editor.json b/apps/test/table/tsconfig.editor.json similarity index 100% rename from apps/testing-table/tsconfig.editor.json rename to apps/test/table/tsconfig.editor.json diff --git a/apps/testing-table/tsconfig.json b/apps/test/table/tsconfig.json similarity index 94% rename from apps/testing-table/tsconfig.json rename to apps/test/table/tsconfig.json index 28546c4..3879b94 100644 --- a/apps/testing-table/tsconfig.json +++ b/apps/test/table/tsconfig.json @@ -25,7 +25,7 @@ "path": "./cypress/tsconfig.json" } ], - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, diff --git a/apps/testing-table/tsconfig.spec.json b/apps/test/table/tsconfig.spec.json similarity index 89% rename from apps/testing-table/tsconfig.spec.json rename to apps/test/table/tsconfig.spec.json index 83be437..a578b46 100644 --- a/apps/testing-table/tsconfig.spec.json +++ b/apps/test/table/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"], "target": "ES2016" diff --git a/apps/testing-table/cypress/support/component-index.html b/apps/testing-table/cypress/support/component-index.html deleted file mode 100644 index bcae787..0000000 --- a/apps/testing-table/cypress/support/component-index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - testing-table Components App - - - -
- -