Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/angular-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.7.0
Choose a base ref
...
head repository: testing-library/angular-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 5,406 additions and 1,974 deletions.
  1. +235 −2 .all-contributorsrc
  2. +42 −0 .devcontainer/devcontainer.json
  3. +7 −0 .devcontainer/welcome-message.txt
  4. +0 −118 .eslintrc.json
  5. +3 −0 .githooks/pre-commit
  6. +25 −10 .github/workflows/ci.yml
  7. +7 −0 .gitignore
  8. +1 −0 .node-version
  9. +1 −1 .npmrc
  10. +1 −0 .nxignore
  11. +5 −0 .prettierignore
  12. +1 −1 CONTRIBUTING.md
  13. +134 −62 README.md
  14. +0 −218 angular.json
  15. +7 −0 apps/example-app-karma/eslint.config.cjs
  16. +8 −0 apps/example-app-karma/eslint.config.mjs
  17. +4 −0 apps/example-app-karma/jasmine-dom.d.ts
  18. +38 −0 apps/example-app-karma/karma.conf.js
  19. +68 −0 apps/example-app-karma/project.json
  20. +66 −0 apps/example-app-karma/src/app/examples/login-form.spec.ts
  21. +57 −0 apps/example-app-karma/src/app/issues/issue-491.spec.ts
  22. +11 −0 apps/example-app-karma/src/app/issues/jasmine-matchers.spec.ts
  23. +15 −0 apps/example-app-karma/src/app/issues/rerender.spec.ts
  24. +13 −0 apps/example-app-karma/src/test.ts
  25. +13 −0 apps/example-app-karma/tsconfig.app.json
  26. +7 −0 apps/example-app-karma/tsconfig.editor.json
  27. +21 −0 apps/example-app-karma/tsconfig.json
  28. +11 −0 apps/example-app-karma/tsconfig.spec.json
  29. +0 −17 apps/example-app/.browserslistrc
  30. +0 −36 apps/example-app/.eslintrc.json
  31. +7 −0 apps/example-app/eslint.config.cjs
  32. +8 −0 apps/example-app/eslint.config.mjs
  33. +2 −3 apps/example-app/{jest.config.js → jest.config.ts}
  34. +75 −0 apps/example-app/project.json
  35. +0 −101 apps/example-app/src/app/app-routing.module.ts
  36. +0 −17 apps/example-app/src/app/app.component.css
  37. +0 −17 apps/example-app/src/app/app.component.html
  38. +0 −11 apps/example-app/src/app/app.component.ts
  39. +0 −63 apps/example-app/src/app/app.module.ts
  40. +6 −4 apps/example-app/src/app/examples/00-single-component.spec.ts
  41. +2 −1 apps/example-app/src/app/examples/00-single-component.ts
  42. +8 −8 apps/example-app/src/app/examples/01-nested-component.spec.ts
  43. +12 −8 apps/example-app/src/app/examples/01-nested-component.ts
  44. +74 −13 apps/example-app/src/app/examples/02-input-output.spec.ts
  45. +2 −1 apps/example-app/src/app/examples/02-input-output.ts
  46. +8 −7 apps/example-app/src/app/examples/03-forms.spec.ts
  47. +13 −6 apps/example-app/src/app/examples/03-forms.ts
  48. +67 −15 apps/example-app/src/app/examples/04-forms-with-material.spec.ts
  49. +49 −7 apps/example-app/src/app/examples/04-forms-with-material.ts
  50. +17 −10 apps/example-app/src/app/examples/05-component-provider.spec.ts
  51. +2 −1 apps/example-app/src/app/examples/05-component-provider.ts
  52. +7 −4 apps/example-app/src/app/examples/06-with-ngrx-store.spec.ts
  53. +5 −6 apps/example-app/src/app/examples/06-with-ngrx-store.ts
  54. +6 −3 apps/example-app/src/app/examples/07-with-ngrx-mock-store.spec.ts
  55. +7 −2 apps/example-app/src/app/examples/07-with-ngrx-mock-store.ts
  56. +53 −22 apps/example-app/src/app/examples/08-directive.spec.ts
  57. +2 −1 apps/example-app/src/app/examples/08-directive.ts
  58. +51 −13 apps/example-app/src/app/examples/09-router.spec.ts
  59. +15 −9 apps/example-app/src/app/examples/09-router.ts
  60. +2 −1 apps/example-app/src/app/examples/10-inject-token-dependency.ts
  61. +2 −4 apps/example-app/src/app/examples/11-ng-content.spec.ts
  62. +2 −0 apps/example-app/src/app/examples/11-ng-content.ts
  63. +2 −2 apps/example-app/src/app/examples/12-service-component.spec.ts
  64. +6 −3 apps/example-app/src/app/examples/12-service-component.ts
  65. +2 −5 apps/example-app/src/app/examples/13-scrolling.component.spec.ts
  66. +4 −1 apps/example-app/src/app/examples/13-scrolling.component.ts
  67. +16 −1 apps/example-app/src/app/examples/14-async-component.spec.ts
  68. +4 −1 apps/example-app/src/app/examples/14-async-component.ts
  69. +31 −25 apps/example-app/src/app/examples/15-dialog.component.spec.ts
  70. +8 −9 apps/example-app/src/app/examples/15-dialog.component.ts
  71. +6 −7 apps/example-app/src/app/examples/16-input-getter-setter.spec.ts
  72. +4 −3 apps/example-app/src/app/examples/16-input-getter-setter.ts
  73. +17 −0 apps/example-app/src/app/examples/17-component-with-attribute-selector.spec.ts
  74. +10 −0 apps/example-app/src/app/examples/17-component-with-attribute-selector.ts
  75. +35 −0 apps/example-app/src/app/examples/18-html-as-input.spec.ts
  76. +22 −0 apps/example-app/src/app/examples/19-standalone-component.spec.ts
  77. +21 −0 apps/example-app/src/app/examples/19-standalone-component.ts
  78. +35 −0 apps/example-app/src/app/examples/20-test-harness.spec.ts
  79. +19 −0 apps/example-app/src/app/examples/20-test-harness.ts
  80. +25 −0 apps/example-app/src/app/examples/21-deferable-view.component.ts
  81. +23 −0 apps/example-app/src/app/examples/21-deferable-view.spec.ts
  82. +128 −0 apps/example-app/src/app/examples/22-signal-inputs.component.spec.ts
  83. +28 −0 apps/example-app/src/app/examples/22-signal-inputs.component.ts
  84. +22 −0 apps/example-app/src/app/examples/23-host-directive.spec.ts
  85. +21 −0 apps/example-app/src/app/examples/23-host-directive.ts
  86. +0 −42 apps/example-app/src/app/issues/issue-106.spec.ts
  87. +0 −9 apps/example-app/src/app/material.module.ts
  88. 0 apps/example-app/src/assets/.gitkeep
  89. +0 −3 apps/example-app/src/environments/environment.prod.ts
  90. +0 −15 apps/example-app/src/environments/environment.ts
  91. BIN apps/example-app/src/favicon.ico
  92. +0 −14 apps/example-app/src/index.html
  93. +0 −13 apps/example-app/src/main.ts
  94. +0 −75 apps/example-app/src/polyfills.ts
  95. +0 −1 apps/example-app/src/styles.css
  96. +2 −6 apps/example-app/src/test-setup.ts
  97. +6 −2 apps/example-app/tsconfig.app.json
  98. +4 −2 apps/example-app/tsconfig.json
  99. +1 −1 apps/example-app/tsconfig.spec.json
  100. +7 −0 eslint.config.cjs
  101. +66 −0 eslint.config.mjs
  102. +0 −3 jest.config.js
  103. +5 −0 jest.config.ts
  104. +22 −16 jest.preset.js
  105. +4 −1 lint-staged.config.js
  106. +0 −89 migrations.json
  107. +92 −23 nx.json
  108. +142 −0 other/logo-icon.svg
  109. +124 −0 other/logo-transparent.svg
  110. BIN other/logo.jpg
  111. BIN other/logo.png
  112. +1 −0 other/logo.svg
  113. +87 −66 package.json
  114. +0 −36 projects/jest-utils/.eslintrc.json
  115. +0 −8 projects/jest-utils/jest.config.js
  116. +0 −8 projects/jest-utils/ng-package.json
  117. +0 −33 projects/jest-utils/package.json
  118. +0 −2 projects/jest-utils/test-setup.ts
  119. +0 −52 projects/jest-utils/tests/create-mock.spec.ts
  120. +0 −29 projects/jest-utils/tsconfig.lib.json
  121. +0 −9 projects/jest-utils/tsconfig.spec.json
  122. +0 −36 projects/testing-library/.eslintrc.json
  123. +7 −0 projects/testing-library/eslint.config.cjs
  124. +8 −0 projects/testing-library/eslint.config.mjs
  125. 0 projects/{ → testing-library}/jest-utils/index.ts
  126. +1 −0 projects/testing-library/jest-utils/ng-package.json
  127. +8 −1 projects/{ → testing-library}/jest-utils/src/lib/create-mock.ts
  128. 0 projects/{ → testing-library}/jest-utils/src/lib/index.ts
  129. 0 projects/{ → testing-library}/jest-utils/src/public_api.ts
  130. +74 −0 projects/testing-library/jest-utils/tests/create-mock.spec.ts
  131. +2 −2 projects/testing-library/{jest.config.js → jest.config.ts}
  132. +1 −0 projects/testing-library/ng-package.json
  133. +14 −7 projects/testing-library/package.json
  134. +54 −0 projects/testing-library/project.json
  135. +10 −0 projects/testing-library/schematics/collection.json
  136. +42 −0 projects/testing-library/schematics/migrations/dtl-as-dev-dependency/index.spec.ts
  137. +20 −0 projects/testing-library/schematics/migrations/dtl-as-dev-dependency/index.ts
  138. +10 −0 projects/testing-library/schematics/migrations/migrations.json
  139. +44 −0 projects/testing-library/schematics/ng-add/index.ts
  140. +30 −0 projects/testing-library/schematics/ng-add/schema.json
  141. +4 −0 projects/testing-library/schematics/ng-add/schema.ts
  142. +233 −53 projects/testing-library/src/lib/models.ts
  143. +438 −161 projects/testing-library/src/lib/testing-library.ts
  144. +6 −1 projects/testing-library/test-setup.ts
  145. +6 −6 projects/testing-library/tests/auto-cleanup.spec.ts
  146. +4 −3 projects/testing-library/tests/config.spec.ts
  147. +10 −8 projects/testing-library/tests/debug.spec.ts
  148. +97 −0 projects/testing-library/tests/defer-blocks.spec.ts
  149. +20 −17 projects/testing-library/tests/detect-changes.spec.ts
  150. +10 −4 projects/testing-library/tests/find-by.spec.ts
  151. +41 −11 projects/testing-library/tests/fire-event.spec.ts
  152. +163 −0 projects/testing-library/tests/integration.spec.ts
  153. +64 −0 projects/testing-library/tests/integrations/ng-mocks.spec.ts
  154. +6 −6 projects/testing-library/tests/issues/{188.spec.ts → issue-188.spec.ts}
  155. +31 −0 projects/testing-library/tests/issues/issue-230.spec.ts
  156. +59 −0 projects/testing-library/tests/issues/issue-280.spec.ts
  157. +43 −0 projects/testing-library/tests/issues/issue-318.spec.ts
  158. +17 −0 projects/testing-library/tests/issues/issue-346.spec.ts
  159. +35 −0 projects/testing-library/tests/issues/issue-386.spec.ts
  160. +15 −0 projects/testing-library/tests/issues/issue-389.spec.ts
  161. +55 −0 projects/testing-library/tests/issues/issue-396-standalone-stub-child.spec.ts
  162. +67 −0 projects/testing-library/tests/issues/issue-397-directive-overrides-component-input.spec.ts
  163. +22 −0 projects/testing-library/tests/issues/issue-398-component-without-host-id.spec.ts
  164. +29 −0 projects/testing-library/tests/issues/issue-422-view-already-destroyed.spec.ts
  165. +37 −0 projects/testing-library/tests/issues/issue-435.spec.ts
  166. +56 −0 projects/testing-library/tests/issues/issue-437.spec.ts
  167. +48 −0 projects/testing-library/tests/issues/issue-492.spec.ts
  168. +27 −0 projects/testing-library/tests/issues/issue-493.spec.ts
  169. +6 −6 projects/testing-library/tests/issues/{67.spec.ts → issue-67.spec.ts}
  170. +2 −2 projects/testing-library/tests/navigate.spec.ts
  171. +26 −8 projects/testing-library/tests/providers/component-provider.spec.ts
  172. +9 −9 projects/testing-library/tests/providers/module-provider.spec.ts
  173. +38 −44 projects/testing-library/tests/render-template.spec.ts
  174. +546 −46 projects/testing-library/tests/render.spec.ts
  175. +168 −51 projects/testing-library/tests/rerender.spec.ts
  176. +7 −5 projects/testing-library/tests/wait-for-element-to-be-removed.spec.ts
  177. +4 −5 projects/testing-library/tests/wait-for.spec.ts
  178. +26 −0 projects/testing-library/tsconfig.json
  179. +7 −21 projects/testing-library/tsconfig.lib.json
  180. +12 −0 projects/testing-library/tsconfig.lib.prod.json
  181. +18 −0 projects/testing-library/tsconfig.schematics.json
  182. +2 −2 projects/testing-library/tsconfig.spec.json
  183. +2 −0 projects/vscode-atl-render/.gitattributes
  184. +2 −0 projects/vscode-atl-render/.gitignore
  185. +15 −0 projects/vscode-atl-render/.vscode/launch.json
  186. +4 −0 projects/vscode-atl-render/.vscodeignore
  187. +15 −0 projects/vscode-atl-render/CHANGELOG.md
  188. +3 −0 projects/vscode-atl-render/README.md
  189. +30 −0 projects/vscode-atl-render/language-configuration.json
  190. BIN { → projects/vscode-atl-render}/other/hedgehog.png
  191. +47 −0 projects/vscode-atl-render/package.json
  192. +62 −0 projects/vscode-atl-render/syntaxes/atl-render.json
  193. +30 −0 tsconfig.base.json
  194. +0 −21 tsconfig.json
