Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es-testing-testing-environments #277

Merged
merged 8 commits into from
Aug 29, 2019

Conversation

Gerson4G
Copy link
Contributor

@Gerson4G Gerson4G commented Aug 25, 2019

Traducción de la seccion "Testing Environments" al español.
Ayuda solicitada en #273
Atento a las recomendaciones @Darking360 @carburo


In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No estoy seguro como traducir layout. Hay dos coincidencias de la palabra en el documento. Atento a las sugerencias.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que en este caso está bien dejarlo como layout - qué opinan @carburo @Darking360 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sí, puede ser, creo que muchas veces se usa el término en inglés a falta de una traducción lo suficientemente satisfactoria. Quizá podríamos luego evaluar las diferentes alternativas y a partir de la decisión ponerlo en la lista de traducciones comunes para futuras referencias.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De acuerdo en dejarlo como layout, las traducciones literales a la palabra no quedan bien dentro de este contexto, lo podriamos dejar asi y luego revisar bien el glosario y actulizarlo como menciona @carburo 🚀


This is especially useful for data fetching. It is usually preferable to use "fake" data for tests to avoid the slowness and flakiness due to fetching from real API endpoints [<small>(example)</small>](/docs/testing-recipes.html#data-fetching). This helps make the tests predictable. Libraries like [Jest](https://jestjs.io/) and [sinon](https://sinonjs.org/), among others, support mocked functions. For end-to-end tests, mocking network can be more difficult, but you might also want to test the real API endpoints in them anyway.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decidi por dejar API Endpoints en su idioma original. En otro articulo observe que se traducia a remote endpoint -> punto final remoto y en mi opinión no se ve bien dentro del contexto.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, de acuerdo! Gracias por aclarar tu decisión!


In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backend fue otra traducción de la que no estoy seguro. Me parece que también deberia mantenerse la palabra. Atento igualmente.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gerson4G 👍

@netlify
Copy link

netlify bot commented Aug 25, 2019

Deploy preview for es-reactjs ready!

Built with commit 2fb5c4a

https://deploy-preview-277--es-reactjs.netlify.com

@carburo carburo self-requested a review August 25, 2019 19:16
Copy link
Member

@alejandronanez alejandronanez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Gerson4G, gracias por tu aporte, bienvenido al proyecto!

Me parece que este PR está bien, pero dejo abierta la pregunta sobre cambiar Biblioteca por Librería, además de layout.

Si @carburo o @Darking360 les parece 👍 como están las cosas podemos proceder con el merge!

Muchas gracias nuevamente!!!!!!


### Test runners {#test-runners}
### Bibliotecas de ejecución de pruebas {#test-runners}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hola @Gerson4G! Qué tal te suena Librerías en vez de Bibliotecas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

También puede ser, pero entonces se debería buscar una estandarización para este tipo de palabras (Test Runners) ya que elegí "Bibliotecas" debido a la traducción realizada en esta página donde Jest is a JavaScript test runner -> Jest Es una biblioteca de JavaScript para ejecución de pruebas 🤔 @carburo @Darking360.
Librería sí suena mejor para mí, no se si quizás cambiar acá y crear el PR para los otros lados de la documentación donde se le haga referencia aTest Runner que lleve Biblioteca?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De hecho, en la lista de traducciones comunes está traducido como biblioteca y ha sido lo más común en otras traducciones en aras de mantener la consistencia. Para ser honesto, prefiero biblioteca al calco semántico, pero no me importaría que revisaramos esa decisión. En cualquier caso en el artículo se usa indistintamente biblioteca y librería y sí creo que al menos dentro del artículo se mantenga la consistencia y se elija solo uno u otro término.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En este caso tambien me guié de la lista de traducciones comunes, en su momento muy al inicio de las traducciones se acordó usar Biblioteca por el contexto si mal no recuerdo, eso o se parecía mucho al error de la traducción literal de support que es soportar pero en realidad traduce a compatible por ejemplo, aunque tambien lo podríamos revisar, de una u otra forma como menciona @carburo no esta mal, aunque debemos mantener la consistencia, si vamos al caso, por ahora se seguiría utilizando Biblioteca 👍


In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que en este caso está bien dejarlo como layout - qué opinan @carburo @Darking360 ?


This is especially useful for data fetching. It is usually preferable to use "fake" data for tests to avoid the slowness and flakiness due to fetching from real API endpoints [<small>(example)</small>](/docs/testing-recipes.html#data-fetching). This helps make the tests predictable. Libraries like [Jest](https://jestjs.io/) and [sinon](https://sinonjs.org/), among others, support mocked functions. For end-to-end tests, mocking network can be more difficult, but you might also want to test the real API endpoints in them anyway.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, de acuerdo! Gracias por aclarar tu decisión!


In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gerson4G 👍

Copy link
Member

@carburo carburo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muchísimas gracias @Gerson4G por la traducción. Como ya estaba haciendo una reseña de este artículo sumo a la de @alejandronanez algunas sugerencias, sobre todo algunas erratas que encontré y comenté sobre la cuestión de «bibliotecas» y «librerías». También noto que olvidaste traducir el título de la publicación.

content/docs/testing-environments.md Outdated Show resolved Hide resolved
content/docs/testing-environments.md Outdated Show resolved Hide resolved
content/docs/testing-environments.md Outdated Show resolved Hide resolved

### Test runners {#test-runners}
### Bibliotecas de ejecución de pruebas {#test-runners}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De hecho, en la lista de traducciones comunes está traducido como biblioteca y ha sido lo más común en otras traducciones en aras de mantener la consistencia. Para ser honesto, prefiero biblioteca al calco semántico, pero no me importaría que revisaramos esa decisión. En cualquier caso en el artículo se usa indistintamente biblioteca y librería y sí creo que al menos dentro del artículo se mantenga la consistencia y se elija solo uno u otro término.

content/docs/testing-environments.md Outdated Show resolved Hide resolved

In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sí, puede ser, creo que muchas veces se usa el término en inglés a falta de una traducción lo suficientemente satisfactoria. Quizá podríamos luego evaluar las diferentes alternativas y a partir de la decisión ponerlo en la lista de traducciones comunes para futuras referencias.


In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well.
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también.
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una librería como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui cambiaría libreria por biblioteca como se hablo anteriormente 😅

Gerson4G and others added 3 commits August 28, 2019 09:58
Copy link
Collaborator

@Darking360 Darking360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gerson4G Se ve super, solamente puse los cambios de libreria por biblioteca para mantener la consistencia en todas las traducciones que hay por ahora 🚀 Despues de eso creo que estariamos listos.

CC @alejandronanez @carburo 💪

- Libraries like [mocha](https://mochajs.org/#running-mocha-in-the-browser) work well in real browser environments, and could help for tests that explicitly need it.
- End-to-end tests are used for testing longer flows across multiple pages, and require a [different setup](#end-to-end-tests-aka-e2e-tests).
- Jest es altamente compatible con proyectos de React, soportando características como [modulos simulados](#mocking-modules) y [temporizadores](#mocking-timers), y soporte [`jsdom`](#mocking-a-rendering-surface). **Si usas Create React App, [Jest ya esta incluido para usar fácilmente](https://facebook.github.io/create-react-app/docs/running-tests) con una configuracion por defecto útil.**
- Librerías como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Librerías como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente.
- Bibliotecas como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente.


On Node.js, runners like Jest [support mocking modules](https://jestjs.io/docs/en/manual-mocks). You could also use libraries like [`mock-require`](https://www.npmjs.com/package/mock-require).
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar librerías como [`mock-require`](https://www.npmjs.com/package/mock-require).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar librerías como [`mock-require`](https://www.npmjs.com/package/mock-require).
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar bibliotecas como [`mock-require`](https://www.npmjs.com/package/mock-require).


In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well.
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui cambiaría libreria por biblioteca como se hablo anteriormente 😅

@Gerson4G
Copy link
Contributor Author

@Darking360 @carburo Cambios realizados

Copy link
Collaborator

@Darking360 Darking360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gerson4G Just checking and looks good 💪 @carburo if you say so, we can merge this 🚀

@carburo carburo self-requested a review August 29, 2019 17:04
Copy link
Member

@carburo carburo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you @Gerson4G

@carburo carburo merged commit 69d4800 into reactjs:master Aug 29, 2019
@carburo carburo mentioned this pull request Oct 5, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants