Using Cypress to handle automation tests implementing Page Objects and Screenplay patterns.
The goal was to develop automation tests to the simple list app available at http://repo-listing.web.app
To achieve that, Gherkin features lead the way of thinking the core features of that system. Given/When/Then strategy was used here:
Development with this pattern was done under the branch feature/page-objects.
Object Home:
Tests:
Implementation of this pattern was developed after the page object approuch. Another strategy was using fixture to handle import data from external file (ex: json) and randomize inputs.
Fixture:
Screenplay pattern base files:
Five original blocks were simplified to 3: Actor, Task and Questions, here translated to Agente, Tarefa e DadoQuandoEntao, respectively.
Tests:
- integration/
- screenplay/
- Tarefas/
- AcessarHome.tarefa.js
- AdicionarValorVazio.tarefa.js
- EsperarListaContendoDoisItens.tarefa.js
- EsperarListaContendoUmItem.tarefa.js
- ExibirLista.tarefa.js
- ExibirListaContendoTres.tarefa.js
- InserirNovoRepositorio.tarefa.js
- LimparLista.tarefa.js
- RemoverItem.tarefa.js
- VisualizarListaComItens.tarefa.js
- VisualizarListaVazia.tarefa.js
- index.js
- adicionar/
- componentes/
- remover/
- Tarefas/
- screenplay/
This project uses ESLint, Prettier and lint-staged to handle linting operations and precommit hook.
Before hands-on, do not forget to run:
npm install
npx mrm lint-staged