237 changes: 235 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -195,7 +195,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/4863062?v=4",
"profile": "https://github.com/the-ult",
"contributions": [
"code"
"code",
"maintenance"
]
},
{
@@ -216,12 +217,244 @@
"contributions": [
"infra"
]
},
{
"login": "jwillebrands",
"name": "Jan-Willem Willebrands",
"avatar_url": "https://avatars.githubusercontent.com/u/8925?v=4",
"profile": "https://github.com/jwillebrands",
"contributions": [
"code"
]
},
{
"login": "rothsandro",
"name": "Sandro",
"avatar_url": "https://avatars.githubusercontent.com/u/16229645?v=4",
"profile": "https://www.sandroroth.com",
"contributions": [
"code",
"bug"
]
},
{
"login": "michaelwestphal",
"name": "Michael Westphal",
"avatar_url": "https://avatars.githubusercontent.com/u/1829174?v=4",
"profile": "https://github.com/michaelwestphal",
"contributions": [
"code",
"test"
]
},
{
"login": "Lukas-Kullmann",
"name": "Lukas",
"avatar_url": "https://avatars.githubusercontent.com/u/387547?v=4",
"profile": "https://github.com/Lukas-Kullmann",
"contributions": [
"code"
]
},
{
"login": "MatanBobi",
"name": "Matan Borenkraout",
"avatar_url": "https://avatars.githubusercontent.com/u/12711091?v=4",
"profile": "https://matan.io",
"contributions": [
"maintenance"
]
},
{
"login": "mleimer",
"name": "mleimer",
"avatar_url": "https://avatars.githubusercontent.com/u/14271564?v=4",
"profile": "https://github.com/mleimer",
"contributions": [
"doc",
"test"
]
},
{
"login": "meirka",
"name": "MeIr",
"avatar_url": "https://avatars.githubusercontent.com/u/750901?v=4",
"profile": "https://github.com/meirka",
"contributions": [
"bug",
"test"
]
},
{
"login": "jadengis",
"name": "John Dengis",
"avatar_url": "https://avatars.githubusercontent.com/u/13421336?v=4",
"profile": "https://github.com/jadengis",
"contributions": [
"code",
"test"
]
},
{
"login": "dzonatan",
"name": "Rokas Brazdžionis",
"avatar_url": "https://avatars.githubusercontent.com/u/5166666?v=4",
"profile": "https://github.com/dzonatan",
"contributions": [
"code"
]
},
{
"login": "mateusduraes",
"name": "Mateus Duraes",
"avatar_url": "https://avatars.githubusercontent.com/u/19319404?v=4",
"profile": "https://github.com/mateusduraes",
"contributions": [
"code"
]
},
{
"login": "JJosephttg",
"name": "Josh Joseph",
"avatar_url": "https://avatars.githubusercontent.com/u/23690250?v=4",
"profile": "https://github.com/JJosephttg",
"contributions": [
"code",
"test"
]
},
{
"login": "shaman-apprentice",
"name": "Torsten Knauf",
"avatar_url": "https://avatars.githubusercontent.com/u/3596742?v=4",
"profile": "https://github.com/shaman-apprentice",
"contributions": [
"maintenance"
]
},
{
"login": "antischematic",
"name": "antischematic",
"avatar_url": "https://avatars.githubusercontent.com/u/12976684?v=4",
"profile": "https://github.com/antischematic",
"contributions": [
"bug",
"ideas"
]
},
{
"login": "TrustNoOneElse",
"name": "Florian Pabst",
"avatar_url": "https://avatars.githubusercontent.com/u/25935352?v=4",
"profile": "https://github.com/TrustNoOneElse",
"contributions": [
"code"
]
},
{
"login": "markgoho",
"name": "Mark Goho",
"avatar_url": "https://avatars.githubusercontent.com/u/9759954?v=4",
"profile": "https://rochesterparks.org",
"contributions": [
"maintenance",
"doc"
]
},
{
"login": "jwbaart",
"name": "Jan-Willem Baart",
"avatar_url": "https://avatars.githubusercontent.com/u/10973990?v=4",
"profile": "http://jwbaart.dev",
"contributions": [
"code",
"test"
]
},
{
"login": "mumenthalers",
"name": "S. Mumenthaler",
"avatar_url": "https://avatars.githubusercontent.com/u/3604424?v=4",
"profile": "https://github.com/mumenthalers",
"contributions": [
"code",
"test"
]
},
{
"login": "andreialecu",
"name": "Andrei Alecu",
"avatar_url": "https://avatars.githubusercontent.com/u/697707?v=4",
"profile": "https://lets.poker/",
"contributions": [
"code",
"ideas",
"doc"
]
},
{
"login": "Hyperxq",
"name": "Daniel Ramírez Barrientos",
"avatar_url": "https://avatars.githubusercontent.com/u/22332354?v=4",
"profile": "https://github.com/Hyperxq",
"contributions": [
"code"
]
},
{
"login": "mlz11",
"name": "Mahdi Lazraq",
"avatar_url": "https://avatars.githubusercontent.com/u/94069699?v=4",
"profile": "https://github.com/mlz11",
"contributions": [
"code",
"test"
]
},
{
"login": "Arthie",
"name": "Arthur Petrie",
"avatar_url": "https://avatars.githubusercontent.com/u/16376476?v=4",
"profile": "https://arthurpetrie.com",
"contributions": [
"code"
]
},
{
"login": "FabienDehopre",
"name": "Fabien Dehopré",
"avatar_url": "https://avatars.githubusercontent.com/u/97023?v=4",
"profile": "https://github.com/FabienDehopre",
"contributions": [
"code"
]
},
{
"login": "jvereecken",
"name": "Jamie Vereecken",
"avatar_url": "https://avatars.githubusercontent.com/u/108937550?v=4",
"profile": "https://github.com/jvereecken",
"contributions": [
"code"
]
},
{
"login": "Christian24",
"name": "Christian24",
"avatar_url": "https://avatars.githubusercontent.com/u/2406635?v=4",
"profile": "https://github.com/Christian24",
"contributions": [
"code",
"review"
]
}
],
"contributorsPerLine": 7,
"projectName": "angular-testing-library",
"projectOwner": "testing-library",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
"skipCi": true,
"commitConvention": "angular",
"commitType": "docs"
}
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "angular-testing-library",
"image": "mcr.microsoft.com/devcontainers/typescript-node:22-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install --force",
"onCreateCommand": "sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt",
"waitFor": "postCreateCommand",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[md]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
}
}
7 changes: 7 additions & 0 deletions .devcontainer/welcome-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
👋 Welcome to "Angular Testing Library" in GitHub Codespaces!

🛠️ Your environment is fully setup with all the required software.

🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).

📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.
Loading