code-corps / code-corps/code-corps-ember
Rewrite page objects to be decoupled from CSS
- Lenguaje dominante
- JavaScript
- Estrellas
- 120
- Forks
- 75
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
# Problem
https://dockyard.com/blog/2015/09/25/ember-best-practices-acceptance-tests
> The first approach we’re going to talk about is decoupling your acceptance tests from the HTML structure and CSS of your application. If your tests are breaking due to semantic HTML or class name changes but the end experience to the user is nearly exactly the same, this should be a red flag that your tests are too closely coupled to the HTML and CSS of your application. Our acceptance tests should be from the perspective of a user interacting with the application. A user doesn’t care about whether the element they are clicking on is a `` or a `` or whether we use a class name of `post` or `blog-post`. They care that they can read a blog post, comment on it, and like it.
> However, we can’t perfectly decouple our tests from presentation, as we still need to be able to find the elements that we need to interact with and make assertions against. One approach to minimizing the coupling is to add a data attribute to elements that we want to target during our tests. Data attributes are attributes that are prefixed with data- and are intended to store meta data on elements
## Subtasks
- [ ] Create individual issues for page objects / components / etc that need decoupled
- [ ] Submit PRs for those page objects / components / etc
- [ ] ???
- [ ] Profit!
## References
Related to: #697
Guía de contribución
Línea de trabajo
Lee primero el artículo enlazado sobre las pruebas de aceptación de Ember y el issue relacionado #697; este issue no indica archivos ni pruebas por los que empezar. El siguiente paso indicado es identificar los page objects o componentes que necesitan desacoplarse y crear issues individuales para ellos, por lo que aquí no hay un criterio de finalización delimitado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend, testing
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100