diff --git a/adev-es/src/app/routing/sub-navigation-data.ts b/adev-es/src/app/routing/sub-navigation-data.ts
index fb15704..39ce07b 100644
--- a/adev-es/src/app/routing/sub-navigation-data.ts
+++ b/adev-es/src/app/routing/sub-navigation-data.ts
@@ -510,51 +510,51 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
],
},
{
- label: 'Testing',
+ label: 'Pruebas',
children: [
{
- label: 'Overview',
+ label: 'Visión general',
path: 'guide/testing',
contentPath: 'guide/testing/overview',
},
{
- label: 'Code coverage',
+ label: 'Cobertura de código',
path: 'guide/testing/code-coverage',
contentPath: 'guide/testing/code-coverage',
},
{
- label: 'Testing services',
+ label: 'Pruebas de servicios',
path: 'guide/testing/services',
contentPath: 'guide/testing/services',
},
{
- label: 'Basics of testing components',
+ label: 'Fundamentos de pruebas de componentes',
path: 'guide/testing/components-basics',
contentPath: 'guide/testing/components-basics',
},
{
- label: 'Component testing scenarios',
+ label: 'Escenarios de pruebas de componentes',
path: 'guide/testing/components-scenarios',
contentPath: 'guide/testing/components-scenarios',
},
{
- label: 'Testing attribute directives',
+ label: 'Pruebas de directivas de atributo',
path: 'guide/testing/attribute-directives',
contentPath: 'guide/testing/attribute-directives',
},
{
- label: 'Testing pipes',
+ label: 'Pruebas de pipes',
path: 'guide/testing/pipes',
contentPath: 'guide/testing/pipes',
},
{
- label: 'Testing routing and navigation',
+ label: 'Pruebas de enrutamiento y navegación',
path: 'guide/routing/testing',
contentPath: 'guide/routing/testing',
status: 'new',
},
{
- label: 'Debugging tests',
+ label: 'Depuración de pruebas',
path: 'guide/testing/debugging',
contentPath: 'guide/testing/debugging',
},
@@ -564,27 +564,27 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
contentPath: 'guide/testing/utility-apis',
},
{
- label: 'Experimental unit testing integration',
+ label: 'Integración experimental de pruebas unitarias',
path: 'guide/testing/unit-tests',
contentPath: 'guide/testing/experimental-unit-test',
},
{
- label: 'Component harnesses overview',
+ label: 'Visión general de component harnesses',
path: 'guide/testing/component-harnesses-overview',
contentPath: 'guide/testing/component-harnesses-overview',
},
{
- label: 'Using component harnesses in tests',
+ label: 'Usando component harnesses en pruebas',
path: 'guide/testing/using-component-harnesses',
contentPath: 'guide/testing/using-component-harnesses',
},
{
- label: 'Creating harnesses for your components',
+ label: 'Creando harnesses para tus componentes',
path: 'guide/testing/creating-component-harnesses',
contentPath: 'guide/testing/creating-component-harnesses',
},
{
- label: 'Adding harness support for additional testing environments',
+ label: 'Agregar soporte de harness para entornos de pruebas adicionales',
path: 'guide/testing/component-harnesses-testing-environments',
contentPath: 'guide/testing/component-harnesses-testing-environments',
},
diff --git a/adev-es/src/content/guide/testing/attribute-directives.en.md b/adev-es/src/content/guide/testing/attribute-directives.en.md
new file mode 100644
index 0000000..f605c75
--- /dev/null
+++ b/adev-es/src/content/guide/testing/attribute-directives.en.md
@@ -0,0 +1,53 @@
+
+# Testing Attribute Directives
+
+An *attribute directive* modifies the behavior of an element, component or another directive.
+Its name reflects the way the directive is applied: as an attribute on a host element.
+
+## Testing the `HighlightDirective`
+
+The sample application's `HighlightDirective` sets the background color of an element based on either a data bound color or a default color \(lightgray\).
+It also sets a custom property of the element \(`customProperty`\) to `true` for no reason other than to show that it can.
+
+
+
+It's used throughout the application, perhaps most simply in the `AboutComponent`:
+
+
+
+Testing the specific use of the `HighlightDirective` within the `AboutComponent` requires only the techniques explored in the ["Nested component tests"](guide/testing/components-scenarios#nested-component-tests) section of [Component testing scenarios](guide/testing/components-scenarios).
+
+
+
+However, testing a single use case is unlikely to explore the full range of a directive's capabilities.
+Finding and testing all components that use the directive is tedious, brittle, and almost as unlikely to afford full coverage.
+
+*Class-only tests* might be helpful, but attribute directives like this one tend to manipulate the DOM.
+Isolated unit tests don't touch the DOM and, therefore, do not inspire confidence in the directive's efficacy.
+
+A better solution is to create an artificial test component that demonstrates all ways to apply the directive.
+
+
+
+
+
+HELPFUL: The `` case binds the `HighlightDirective` to the name of a color value in the input box.
+The initial value is the word "cyan" which should be the background color of the input box.
+
+Here are some tests of this component:
+
+
+
+A few techniques are noteworthy:
+
+* The `By.directive` predicate is a great way to get the elements that have this directive *when their element types are unknown*
+* The [`:not` pseudo-class](https://developer.mozilla.org/docs/Web/CSS/:not) in `By.css('h2:not([highlight])')` helps find `
` elements that *do not* have the directive.
+ `By.css('*:not([highlight])')` finds *any* element that does not have the directive.
+
+* `DebugElement.styles` affords access to element styles even in the absence of a real browser, thanks to the `DebugElement` abstraction.
+ But feel free to exploit the `nativeElement` when that seems easier or more clear than the abstraction.
+
+* Angular adds a directive to the injector of the element to which it is applied.
+ The test for the default color uses the injector of the second `
` to get its `HighlightDirective` instance and its `defaultColor`.
+
+* `DebugElement.properties` affords access to the artificial custom property that is set by the directive
diff --git a/adev-es/src/content/guide/testing/attribute-directives.md b/adev-es/src/content/guide/testing/attribute-directives.md
index f605c75..e7d047c 100644
--- a/adev-es/src/content/guide/testing/attribute-directives.md
+++ b/adev-es/src/content/guide/testing/attribute-directives.md
@@ -1,53 +1,53 @@
-# Testing Attribute Directives
+# Probar directivas de atributo
-An *attribute directive* modifies the behavior of an element, component or another directive.
-Its name reflects the way the directive is applied: as an attribute on a host element.
+Una *directiva de atributo* modifica el comportamiento de un elemento, componente u otra directiva.
+Su nombre refleja la forma en que se aplica la directiva: como un atributo en un elemento host.
-## Testing the `HighlightDirective`
+## Probar la `HighlightDirective`
-The sample application's `HighlightDirective` sets the background color of an element based on either a data bound color or a default color \(lightgray\).
-It also sets a custom property of the element \(`customProperty`\) to `true` for no reason other than to show that it can.
+La `HighlightDirective` de la aplicación de muestra establece el color de fondo de un elemento basado en un color vinculado a datos o un color predeterminado \(lightgray\).
+También establece una propiedad personalizada del elemento \(`customProperty`\) a `true` sin otra razón que mostrar que puede hacerlo.
-It's used throughout the application, perhaps most simply in the `AboutComponent`:
+Se usa en toda la aplicación, quizás más simplemente en el `AboutComponent`:
-Testing the specific use of the `HighlightDirective` within the `AboutComponent` requires only the techniques explored in the ["Nested component tests"](guide/testing/components-scenarios#nested-component-tests) section of [Component testing scenarios](guide/testing/components-scenarios).
+Probar el uso específico de la `HighlightDirective` dentro del `AboutComponent` requiere solo las técnicas exploradas en la sección ["Pruebas de componentes anidados"](guide/testing/components-scenarios#nested-component-tests) de [Escenarios de prueba de componentes](guide/testing/components-scenarios).
-However, testing a single use case is unlikely to explore the full range of a directive's capabilities.
-Finding and testing all components that use the directive is tedious, brittle, and almost as unlikely to afford full coverage.
+Sin embargo, probar un solo caso de uso es poco probable que explore el rango completo de las capacidades de una directiva.
+Encontrar y probar todos los componentes que usan la directiva es tedioso, frágil y casi tan poco probable de ofrecer cobertura completa.
-*Class-only tests* might be helpful, but attribute directives like this one tend to manipulate the DOM.
-Isolated unit tests don't touch the DOM and, therefore, do not inspire confidence in the directive's efficacy.
+Las *pruebas solo de clase* podrían ser útiles, pero las directivas de atributo como esta tienden a manipular el DOM.
+Las pruebas unitarias aisladas no tocan el DOM y, por lo tanto, no inspiran confianza en la eficacia de la directiva.
-A better solution is to create an artificial test component that demonstrates all ways to apply the directive.
+Una mejor solución es crear un componente de prueba artificial que demuestre todas las formas de aplicar la directiva.
-
+
-HELPFUL: The `` case binds the `HighlightDirective` to the name of a color value in the input box.
-The initial value is the word "cyan" which should be the background color of the input box.
+ÚTIL: El caso `` vincula la `HighlightDirective` al nombre de un valor de color en el cuadro de entrada.
+El valor inicial es la palabra "cyan" que debería ser el color de fondo del cuadro de entrada.
-Here are some tests of this component:
+Aquí hay algunas pruebas de este componente:
-A few techniques are noteworthy:
+Algunas técnicas son dignas de mención:
-* The `By.directive` predicate is a great way to get the elements that have this directive *when their element types are unknown*
-* The [`:not` pseudo-class](https://developer.mozilla.org/docs/Web/CSS/:not) in `By.css('h2:not([highlight])')` helps find `
` elements that *do not* have the directive.
- `By.css('*:not([highlight])')` finds *any* element that does not have the directive.
+* El predicado `By.directive` es una excelente manera de obtener los elementos que tienen esta directiva *cuando sus tipos de elemento son desconocidos*
+* La [pseudo-clase `:not`](https://developer.mozilla.org/docs/Web/CSS/:not) en `By.css('h2:not([highlight])')` ayuda a encontrar elementos `
` que *no* tienen la directiva.
+ `By.css('*:not([highlight])')` encuentra *cualquier* elemento que no tenga la directiva.
-* `DebugElement.styles` affords access to element styles even in the absence of a real browser, thanks to the `DebugElement` abstraction.
- But feel free to exploit the `nativeElement` when that seems easier or more clear than the abstraction.
+* `DebugElement.styles` permite el acceso a los estilos del elemento incluso en ausencia de un navegador real, gracias a la abstracción `DebugElement`.
+ Pero siéntete libre de explotar el `nativeElement` cuando eso parezca más fácil o más claro que la abstracción.
-* Angular adds a directive to the injector of the element to which it is applied.
- The test for the default color uses the injector of the second `
` to get its `HighlightDirective` instance and its `defaultColor`.
+* Angular agrega una directiva al injector del elemento al que se aplica.
+ La prueba para el color predeterminado usa el injector del segundo `
` para obtener su instancia de `HighlightDirective` y su `defaultColor`.
-* `DebugElement.properties` affords access to the artificial custom property that is set by the directive
+* `DebugElement.properties` permite el acceso a la propiedad personalizada artificial que se establece por la directiva
diff --git a/adev-es/src/content/guide/testing/code-coverage.en.md b/adev-es/src/content/guide/testing/code-coverage.en.md
new file mode 100644
index 0000000..2ea638b
--- /dev/null
+++ b/adev-es/src/content/guide/testing/code-coverage.en.md
@@ -0,0 +1,57 @@
+
+# Find out how much code you're testing
+
+The Angular CLI can run unit tests and create code coverage reports.
+Code coverage reports show you any parts of your code base that might not be properly tested by your unit tests.
+
+To generate a coverage report run the following command in the root of your project.
+
+
+ng test --no-watch --code-coverage
+
+
+When the tests are complete, the command creates a new `/coverage` directory in the project.
+Open the `index.html` file to see a report with your source code and code coverage values.
+
+If you want to create code-coverage reports every time you test, set the following option in the Angular CLI configuration file, `angular.json`:
+
+
+"test": {
+ "options": {
+ "codeCoverage": true
+ }
+}
+
+
+## Code coverage enforcement
+
+The code coverage percentages let you estimate how much of your code is tested.
+If your team decides on a set minimum amount to be unit tested, enforce this minimum with the Angular CLI.
+
+For example, suppose you want the code base to have a minimum of 80% code coverage.
+To enable this, open the [Karma](https://karma-runner.github.io) test platform configuration file, `karma.conf.js`, and add the `check` property in the `coverageReporter:` key.
+
+
+coverageReporter: {
+ dir: require('path').join(__dirname, './coverage/'),
+ subdir: '.',
+ reporters: [
+ { type: 'html' },
+ { type: 'text-summary' }
+ ],
+ check: {
+ global: {
+ statements: 80,
+ branches: 80,
+ functions: 80,
+ lines: 80
+ }
+ }
+}
+
+
+HELPFUL: Read more about creating and fine tuning Karma configuration in the [testing guide](guide/testing#configuration).
+
+The `check` property causes the tool to enforce a minimum of 80% code coverage when the unit tests are run in the project.
+
+Read more on coverage configuration options in the [karma coverage documentation](https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md).
diff --git a/adev-es/src/content/guide/testing/code-coverage.md b/adev-es/src/content/guide/testing/code-coverage.md
index 2ea638b..cffedf8 100644
--- a/adev-es/src/content/guide/testing/code-coverage.md
+++ b/adev-es/src/content/guide/testing/code-coverage.md
@@ -1,19 +1,19 @@
-# Find out how much code you're testing
+# Descubrir cuánto código estás probando
-The Angular CLI can run unit tests and create code coverage reports.
-Code coverage reports show you any parts of your code base that might not be properly tested by your unit tests.
+Angular CLI puede ejecutar pruebas unitarias y crear reportes de cobertura de código.
+Los reportes de cobertura de código te muestran cualquier parte de tu código base que podría no estar correctamente probada por tus pruebas unitarias.
-To generate a coverage report run the following command in the root of your project.
+Para generar un reporte de cobertura ejecuta el siguiente comando en la raíz de tu proyecto.
ng test --no-watch --code-coverage
-When the tests are complete, the command creates a new `/coverage` directory in the project.
-Open the `index.html` file to see a report with your source code and code coverage values.
+Cuando las pruebas estén completas, el comando crea un nuevo directorio `/coverage` en el proyecto.
+Abre el archivo `index.html` para ver un reporte con tu código fuente y valores de cobertura de código.
-If you want to create code-coverage reports every time you test, set the following option in the Angular CLI configuration file, `angular.json`:
+Si quieres crear reportes de cobertura de código cada vez que pruebas, establece la siguiente opción en el archivo de configuración de Angular CLI, `angular.json`:
"test": {
@@ -23,13 +23,13 @@ If you want to create code-coverage reports every time you test, set the followi
}
-## Code coverage enforcement
+## Aplicación de cobertura de código
-The code coverage percentages let you estimate how much of your code is tested.
-If your team decides on a set minimum amount to be unit tested, enforce this minimum with the Angular CLI.
+Los porcentajes de cobertura de código te permiten estimar cuánto de tu código está probado.
+Si tu equipo decide sobre una cantidad mínima establecida para ser probada unitariamente, aplica este mínimo con Angular CLI.
-For example, suppose you want the code base to have a minimum of 80% code coverage.
-To enable this, open the [Karma](https://karma-runner.github.io) test platform configuration file, `karma.conf.js`, and add the `check` property in the `coverageReporter:` key.
+Por ejemplo, supón que quieres que la base de código tenga un mínimo de 80% de cobertura de código.
+Para habilitar esto, abre el archivo de configuración de la plataforma de pruebas [Karma](https://karma-runner.github.io), `karma.conf.js`, y agrega la propiedad `check` en la clave `coverageReporter:`.
coverageReporter: {
@@ -50,8 +50,8 @@ coverageReporter: {
}
-HELPFUL: Read more about creating and fine tuning Karma configuration in the [testing guide](guide/testing#configuration).
+ÚTIL: Lee más sobre crear y ajustar la configuración de Karma en la [guía de pruebas](guide/testing#configuration).
-The `check` property causes the tool to enforce a minimum of 80% code coverage when the unit tests are run in the project.
+La propiedad `check` hace que la herramienta aplique un mínimo de 80% de cobertura de código cuando las pruebas unitarias se ejecutan en el proyecto.
-Read more on coverage configuration options in the [karma coverage documentation](https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md).
+Lee más sobre opciones de configuración de cobertura en la [documentación de karma coverage](https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md).
diff --git a/adev-es/src/content/guide/testing/component-harnesses-overview.en.md b/adev-es/src/content/guide/testing/component-harnesses-overview.en.md
new file mode 100644
index 0000000..a1cc469
--- /dev/null
+++ b/adev-es/src/content/guide/testing/component-harnesses-overview.en.md
@@ -0,0 +1,31 @@
+# Component harnesses overview
+
+A component harness is a class that allows tests to interact with components the way an end user does via a supported API. You can create test harnesses for any component, ranging from small reusable widgets to full pages.
+
+Harnesses offer several benefits:
+
+- They make tests less brittle by insulating themselves against implementation details of a component, such as its DOM structure
+- They make tests become more readable and easier to maintain
+- They can be used across multiple testing environments
+
+
+// Example of test with a harness for a component called MyButtonComponent
+it('should load button with exact text', async () => {
+ const button = await loader.getHarness(MyButtonComponentHarness);
+ expect(await button.getText()).toBe('Confirm');
+});
+
+
+Component harnesses are especially useful for shared UI widgets. Developers often write tests that depend on private implementation details of widgets, such as DOM structure and CSS classes. Those dependencies make tests brittle and hard to maintain. Harnesses offer an alternative— a supported API that interacts with the widget the same way an end-user does. Widget implementation changes now become less likely to break user tests. For example, [Angular Material](https://material.angular.dev/components/categories) provides a test harness for each component in the library.
+
+Component harnesses support multiple testing environments. You can use the same harness implementation in both unit and end-to-end tests. Test authors only need to learn one API and component authors don't have to maintain separate unit and end-to-end test implementations.
+
+Many developers can be categorized by one of the following developer type categories: test authors, component harness authors, and harness environment authors. Use the table below to find the most relevant section in this guide based on these categories:
+
+| Developer Type | Description | Relevant Section |
+| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------- |
+| Test Authors | Developers that use component harnesses written by someone else to test their application. For example, this could be an app developer who uses a third-party menu component and needs to interact with the menu in a unit test. | [Using component harnesses in tests](guide/testing/using-component-harnesses) |
+| Component harness authors | Developers who maintain some reusable Angular components and want to create a test harness for its users to use in their tests. For example, an author of a third party Angular component library or a developer who maintains a set of common components for a large Angular application. | [Creating component harnesses for your components](guide/testing/creating-component-harnesses) |
+| Harness environment authors | Developers who want to add support for using component harnesses in additional testing environments. For information on supported testing environments out-of-the-box, see the [test harness environments and loaders](guide/testing/using-component-harnesses#test-harness-environments-and-loaders). | [Adding support for additional testing environments](guide/testing/component-harnesses-testing-environments) |
+
+For the full API reference, please see the [Angular CDK's component harness API reference page](/api#angular_cdk_testing).
diff --git a/adev-es/src/content/guide/testing/component-harnesses-overview.md b/adev-es/src/content/guide/testing/component-harnesses-overview.md
index a1cc469..a7ff8f4 100644
--- a/adev-es/src/content/guide/testing/component-harnesses-overview.md
+++ b/adev-es/src/content/guide/testing/component-harnesses-overview.md
@@ -1,31 +1,31 @@
-# Component harnesses overview
+# Visión general de component harnesses
-A component harness is a class that allows tests to interact with components the way an end user does via a supported API. You can create test harnesses for any component, ranging from small reusable widgets to full pages.
+Un component harness es una clase que permite a las pruebas interactuar con componentes de la manera en que un usuario final lo hace a través de una API soportada. Puedes crear test harnesses para cualquier componente, desde pequeños widgets reutilizables hasta páginas completas.
-Harnesses offer several benefits:
+Los harnesses ofrecen varios beneficios:
-- They make tests less brittle by insulating themselves against implementation details of a component, such as its DOM structure
-- They make tests become more readable and easier to maintain
-- They can be used across multiple testing environments
+- Hacen que las pruebas sean menos frágiles al aislarse contra detalles de implementación de un componente, como su estructura DOM
+- Hacen que las pruebas se vuelvan más legibles y más fáciles de mantener
+- Pueden usarse en múltiples entornos de pruebas
-// Example of test with a harness for a component called MyButtonComponent
+// Ejemplo de prueba con un harness para un componente llamado MyButtonComponent
it('should load button with exact text', async () => {
const button = await loader.getHarness(MyButtonComponentHarness);
expect(await button.getText()).toBe('Confirm');
});
-Component harnesses are especially useful for shared UI widgets. Developers often write tests that depend on private implementation details of widgets, such as DOM structure and CSS classes. Those dependencies make tests brittle and hard to maintain. Harnesses offer an alternative— a supported API that interacts with the widget the same way an end-user does. Widget implementation changes now become less likely to break user tests. For example, [Angular Material](https://material.angular.dev/components/categories) provides a test harness for each component in the library.
+Los component harnesses son especialmente útiles para widgets de UI compartidos. Los desarrolladores a menudo escriben pruebas que dependen de detalles privados de implementación de widgets, como estructura DOM y clases CSS. Esas dependencias hacen que las pruebas sean frágiles y difíciles de mantener. Los harnesses ofrecen una alternativa— una API soportada que interactúa con el widget de la misma manera que un usuario final lo hace. Los cambios de implementación del widget ahora se vuelven menos propensos a romper las pruebas de usuario. Por ejemplo, [Angular Material](https://material.angular.dev/components/categories) proporciona un test harness para cada componente en la librería.
-Component harnesses support multiple testing environments. You can use the same harness implementation in both unit and end-to-end tests. Test authors only need to learn one API and component authors don't have to maintain separate unit and end-to-end test implementations.
+Los component harnesses soportan múltiples entornos de pruebas. Puedes usar la misma implementación de harness en pruebas tanto unitarias como end-to-end. Los autores de pruebas solo necesitan aprender una API y los autores de componentes no tienen que mantener implementaciones de prueba unitaria y end-to-end separadas.
-Many developers can be categorized by one of the following developer type categories: test authors, component harness authors, and harness environment authors. Use the table below to find the most relevant section in this guide based on these categories:
+Muchos desarrolladores pueden categorizarse por una de las siguientes categorías de tipo de desarrollador: autores de pruebas, autores de component harness y autores de entornos de harness. Usa la tabla a continuación para encontrar la sección más relevante en esta guía basada en estas categorías:
-| Developer Type | Description | Relevant Section |
+| Tipo de Desarrollador | Descripción | Sección Relevante |
| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------- |
-| Test Authors | Developers that use component harnesses written by someone else to test their application. For example, this could be an app developer who uses a third-party menu component and needs to interact with the menu in a unit test. | [Using component harnesses in tests](guide/testing/using-component-harnesses) |
-| Component harness authors | Developers who maintain some reusable Angular components and want to create a test harness for its users to use in their tests. For example, an author of a third party Angular component library or a developer who maintains a set of common components for a large Angular application. | [Creating component harnesses for your components](guide/testing/creating-component-harnesses) |
-| Harness environment authors | Developers who want to add support for using component harnesses in additional testing environments. For information on supported testing environments out-of-the-box, see the [test harness environments and loaders](guide/testing/using-component-harnesses#test-harness-environments-and-loaders). | [Adding support for additional testing environments](guide/testing/component-harnesses-testing-environments) |
+| Autores de pruebas | Desarrolladores que usan component harnesses escritos por alguien más para probar su aplicación. Por ejemplo, esto podría ser un desarrollador de aplicaciones que usa un componente de menú de terceros y necesita interactuar con el menú en una prueba unitaria. | [Usar component harnesses en pruebas](guide/testing/using-component-harnesses) |
+| Autores de component harness | Desarrolladores que mantienen algunos componentes Angular reutilizables y quieren crear un test harness para que sus usuarios lo usen en sus pruebas. Por ejemplo, un autor de una librería de componentes Angular de terceros o un desarrollador que mantiene un conjunto de componentes comunes para una aplicación Angular grande. | [Crear component harnesses para tus componentes](guide/testing/creating-component-harnesses) |
+| Autores de entornos de harness | Desarrolladores que quieren agregar soporte para usar component harnesses en entornos de pruebas adicionales. Para información sobre entornos de pruebas soportados de forma inmediata, consulta los [entornos de test harness y loaders](guide/testing/using-component-harnesses#test-harness-environments-and-loaders). | [Agregar soporte para entornos de pruebas adicionales](guide/testing/component-harnesses-testing-environments) |
-For the full API reference, please see the [Angular CDK's component harness API reference page](/api#angular_cdk_testing).
+Para la referencia completa de la API, consulta la [página de referencia de la API de component harness del CDK de Angular](/api#angular_cdk_testing).
diff --git a/adev-es/src/content/guide/testing/component-harnesses-testing-environments.en.md b/adev-es/src/content/guide/testing/component-harnesses-testing-environments.en.md
new file mode 100644
index 0000000..75fa6de
--- /dev/null
+++ b/adev-es/src/content/guide/testing/component-harnesses-testing-environments.en.md
@@ -0,0 +1,62 @@
+# Adding harness support for additional testing environments
+
+## Before you start
+
+TIP: This guide assumes you've already read the [component harnesses overview guide](guide/testing/component-harnesses-overview). Read that first if you're new to using component harnesses.
+
+### When does adding support for a test environment make sense?
+
+To use component harnesses in the following environments, you can use Angular CDK's two built-in environments:
+
+- Unit tests
+- WebDriver end-to-end tests
+
+To use a supported testing environment, read the [Creating harnesses for your components guide](guide/testing/creating-component-harnesses).
+
+Otherwise, to add support for other environments, you need to define how to interact with a DOM element and how DOM interactions work in your environment. Continue reading to learn more.
+
+### CDK Installation
+
+The [Component Dev Kit (CDK)](https://material.angular.dev/cdk/categories) is a set of behavior primitives for building components. To use the component harnesses, first install `@angular/cdk` from npm. You can do this from your terminal using the Angular CLI:
+
+
+ ng add @angular/cdk
+
+
+## Creating a `TestElement` implementation
+
+Every test environment must define a `TestElement` implementation. The `TestElement` interface serves as an environment-agnostic representation of a DOM element. It enables harnesses to interact with DOM elements regardless of the underlying environment. Because some environments don't support interacting with DOM elements synchronously (e.g. WebDriver), all `TestElement` methods are asynchronous, returning a `Promise` with the result of the operation.
+
+`TestElement` offers a number of methods to interact with the underlying DOM such as `blur()`, `click()`, `getAttribute()`, and more. See the [TestElement API reference page](/api/cdk/testing/TestElement) for the full list of methods.
+
+The `TestElement` interface consists largely of methods that resemble methods available on `HTMLElement`. Similar methods exist in most test environments, which makes implementing the methods fairly straightforward. However, one important difference to note when implementing the `sendKeys` method, is that the key codes in the `TestKey` enum likely differ from the key codes used in the test environment. Environment authors should maintain a mapping from `TestKey` codes to the codes used in the particular testing environment.
+
+The [UnitTestElement](/api/cdk/testing/testbed/UnitTestElement) and [SeleniumWebDriverElement](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverElement) implementations in Angular CDK serve as good examples of implementations of this interface.
+
+## Creating a `HarnessEnvironment` implementation
+
+Test authors use `HarnessEnvironment` to create component harness instances for use in tests. `HarnessEnvironment` is an abstract class that must be extended to create a concrete subclass for the new environment. When supporting a new test environment, create a `HarnessEnvironment` subclass that adds concrete implementations for all abstract members.
+
+`HarnessEnvironment` has a generic type parameter: `HarnessEnvironment`. This parameter, `E`, represents the raw element type of the environment. For example, this parameter is Element for unit test environments.
+
+The following are the abstract methods that must be implemented:
+
+| Method | Description |
+| :----------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `abstract getDocumentRoot(): E` | Gets the root element for the environment (e.g. `document.body`). |
+| `abstract createTestElement(element: E): TestElement` | Creates a `TestElement` for the given raw element. |
+| `abstract createEnvironment(element: E): HarnessEnvironment` | Creates a `HarnessEnvironment` rooted at the given raw element. |
+| `abstract getAllRawElements(selector: string): Promise` | Gets all of the raw elements under the root element of the environment matching the given selector. |
+| `abstract forceStabilize(): Promise` | Gets a `Promise` that resolves when the `NgZone` is stable. Additionally, if applicable, tells `NgZone` to stabilize (e.g. calling `flush()` in a `fakeAsync` test). |
+| `abstract waitForTasksOutsideAngular(): Promise` | Gets a `Promise` that resolves when the parent zone of `NgZone` is stable. |
+
+In addition to implementing the missing methods, this class should provide a way for test authors to get `ComponentHarness` instances. You should define a protected constructor and provide a static method called `loader` that returns a `HarnessLoader` instance. This allows test authors to write code like: `SomeHarnessEnvironment.loader().getHarness(...)`. Depending on the needs of the particular environment, the class may provide several different static methods or require arguments to be passed. (e.g. the `loader` method on `TestbedHarnessEnvironment` takes a `ComponentFixture`, and the class provides additional static methods called `documentRootLoader` and `harnessForFixture`).
+
+The [`TestbedHarnessEnvironment`](/api/cdk/testing/testbed/TestbedHarnessEnvironment) and [SeleniumWebDriverHarnessEnvironment](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverHarnessEnvironment) implementations in Angular CDK serve as good examples of implementations of this interface.
+
+## Handling auto change detection
+
+In order to support the `manualChangeDetection` and parallel APIs, your environment should install a handler for the auto change detection status.
+
+When your environment wants to start handling the auto change detection status it can call `handleAutoChangeDetectionStatus(handler)`. The handler function will receive a `AutoChangeDetectionStatus` which has two properties `isDisabled` and `onDetectChangesNow()`. See the [AutoChangeDetectionStatus API reference page](/api/cdk/testing/AutoChangeDetectionStatus) for more information.
+If your environment wants to stop handling auto change detection status it can call `stopHandlingAutoChangeDetectionStatus()`.
diff --git a/adev-es/src/content/guide/testing/component-harnesses-testing-environments.md b/adev-es/src/content/guide/testing/component-harnesses-testing-environments.md
index 75fa6de..f4118f1 100644
--- a/adev-es/src/content/guide/testing/component-harnesses-testing-environments.md
+++ b/adev-es/src/content/guide/testing/component-harnesses-testing-environments.md
@@ -1,62 +1,62 @@
-# Adding harness support for additional testing environments
+# Agregar soporte de harness para entornos de pruebas adicionales
-## Before you start
+## Antes de comenzar
-TIP: This guide assumes you've already read the [component harnesses overview guide](guide/testing/component-harnesses-overview). Read that first if you're new to using component harnesses.
+CONSEJO: Esta guía asume que ya leíste la [guía de visión general de component harnesses](guide/testing/component-harnesses-overview). Lee eso primero si eres nuevo en el uso de component harnesses.
-### When does adding support for a test environment make sense?
+### ¿Cuándo tiene sentido agregar soporte para un entorno de prueba?
-To use component harnesses in the following environments, you can use Angular CDK's two built-in environments:
+Para usar component harnesses en los siguientes entornos, puedes usar los dos entornos integrados del CDK de Angular:
-- Unit tests
-- WebDriver end-to-end tests
+- Pruebas unitarias
+- Pruebas end-to-end de WebDriver
-To use a supported testing environment, read the [Creating harnesses for your components guide](guide/testing/creating-component-harnesses).
+Para usar un entorno de pruebas soportado, lee la [guía de Crear harnesses para tus componentes](guide/testing/creating-component-harnesses).
-Otherwise, to add support for other environments, you need to define how to interact with a DOM element and how DOM interactions work in your environment. Continue reading to learn more.
+De lo contrario, para agregar soporte para otros entornos, necesitas definir cómo interactuar con un elemento DOM y cómo funcionan las interacciones DOM en tu entorno. Continúa leyendo para aprender más.
-### CDK Installation
+### Instalación del CDK
-The [Component Dev Kit (CDK)](https://material.angular.dev/cdk/categories) is a set of behavior primitives for building components. To use the component harnesses, first install `@angular/cdk` from npm. You can do this from your terminal using the Angular CLI:
+El [Component Dev Kit (CDK)](https://material.angular.dev/cdk/categories) es un conjunto de primitivas de comportamiento para construir componentes. Para usar los component harnesses, primero instala `@angular/cdk` desde npm. Puedes hacer esto desde tu terminal usando Angular CLI:
ng add @angular/cdk
-## Creating a `TestElement` implementation
+## Crear una implementación de `TestElement`
-Every test environment must define a `TestElement` implementation. The `TestElement` interface serves as an environment-agnostic representation of a DOM element. It enables harnesses to interact with DOM elements regardless of the underlying environment. Because some environments don't support interacting with DOM elements synchronously (e.g. WebDriver), all `TestElement` methods are asynchronous, returning a `Promise` with the result of the operation.
+Cada entorno de prueba debe definir una implementación de `TestElement`. La interfaz `TestElement` sirve como una representación independiente del entorno de un elemento DOM. Permite a los harnesses interactuar con elementos DOM independientemente del entorno subyacente. Porque algunos entornos no soportan interactuar con elementos DOM de forma síncrona (p. ej., WebDriver), todos los métodos `TestElement` son asíncronos, retornando una `Promise` con el resultado de la operación.
-`TestElement` offers a number of methods to interact with the underlying DOM such as `blur()`, `click()`, `getAttribute()`, and more. See the [TestElement API reference page](/api/cdk/testing/TestElement) for the full list of methods.
+`TestElement` ofrece una cantidad de métodos para interactuar con el DOM subyacente como `blur()`, `click()`, `getAttribute()` y más. Consulta la [página de referencia de la API de TestElement](/api/cdk/testing/TestElement) para la lista completa de métodos.
-The `TestElement` interface consists largely of methods that resemble methods available on `HTMLElement`. Similar methods exist in most test environments, which makes implementing the methods fairly straightforward. However, one important difference to note when implementing the `sendKeys` method, is that the key codes in the `TestKey` enum likely differ from the key codes used in the test environment. Environment authors should maintain a mapping from `TestKey` codes to the codes used in the particular testing environment.
+La interfaz `TestElement` consiste en gran medida de métodos que se asemejan a los métodos disponibles en `HTMLElement`. Métodos similares existen en la mayoría de los entornos de prueba, lo que hace que implementar los métodos sea bastante directo. Sin embargo, una diferencia importante a notar al implementar el método `sendKeys`, es que los códigos de tecla en el enum `TestKey` probablemente difieran de los códigos de tecla usados en el entorno de prueba. Los autores de entornos deberían mantener un mapeo de códigos `TestKey` a los códigos usados en el entorno de pruebas particular.
-The [UnitTestElement](/api/cdk/testing/testbed/UnitTestElement) and [SeleniumWebDriverElement](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverElement) implementations in Angular CDK serve as good examples of implementations of this interface.
+Las implementaciones [UnitTestElement](/api/cdk/testing/testbed/UnitTestElement) y [SeleniumWebDriverElement](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverElement) en el CDK de Angular sirven como buenos ejemplos de implementaciones de esta interfaz.
-## Creating a `HarnessEnvironment` implementation
+## Crear una implementación de `HarnessEnvironment`
-Test authors use `HarnessEnvironment` to create component harness instances for use in tests. `HarnessEnvironment` is an abstract class that must be extended to create a concrete subclass for the new environment. When supporting a new test environment, create a `HarnessEnvironment` subclass that adds concrete implementations for all abstract members.
+Los autores de pruebas usan `HarnessEnvironment` para crear instancias de component harness para usar en pruebas. `HarnessEnvironment` es una clase abstracta que debe extenderse para crear una subclase concreta para el nuevo entorno. Al soportar un nuevo entorno de prueba, crea una subclase `HarnessEnvironment` que agregue implementaciones concretas para todos los miembros abstractos.
-`HarnessEnvironment` has a generic type parameter: `HarnessEnvironment`. This parameter, `E`, represents the raw element type of the environment. For example, this parameter is Element for unit test environments.
+`HarnessEnvironment` tiene un parámetro de tipo genérico: `HarnessEnvironment`. Este parámetro, `E`, representa el tipo de elemento raw del entorno. Por ejemplo, este parámetro es Element para entornos de prueba unitaria.
-The following are the abstract methods that must be implemented:
+Los siguientes son los métodos abstractos que deben implementarse:
-| Method | Description |
+| Método | Descripción |
| :----------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `abstract getDocumentRoot(): E` | Gets the root element for the environment (e.g. `document.body`). |
-| `abstract createTestElement(element: E): TestElement` | Creates a `TestElement` for the given raw element. |
-| `abstract createEnvironment(element: E): HarnessEnvironment` | Creates a `HarnessEnvironment` rooted at the given raw element. |
-| `abstract getAllRawElements(selector: string): Promise` | Gets all of the raw elements under the root element of the environment matching the given selector. |
-| `abstract forceStabilize(): Promise` | Gets a `Promise` that resolves when the `NgZone` is stable. Additionally, if applicable, tells `NgZone` to stabilize (e.g. calling `flush()` in a `fakeAsync` test). |
-| `abstract waitForTasksOutsideAngular(): Promise` | Gets a `Promise` that resolves when the parent zone of `NgZone` is stable. |
+| `abstract getDocumentRoot(): E` | Obtiene el elemento raíz para el entorno (p. ej., `document.body`). |
+| `abstract createTestElement(element: E): TestElement` | Crea un `TestElement` para el elemento raw dado. |
+| `abstract createEnvironment(element: E): HarnessEnvironment` | Crea un `HarnessEnvironment` enraizado en el elemento raw dado. |
+| `abstract getAllRawElements(selector: string): Promise` | Obtiene todos los elementos raw bajo el elemento raíz del entorno que coinciden con el selector dado. |
+| `abstract forceStabilize(): Promise` | Obtiene una `Promise` que se resuelve cuando el `NgZone` es estable. Además, si es aplicable, le dice a `NgZone` que se estabilice (p. ej., llamando `flush()` en una prueba `fakeAsync`). |
+| `abstract waitForTasksOutsideAngular(): Promise` | Obtiene una `Promise` que se resuelve cuando la zona padre de `NgZone` es estable. |
-In addition to implementing the missing methods, this class should provide a way for test authors to get `ComponentHarness` instances. You should define a protected constructor and provide a static method called `loader` that returns a `HarnessLoader` instance. This allows test authors to write code like: `SomeHarnessEnvironment.loader().getHarness(...)`. Depending on the needs of the particular environment, the class may provide several different static methods or require arguments to be passed. (e.g. the `loader` method on `TestbedHarnessEnvironment` takes a `ComponentFixture`, and the class provides additional static methods called `documentRootLoader` and `harnessForFixture`).
+Además de implementar los métodos faltantes, esta clase debería proporcionar una forma para que los autores de pruebas obtengan instancias de `ComponentHarness`. Deberías definir un constructor protegido y proporcionar un método estático llamado `loader` que retorne una instancia de `HarnessLoader`. Esto permite a los autores de pruebas escribir código como: `SomeHarnessEnvironment.loader().getHarness(...)`. Dependiendo de las necesidades del entorno particular, la clase puede proporcionar varios métodos estáticos diferentes o requerir que se pasen argumentos. (p. ej., el método `loader` en `TestbedHarnessEnvironment` toma un `ComponentFixture`, y la clase proporciona métodos estáticos adicionales llamados `documentRootLoader` y `harnessForFixture`).
-The [`TestbedHarnessEnvironment`](/api/cdk/testing/testbed/TestbedHarnessEnvironment) and [SeleniumWebDriverHarnessEnvironment](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverHarnessEnvironment) implementations in Angular CDK serve as good examples of implementations of this interface.
+Las implementaciones [`TestbedHarnessEnvironment`](/api/cdk/testing/testbed/TestbedHarnessEnvironment) y [SeleniumWebDriverHarnessEnvironment](/api/cdk/testing/selenium-webdriver/SeleniumWebDriverHarnessEnvironment) en el CDK de Angular sirven como buenos ejemplos de implementaciones de esta interfaz.
-## Handling auto change detection
+## Manejar la detección automática de cambios
-In order to support the `manualChangeDetection` and parallel APIs, your environment should install a handler for the auto change detection status.
+Para soportar las APIs `manualChangeDetection` y parallel, tu entorno debería instalar un manejador para el estado de detección automática de cambios.
-When your environment wants to start handling the auto change detection status it can call `handleAutoChangeDetectionStatus(handler)`. The handler function will receive a `AutoChangeDetectionStatus` which has two properties `isDisabled` and `onDetectChangesNow()`. See the [AutoChangeDetectionStatus API reference page](/api/cdk/testing/AutoChangeDetectionStatus) for more information.
-If your environment wants to stop handling auto change detection status it can call `stopHandlingAutoChangeDetectionStatus()`.
+Cuando tu entorno quiera comenzar a manejar el estado de detección automática de cambios puede llamar a `handleAutoChangeDetectionStatus(handler)`. La función handler recibirá un `AutoChangeDetectionStatus` que tiene dos propiedades `isDisabled` y `onDetectChangesNow()`. Consulta la [página de referencia de la API de AutoChangeDetectionStatus](/api/cdk/testing/AutoChangeDetectionStatus) para más información.
+Si tu entorno quiere dejar de manejar el estado de detección automática de cambios puede llamar a `stopHandlingAutoChangeDetectionStatus()`.
diff --git a/adev-es/src/content/guide/testing/components-basics.en.md b/adev-es/src/content/guide/testing/components-basics.en.md
new file mode 100644
index 0000000..e22f608
--- /dev/null
+++ b/adev-es/src/content/guide/testing/components-basics.en.md
@@ -0,0 +1,181 @@
+# Basics of testing components
+
+A component, unlike all other parts of an Angular application, combines an HTML template and a TypeScript class.
+The component truly is the template and the class *working together*.
+To adequately test a component, you should test that they work together as intended.
+
+Such tests require creating the component's host element in the browser DOM, as Angular does, and investigating the component class's interaction with the DOM as described by its template.
+
+The Angular `TestBed` facilitates this kind of testing as you'll see in the following sections.
+But in many cases, *testing the component class alone*, without DOM involvement, can validate much of the component's behavior in a straightforward, more obvious way.
+
+## Component DOM testing
+
+A component is more than just its class.
+A component interacts with the DOM and with other components.
+Classes alone cannot tell you if the component is going to render properly, respond to user input and gestures, or integrate with its parent and child components.
+
+* Is `Lightswitch.clicked()` bound to anything such that the user can invoke it?
+* Is the `Lightswitch.message` displayed?
+* Can the user actually select the hero displayed by `DashboardHeroComponent`?
+* Is the hero name displayed as expected \(such as uppercase\)?
+* Is the welcome message displayed by the template of `WelcomeComponent`?
+
+These might not be troubling questions for the preceding simple components illustrated.
+But many components have complex interactions with the DOM elements described in their templates, causing HTML to appear and disappear as the component state changes.
+
+To answer these kinds of questions, you have to create the DOM elements associated with the components, you must examine the DOM to confirm that component state displays properly at the appropriate times, and you must simulate user interaction with the screen to determine whether those interactions cause the component to behave as expected.
+
+To write these kinds of test, you'll use additional features of the `TestBed` as well as other testing helpers.
+
+### CLI-generated tests
+
+The CLI creates an initial test file for you by default when you ask it to generate a new component.
+
+For example, the following CLI command generates a `BannerComponent` in the `app/banner` folder \(with inline template and styles\):
+
+
+
+ng generate component banner --inline-template --inline-style --module app
+
+
+
+It also generates an initial test file for the component, `banner-external.component.spec.ts`, that looks like this:
+
+
+
+HELPFUL: Because `compileComponents` is asynchronous, it uses the [`waitForAsync`](api/core/testing/waitForAsync) utility function imported from `@angular/core/testing`.
+
+Refer to the [waitForAsync](guide/testing/components-scenarios#waitForAsync) section for more details.
+
+### Reduce the setup
+
+Only the last three lines of this file actually test the component and all they do is assert that Angular can create the component.
+
+The rest of the file is boilerplate setup code anticipating more advanced tests that *might* become necessary if the component evolves into something substantial.
+
+You'll learn about these advanced test features in the following sections.
+For now, you can radically reduce this test file to a more manageable size:
+
+
+
+In this example, the metadata object passed to `TestBed.configureTestingModule` simply declares `BannerComponent`, the component to test.
+
+
+
+HELPFUL: There's no need to declare or import anything else.
+The default test module is pre-configured with something like the `BrowserModule` from `@angular/platform-browser`.
+
+Later you'll call `TestBed.configureTestingModule()` with imports, providers, and more declarations to suit your testing needs.
+Optional `override` methods can further fine-tune aspects of the configuration.
+
+### `createComponent()`
+
+After configuring `TestBed`, you call its `createComponent()` method.
+
+
+
+`TestBed.createComponent()` creates an instance of the `BannerComponent`, adds a corresponding element to the test-runner DOM, and returns a [`ComponentFixture`](#componentfixture).
+
+IMPORTANT: Do not re-configure `TestBed` after calling `createComponent`.
+
+The `createComponent` method freezes the current `TestBed` definition, closing it to further configuration.
+
+You cannot call any more `TestBed` configuration methods, not `configureTestingModule()`, nor `get()`, nor any of the `override...` methods.
+If you try, `TestBed` throws an error.
+
+### `ComponentFixture`
+
+The [ComponentFixture](api/core/testing/ComponentFixture) is a test harness for interacting with the created component and its corresponding element.
+
+Access the component instance through the fixture and confirm it exists with a Jasmine expectation:
+
+
+
+### `beforeEach()`
+
+You will add more tests as this component evolves.
+Rather than duplicate the `TestBed` configuration for each test, you refactor to pull the setup into a Jasmine `beforeEach()` and some supporting variables:
+
+
+
+Now add a test that gets the component's element from `fixture.nativeElement` and looks for the expected text.
+
+
+
+### `nativeElement`
+
+The value of `ComponentFixture.nativeElement` has the `any` type.
+Later you'll encounter the `DebugElement.nativeElement` and it too has the `any` type.
+
+Angular can't know at compile time what kind of HTML element the `nativeElement` is or if it even is an HTML element.
+The application might be running on a *non-browser platform*, such as the server or a [Web Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API), where the element might have a diminished API or not exist at all.
+
+The tests in this guide are designed to run in a browser so a `nativeElement` value will always be an `HTMLElement` or one of its derived classes.
+
+Knowing that it is an `HTMLElement` of some sort, use the standard HTML `querySelector` to dive deeper into the element tree.
+
+Here's another test that calls `HTMLElement.querySelector` to get the paragraph element and look for the banner text:
+
+
+
+### `DebugElement`
+
+The Angular *fixture* provides the component's element directly through the `fixture.nativeElement`.
+
+
+
+This is actually a convenience method, implemented as `fixture.debugElement.nativeElement`.
+
+
+
+There's a good reason for this circuitous path to the element.
+
+The properties of the `nativeElement` depend upon the runtime environment.
+You could be running these tests on a *non-browser* platform that doesn't have a DOM or whose DOM-emulation doesn't support the full `HTMLElement` API.
+
+Angular relies on the `DebugElement` abstraction to work safely across *all supported platforms*.
+Instead of creating an HTML element tree, Angular creates a `DebugElement` tree that wraps the *native elements* for the runtime platform.
+The `nativeElement` property unwraps the `DebugElement` and returns the platform-specific element object.
+
+Because the sample tests for this guide are designed to run only in a browser, a `nativeElement` in these tests is always an `HTMLElement` whose familiar methods and properties you can explore within a test.
+
+Here's the previous test, re-implemented with `fixture.debugElement.nativeElement`:
+
+
+
+The `DebugElement` has other methods and properties that are useful in tests, as you'll see elsewhere in this guide.
+
+You import the `DebugElement` symbol from the Angular core library.
+
+
+
+### `By.css()`
+
+Although the tests in this guide all run in the browser, some applications might run on a different platform at least some of the time.
+
+For example, the component might render first on the server as part of a strategy to make the application launch faster on poorly connected devices.
+The server-side renderer might not support the full HTML element API.
+If it doesn't support `querySelector`, the previous test could fail.
+
+The `DebugElement` offers query methods that work for all supported platforms.
+These query methods take a *predicate* function that returns `true` when a node in the `DebugElement` tree matches the selection criteria.
+
+You create a *predicate* with the help of a `By` class imported from a library for the runtime platform.
+Here's the `By` import for the browser platform:
+
+
+
+The following example re-implements the previous test with `DebugElement.query()` and the browser's `By.css` method.
+
+
+
+Some noteworthy observations:
+
+* The `By.css()` static method selects `DebugElement` nodes with a [standard CSS selector](https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Selectors 'CSS selectors').
+* The query returns a `DebugElement` for the paragraph.
+* You must unwrap that result to get the paragraph element.
+
+When you're filtering by CSS selector and only testing properties of a browser's *native element*, the `By.css` approach might be overkill.
+
+It's often more straightforward and clear to filter with a standard `HTMLElement` method such as `querySelector()` or `querySelectorAll()`.
diff --git a/adev-es/src/content/guide/testing/components-basics.md b/adev-es/src/content/guide/testing/components-basics.md
index e22f608..561c1cc 100644
--- a/adev-es/src/content/guide/testing/components-basics.md
+++ b/adev-es/src/content/guide/testing/components-basics.md
@@ -1,38 +1,38 @@
-# Basics of testing components
+# Fundamentos de probar componentes
-A component, unlike all other parts of an Angular application, combines an HTML template and a TypeScript class.
-The component truly is the template and the class *working together*.
-To adequately test a component, you should test that they work together as intended.
+Un componente, a diferencia de todas las otras partes de una aplicación Angular, combina una plantilla HTML y una clase TypeScript.
+El componente verdaderamente es la plantilla y la clase *trabajando juntas*.
+Para probar adecuadamente un componente, deberías probar que trabajen juntos como se pretende.
-Such tests require creating the component's host element in the browser DOM, as Angular does, and investigating the component class's interaction with the DOM as described by its template.
+Tales pruebas requieren crear el elemento host del componente en el DOM del navegador, como hace Angular, e investigar la interacción de la clase del componente con el DOM como se describe en su plantilla.
-The Angular `TestBed` facilitates this kind of testing as you'll see in the following sections.
-But in many cases, *testing the component class alone*, without DOM involvement, can validate much of the component's behavior in a straightforward, more obvious way.
+El `TestBed` de Angular facilita este tipo de pruebas como verás en las siguientes secciones.
+Pero en muchos casos, *probar la clase del componente sola*, sin involucramiento del DOM, puede validar mucho del comportamiento del componente de una manera más directa y obvia.
-## Component DOM testing
+## Pruebas del DOM de componentes
-A component is more than just its class.
-A component interacts with the DOM and with other components.
-Classes alone cannot tell you if the component is going to render properly, respond to user input and gestures, or integrate with its parent and child components.
+Un componente es más que solo su clase.
+Un componente interactúa con el DOM y con otros componentes.
+Las clases solas no pueden decirte si el componente va a renderizar correctamente, responder a la entrada y gestos del usuario, o integrarse con sus componentes padre e hijo.
-* Is `Lightswitch.clicked()` bound to anything such that the user can invoke it?
-* Is the `Lightswitch.message` displayed?
-* Can the user actually select the hero displayed by `DashboardHeroComponent`?
-* Is the hero name displayed as expected \(such as uppercase\)?
-* Is the welcome message displayed by the template of `WelcomeComponent`?
+* ¿Está `Lightswitch.clicked()` vinculado a algo de modo que el usuario pueda invocarlo?
+* ¿Se muestra el `Lightswitch.message`?
+* ¿Puede el usuario realmente seleccionar el héroe mostrado por `DashboardHeroComponent`?
+* ¿Se muestra el nombre del héroe como se espera \(como mayúsculas\)?
+* ¿Se muestra el mensaje de bienvenida por la plantilla de `WelcomeComponent`?
-These might not be troubling questions for the preceding simple components illustrated.
-But many components have complex interactions with the DOM elements described in their templates, causing HTML to appear and disappear as the component state changes.
+Estas podrían no ser preguntas problemáticas para los componentes simples precedentes ilustrados.
+Pero muchos componentes tienen interacciones complejas con los elementos DOM descritos en sus plantillas, causando que HTML aparezca y desaparezca a medida que el estado del componente cambia.
-To answer these kinds of questions, you have to create the DOM elements associated with the components, you must examine the DOM to confirm that component state displays properly at the appropriate times, and you must simulate user interaction with the screen to determine whether those interactions cause the component to behave as expected.
+Para responder estos tipos de preguntas, tienes que crear los elementos DOM asociados con los componentes, debes examinar el DOM para confirmar que el estado del componente se muestra correctamente en los momentos apropiados, y debes simular la interacción del usuario con la pantalla para determinar si esas interacciones hacen que el componente se comporte como se espera.
-To write these kinds of test, you'll use additional features of the `TestBed` as well as other testing helpers.
+Para escribir estos tipos de prueba, usarás características adicionales del `TestBed` así como otros helpers de pruebas.
-### CLI-generated tests
+### Pruebas generadas por el CLI
-The CLI creates an initial test file for you by default when you ask it to generate a new component.
+El CLI crea un archivo de prueba inicial para ti por defecto cuando le pides que genere un nuevo componente.
-For example, the following CLI command generates a `BannerComponent` in the `app/banner` folder \(with inline template and styles\):
+Por ejemplo, el siguiente comando del CLI genera un `BannerComponent` en la carpeta `app/banner` \(con plantilla y estilos inline\):
@@ -40,142 +40,142 @@ ng generate component banner --inline-template --inline-style --module app
-It also generates an initial test file for the component, `banner-external.component.spec.ts`, that looks like this:
+También genera un archivo de prueba inicial para el componente, `banner-external.component.spec.ts`, que se ve así:
-HELPFUL: Because `compileComponents` is asynchronous, it uses the [`waitForAsync`](api/core/testing/waitForAsync) utility function imported from `@angular/core/testing`.
+ÚTIL: Porque `compileComponents` es asíncrono, usa la función utilitaria [`waitForAsync`](api/core/testing/waitForAsync) importada de `@angular/core/testing`.
-Refer to the [waitForAsync](guide/testing/components-scenarios#waitForAsync) section for more details.
+Consulta la sección [waitForAsync](guide/testing/components-scenarios#waitForAsync) para más detalles.
-### Reduce the setup
+### Reducir la configuración
-Only the last three lines of this file actually test the component and all they do is assert that Angular can create the component.
+Solo las últimas tres líneas de este archivo realmente prueban el componente y todo lo que hacen es afirmar que Angular puede crear el componente.
-The rest of the file is boilerplate setup code anticipating more advanced tests that *might* become necessary if the component evolves into something substantial.
+El resto del archivo es código de configuración boilerplate anticipando pruebas más avanzadas que *podrían* volverse necesarias si el componente evoluciona en algo sustancial.
-You'll learn about these advanced test features in the following sections.
-For now, you can radically reduce this test file to a more manageable size:
+Aprenderás sobre estas características de prueba avanzadas en las siguientes secciones.
+Por ahora, puedes reducir radicalmente este archivo de prueba a un tamaño más manejable:
-In this example, the metadata object passed to `TestBed.configureTestingModule` simply declares `BannerComponent`, the component to test.
+En este ejemplo, el objeto de metadata pasado a `TestBed.configureTestingModule` simplemente declara `BannerComponent`, el componente a probar.
-HELPFUL: There's no need to declare or import anything else.
-The default test module is pre-configured with something like the `BrowserModule` from `@angular/platform-browser`.
+ÚTIL: No hay necesidad de declarar o importar nada más.
+El módulo de prueba por defecto está pre-configurado con algo como el `BrowserModule` de `@angular/platform-browser`.
-Later you'll call `TestBed.configureTestingModule()` with imports, providers, and more declarations to suit your testing needs.
-Optional `override` methods can further fine-tune aspects of the configuration.
+Más tarde llamarás a `TestBed.configureTestingModule()` con imports, providers y más declarations para adaptarse a tus necesidades de pruebas.
+Métodos `override` opcionales pueden ajustar aún más aspectos de la configuración.
### `createComponent()`
-After configuring `TestBed`, you call its `createComponent()` method.
+Después de configurar `TestBed`, llamas a su método `createComponent()`.
-`TestBed.createComponent()` creates an instance of the `BannerComponent`, adds a corresponding element to the test-runner DOM, and returns a [`ComponentFixture`](#componentfixture).
+`TestBed.createComponent()` crea una instancia del `BannerComponent`, agrega un elemento correspondiente al DOM del test-runner, y retorna un [`ComponentFixture`](#componentfixture).
-IMPORTANT: Do not re-configure `TestBed` after calling `createComponent`.
+IMPORTANTE: No re-configures `TestBed` después de llamar a `createComponent`.
-The `createComponent` method freezes the current `TestBed` definition, closing it to further configuration.
+El método `createComponent` congela la definición actual del `TestBed`, cerrándola a más configuración.
-You cannot call any more `TestBed` configuration methods, not `configureTestingModule()`, nor `get()`, nor any of the `override...` methods.
-If you try, `TestBed` throws an error.
+No puedes llamar más métodos de configuración del `TestBed`, ni `configureTestingModule()`, ni `get()`, ni ninguno de los métodos `override...`.
+Si lo intentas, `TestBed` lanza un error.
### `ComponentFixture`
-The [ComponentFixture](api/core/testing/ComponentFixture) is a test harness for interacting with the created component and its corresponding element.
+El [ComponentFixture](api/core/testing/ComponentFixture) es un harness de prueba para interactuar con el componente creado y su elemento correspondiente.
-Access the component instance through the fixture and confirm it exists with a Jasmine expectation:
+Accede a la instancia del componente a través del fixture y confirma que existe con una expectativa de Jasmine:
### `beforeEach()`
-You will add more tests as this component evolves.
-Rather than duplicate the `TestBed` configuration for each test, you refactor to pull the setup into a Jasmine `beforeEach()` and some supporting variables:
+Agregarás más pruebas a medida que este componente evolucione.
+En lugar de duplicar la configuración del `TestBed` para cada prueba, refactoriza para sacar la configuración en un `beforeEach()` de Jasmine y algunas variables de soporte:
-Now add a test that gets the component's element from `fixture.nativeElement` and looks for the expected text.
+Ahora agrega una prueba que obtiene el elemento del componente de `fixture.nativeElement` y busca el texto esperado.
### `nativeElement`
-The value of `ComponentFixture.nativeElement` has the `any` type.
-Later you'll encounter the `DebugElement.nativeElement` and it too has the `any` type.
+El valor de `ComponentFixture.nativeElement` tiene el tipo `any`.
+Más tarde encontrarás el `DebugElement.nativeElement` y también tiene el tipo `any`.
-Angular can't know at compile time what kind of HTML element the `nativeElement` is or if it even is an HTML element.
-The application might be running on a *non-browser platform*, such as the server or a [Web Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API), where the element might have a diminished API or not exist at all.
+Angular no puede saber en tiempo de compilación qué tipo de elemento HTML es el `nativeElement` o si siquiera es un elemento HTML.
+La aplicación podría estar ejecutándose en una *plataforma no-navegador*, como el servidor o un [Web Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API), donde el elemento podría tener una API disminuida o no existir en absoluto.
-The tests in this guide are designed to run in a browser so a `nativeElement` value will always be an `HTMLElement` or one of its derived classes.
+Las pruebas en esta guía están diseñadas para ejecutarse en un navegador, por lo que un valor `nativeElement` siempre será un `HTMLElement` o una de sus clases derivadas.
-Knowing that it is an `HTMLElement` of some sort, use the standard HTML `querySelector` to dive deeper into the element tree.
+Sabiendo que es un `HTMLElement` de algún tipo, usa el `querySelector` HTML estándar para profundizar en el árbol de elementos.
-Here's another test that calls `HTMLElement.querySelector` to get the paragraph element and look for the banner text:
+Aquí hay otra prueba que llama a `HTMLElement.querySelector` para obtener el elemento párrafo y buscar el texto del banner:
### `DebugElement`
-The Angular *fixture* provides the component's element directly through the `fixture.nativeElement`.
+El *fixture* de Angular proporciona el elemento del componente directamente a través del `fixture.nativeElement`.
-This is actually a convenience method, implemented as `fixture.debugElement.nativeElement`.
+Esto es en realidad un método de conveniencia, implementado como `fixture.debugElement.nativeElement`.
-There's a good reason for this circuitous path to the element.
+Hay una buena razón para esta ruta indirecta al elemento.
-The properties of the `nativeElement` depend upon the runtime environment.
-You could be running these tests on a *non-browser* platform that doesn't have a DOM or whose DOM-emulation doesn't support the full `HTMLElement` API.
+Las propiedades del `nativeElement` dependen del entorno de ejecución.
+Podrías estar ejecutando estas pruebas en una plataforma *no-navegador* que no tiene un DOM o cuya emulación de DOM no soporta la API completa de `HTMLElement`.
-Angular relies on the `DebugElement` abstraction to work safely across *all supported platforms*.
-Instead of creating an HTML element tree, Angular creates a `DebugElement` tree that wraps the *native elements* for the runtime platform.
-The `nativeElement` property unwraps the `DebugElement` and returns the platform-specific element object.
+Angular depende de la abstracción `DebugElement` para trabajar de forma segura en *todas las plataformas soportadas*.
+En lugar de crear un árbol de elementos HTML, Angular crea un árbol `DebugElement` que envuelve los *elementos nativos* para la plataforma de ejecución.
+La propiedad `nativeElement` desenvuelve el `DebugElement` y retorna el objeto de elemento específico de la plataforma.
-Because the sample tests for this guide are designed to run only in a browser, a `nativeElement` in these tests is always an `HTMLElement` whose familiar methods and properties you can explore within a test.
+Porque las pruebas de muestra para esta guía están diseñadas para ejecutarse solo en un navegador, un `nativeElement` en estas pruebas es siempre un `HTMLElement` cuyos métodos y propiedades familiares puedes explorar dentro de una prueba.
-Here's the previous test, re-implemented with `fixture.debugElement.nativeElement`:
+Aquí está la prueba anterior, re-implementada con `fixture.debugElement.nativeElement`:
-The `DebugElement` has other methods and properties that are useful in tests, as you'll see elsewhere in this guide.
+El `DebugElement` tiene otros métodos y propiedades que son útiles en pruebas, como verás en otros lugares de esta guía.
-You import the `DebugElement` symbol from the Angular core library.
+Importas el símbolo `DebugElement` de la librería core de Angular.
### `By.css()`
-Although the tests in this guide all run in the browser, some applications might run on a different platform at least some of the time.
+Aunque las pruebas en esta guía todas se ejecutan en el navegador, algunas aplicaciones podrían ejecutarse en una plataforma diferente al menos parte del tiempo.
-For example, the component might render first on the server as part of a strategy to make the application launch faster on poorly connected devices.
-The server-side renderer might not support the full HTML element API.
-If it doesn't support `querySelector`, the previous test could fail.
+Por ejemplo, el componente podría renderizar primero en el servidor como parte de una estrategia para hacer que la aplicación se inicie más rápido en dispositivos pobremente conectados.
+El renderizador del lado del servidor podría no soportar la API completa de elementos HTML.
+Si no soporta `querySelector`, la prueba anterior podría fallar.
-The `DebugElement` offers query methods that work for all supported platforms.
-These query methods take a *predicate* function that returns `true` when a node in the `DebugElement` tree matches the selection criteria.
+El `DebugElement` ofrece métodos de consulta que funcionan para todas las plataformas soportadas.
+Estos métodos de consulta toman una función *predicate* que retorna `true` cuando un nodo en el árbol `DebugElement` coincide con los criterios de selección.
-You create a *predicate* with the help of a `By` class imported from a library for the runtime platform.
-Here's the `By` import for the browser platform:
+Creas un *predicate* con la ayuda de una clase `By` importada de una librería para la plataforma de ejecución.
+Aquí está el import `By` para la plataforma navegador:
-The following example re-implements the previous test with `DebugElement.query()` and the browser's `By.css` method.
+El siguiente ejemplo re-implementa la prueba anterior con `DebugElement.query()` y el método `By.css` del navegador.
-Some noteworthy observations:
+Algunas observaciones dignas de mención:
-* The `By.css()` static method selects `DebugElement` nodes with a [standard CSS selector](https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Selectors 'CSS selectors').
-* The query returns a `DebugElement` for the paragraph.
-* You must unwrap that result to get the paragraph element.
+* El método estático `By.css()` selecciona nodos `DebugElement` con un [selector CSS estándar](https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Selectors 'CSS selectors').
+* La consulta retorna un `DebugElement` para el párrafo.
+* Debes desenvolver ese resultado para obtener el elemento párrafo.
-When you're filtering by CSS selector and only testing properties of a browser's *native element*, the `By.css` approach might be overkill.
+Cuando estás filtrando por selector CSS y solo probando propiedades del *elemento nativo* de un navegador, el enfoque `By.css` podría ser excesivo.
-It's often more straightforward and clear to filter with a standard `HTMLElement` method such as `querySelector()` or `querySelectorAll()`.
+A menudo es más directo y claro filtrar con un método `HTMLElement` estándar como `querySelector()` o `querySelectorAll()`.
diff --git a/adev-es/src/content/guide/testing/components-scenarios.en.md b/adev-es/src/content/guide/testing/components-scenarios.en.md
new file mode 100644
index 0000000..7efc281
--- /dev/null
+++ b/adev-es/src/content/guide/testing/components-scenarios.en.md
@@ -0,0 +1,809 @@
+# Component testing scenarios
+
+This guide explores common component testing use cases.
+
+## Component binding
+
+In the example application, the `BannerComponent` presents static title text in the HTML template.
+
+After a few changes, the `BannerComponent` presents a dynamic title by binding to the component's `title` property like this.
+
+
+
+As minimal as this is, you decide to add a test to confirm that component actually displays the right content where you think it should.
+
+### Query for the `
`
+
+You'll write a sequence of tests that inspect the value of the `
` element that wraps the *title* property interpolation binding.
+
+You update the `beforeEach` to find that element with a standard HTML `querySelector` and assign it to the `h1` variable.
+
+
+
+### `createComponent()` does not bind data
+
+For your first test you'd like to see that the screen displays the default `title`.
+Your instinct is to write a test that immediately inspects the `
` like this:
+
+
+
+*That test fails* with the message:
+
+
+
+expected '' to contain 'Test Tour of Heroes'.
+
+
+
+Binding happens when Angular performs **change detection**.
+
+In production, change detection kicks in automatically when Angular creates a component or the user enters a keystroke, for example.
+
+The `TestBed.createComponent` does not trigger change detection by default; a fact confirmed in the revised test:
+
+
+
+### `detectChanges()`
+
+You can tell the `TestBed` to perform data binding by calling `fixture.detectChanges()`.
+Only then does the `
` have the expected title.
+
+
+
+Delayed change detection is intentional and useful.
+It gives the tester an opportunity to inspect and change the state of the component *before Angular initiates data binding and calls [lifecycle hooks](guide/components/lifecycle)*.
+
+Here's another test that changes the component's `title` property *before* calling `fixture.detectChanges()`.
+
+
+
+### Automatic change detection
+
+The `BannerComponent` tests frequently call `detectChanges`.
+Many testers prefer that the Angular test environment run change detection automatically like it does in production.
+
+That's possible by configuring the `TestBed` with the `ComponentFixtureAutoDetect` provider.
+First import it from the testing utility library:
+
+
+
+Then add it to the `providers` array of the testing module configuration:
+
+
+
+HELPFUL: You can also use the `fixture.autoDetectChanges()` function instead if you only want to enable automatic change detection
+after making updates to the state of the fixture's component. In addition, automatic change detection is on by default
+when using `provideZonelessChangeDetection` and turning it off is not recommended.
+
+Here are three tests that illustrate how automatic change detection works.
+
+
+
+The first test shows the benefit of automatic change detection.
+
+The second and third test reveal an important limitation.
+The Angular testing environment does not run change detection synchronously when updates happen inside the test case that changed the component's `title`.
+The test must call `await fixture.whenStable` to wait for another round of change detection.
+
+HELPFUL: Angular does not know about direct updates to values that are not signals. The easiest way to ensure that
+change detection will be scheduled is to use signals for values read in the template.
+
+### Change an input value with `dispatchEvent()`
+
+To simulate user input, find the input element and set its `value` property.
+
+But there is an essential, intermediate step.
+
+Angular doesn't know that you set the input element's `value` property.
+It won't read that property until you raise the element's `input` event by calling `dispatchEvent()`.
+
+The following example demonstrates the proper sequence.
+
+
+
+## Component with external files
+
+The preceding `BannerComponent` is defined with an *inline template* and *inline css*, specified in the `@Component.template` and `@Component.styles` properties respectively.
+
+Many components specify *external templates* and *external css* with the `@Component.templateUrl` and `@Component.styleUrls` properties respectively, as the following variant of `BannerComponent` does.
+
+
+
+This syntax tells the Angular compiler to read the external files during component compilation.
+
+That's not a problem when you run the CLI `ng test` command because it *compiles the application before running the tests*.
+
+However, if you run the tests in a **non-CLI environment**, tests of this component might fail.
+For example, if you run the `BannerComponent` tests in a web coding environment such as [plunker](https://plnkr.co), you'll see a message like this one:
+
+
+
+Error: This test module uses the component BannerComponent
+which is using a "templateUrl" or "styleUrls", but they were never compiled.
+Please call "TestBed.compileComponents" before your test.
+
+
+
+You get this test failure message when the runtime environment compiles the source code *during the tests themselves*.
+
+To correct the problem, call `compileComponents()` as explained in the following [Calling compileComponents](#calling-compilecomponents) section.
+
+## Component with a dependency
+
+Components often have service dependencies.
+
+The `WelcomeComponent` displays a welcome message to the logged-in user.
+It knows who the user is based on a property of the injected `UserService`:
+
+
+
+The `WelcomeComponent` has decision logic that interacts with the service, logic that makes this component worth testing.
+
+### Provide service test doubles
+
+A *component-under-test* doesn't have to be provided with real services.
+
+Injecting the real `UserService` could be difficult.
+The real service might ask the user for login credentials and attempt to reach an authentication server.
+These behaviors can be hard to intercept. Be aware that using test doubles makes the test behave differently from production so use them sparingly.
+
+### Get injected services
+
+The tests need access to the `UserService` injected into the `WelcomeComponent`.
+
+Angular has a hierarchical injection system.
+There can be injectors at multiple levels, from the root injector created by the `TestBed` down through the component tree.
+
+The safest way to get the injected service, the way that ***always works***,
+is to **get it from the injector of the *component-under-test***.
+The component injector is a property of the fixture's `DebugElement`.
+
+
+
+HELPFUL: This is _usually_ not necessary. Services are often provided in the root or the TestBed overrides and can be retrieved more easily with `TestBed.inject()` (see below).
+
+### `TestBed.inject()`
+
+This is easier to remember and less verbose than retrieving a service using the fixture's `DebugElement`.
+
+In this test suite, the *only* provider of `UserService` is the root testing module, so it is safe to call `TestBed.inject()` as follows:
+
+
+
+HELPFUL: For a use case in which `TestBed.inject()` does not work, see the [*Override component providers*](#override-component-providers) section that explains when and why you must get the service from the component's injector instead.
+
+### Final setup and tests
+
+Here's the complete `beforeEach()`, using `TestBed.inject()`:
+
+
+
+And here are some tests:
+
+
+
+The first is a sanity test; it confirms that the `UserService` is called and working.
+
+HELPFUL: The withContext function \(for example, `'expected name'`\) is an optional failure label.
+If the expectation fails, Jasmine appends this label to the expectation failure message.
+In a spec with multiple expectations, it can help clarify what went wrong and which expectation failed.
+
+The remaining tests confirm the logic of the component when the service returns different values.
+The second test validates the effect of changing the user name.
+The third test checks that the component displays the proper message when there is no logged-in user.
+
+## Component with async service
+
+In this sample, the `AboutComponent` template hosts a `TwainComponent`.
+The `TwainComponent` displays Mark Twain quotes.
+
+
+
+HELPFUL: The value of the component's `quote` property passes through an `AsyncPipe`.
+That means the property returns either a `Promise` or an `Observable`.
+
+In this example, the `TwainComponent.getQuote()` method tells you that the `quote` property returns an `Observable`.
+
+
+
+The `TwainComponent` gets quotes from an injected `TwainService`.
+The component starts the returned `Observable` with a placeholder value \(`'...'`\), before the service can return its first quote.
+
+The `catchError` intercepts service errors, prepares an error message, and returns the placeholder value on the success channel.
+
+These are all features you'll want to test.
+
+### Testing with a spy
+
+When testing a component, only the service's public API should matter.
+In general, tests themselves should not make calls to remote servers.
+They should emulate such calls.
+The setup in this `app/twain/twain.component.spec.ts` shows one way to do that:
+
+
+
+Focus on the spy.
+
+
+
+The spy is designed such that any call to `getQuote` receives an observable with a test quote.
+Unlike the real `getQuote()` method, this spy bypasses the server and returns a synchronous observable whose value is available immediately.
+
+You can write many useful tests with this spy, even though its `Observable` is synchronous.
+
+HELPFUL: It is best to limit the usage of spies to only what is necessary for the test. Creating mocks or spies for more than what's necessary can be brittle. As the component and injectable evolves, the unrelated tests can fail because they no longer mock enough behaviors that would otherwise not affect the test.
+
+
+### Async test with `fakeAsync()`
+
+To use `fakeAsync()` functionality, you must import `zone.js/testing` in your test setup file.
+If you created your project with the Angular CLI, `zone-testing` is already imported in `src/test.ts`.
+
+The following test confirms the expected behavior when the service returns an `ErrorObservable`.
+
+
+
+HELPFUL: The `it()` function receives an argument of the following form.
+
+
+
+fakeAsync(() => { /*test body*/ })
+
+
+
+The `fakeAsync()` function enables a linear coding style by running the test body in a special `fakeAsync test zone`.
+The test body appears to be synchronous.
+There is no nested syntax \(like a `Promise.then()`\) to disrupt the flow of control.
+
+HELPFUL: Limitation: The `fakeAsync()` function won't work if the test body makes an `XMLHttpRequest` \(XHR\) call.
+XHR calls within a test are rare, but if you need to call XHR, see the [`waitForAsync()`](#waitForAsync) section.
+
+IMPORTANT: Be aware that asynchronous tasks that happen inside the `fakeAsync` zone need to be manually executed with `flush` or `tick`. If you attempt to
+wait for them to complete (i.e. using `fixture.whenStable`) without using the
+`fakeAsync` test helpers to advance time, your test will likely fail. See below for more information.
+
+### The `tick()` function
+
+You do have to call [tick()](api/core/testing/tick) to advance the virtual clock.
+
+Calling [tick()](api/core/testing/tick) simulates the passage of time until all pending asynchronous activities finish.
+In this case, it waits for the observable's `setTimeout()`.
+
+The [tick()](api/core/testing/tick) function accepts `millis` and `tickOptions` as parameters. The `millis` parameter specifies how much the virtual clock advances and defaults to `0` if not provided.
+For example, if you have a `setTimeout(fn, 100)` in a `fakeAsync()` test, you need to use `tick(100)` to trigger the fn callback.
+The optional `tickOptions` parameter has a property named `processNewMacroTasksSynchronously`. The `processNewMacroTasksSynchronously` property represents whether to invoke new generated macro tasks when ticking and defaults to `true`.
+
+
+
+The [tick()](api/core/testing/tick) function is one of the Angular testing utilities that you import with `TestBed`.
+It's a companion to `fakeAsync()` and you can only call it within a `fakeAsync()` body.
+
+### tickOptions
+
+In this example, you have a new macro task, the nested `setTimeout` function. By default, when the `tick` is setTimeout, `outside` and `nested` will both be triggered.
+
+
+
+In some case, you don't want to trigger the new macro task when ticking. You can use `tick(millis, {processNewMacroTasksSynchronously: false})` to not invoke a new macro task.
+
+
+
+### Comparing dates inside fakeAsync()
+
+`fakeAsync()` simulates passage of time, which lets you calculate the difference between dates inside `fakeAsync()`.
+
+
+
+### jasmine.clock with fakeAsync()
+
+Jasmine also provides a `clock` feature to mock dates.
+Angular automatically runs tests that are run after `jasmine.clock().install()` is called inside a `fakeAsync()` method until `jasmine.clock().uninstall()` is called.
+`fakeAsync()` is not needed and throws an error if nested.
+
+By default, this feature is disabled.
+To enable it, set a global flag before importing `zone-testing`.
+
+If you use the Angular CLI, configure this flag in `src/test.ts`.
+
+
+
+[window as any]('__zone_symbol__fakeAsyncPatchLock') = true;
+import 'zone.js/testing';
+
+
+
+
+
+### Using the RxJS scheduler inside fakeAsync()
+
+You can also use RxJS scheduler in `fakeAsync()` just like using `setTimeout()` or `setInterval()`, but you need to import `zone.js/plugins/zone-patch-rxjs-fake-async` to patch RxJS scheduler.
+
+
+
+### Support more macroTasks
+
+By default, `fakeAsync()` supports the following macro tasks.
+
+* `setTimeout`
+* `setInterval`
+* `requestAnimationFrame`
+* `webkitRequestAnimationFrame`
+* `mozRequestAnimationFrame`
+
+If you run other macro tasks such as `HTMLCanvasElement.toBlob()`, an *"Unknown macroTask scheduled in fake async test"* error is thrown.
+
+
+
+
+
+
+If you want to support such a case, you need to define the macro task you want to support in `beforeEach()`.
+For example:
+
+
+
+HELPFUL: In order to make the `