Skip to content

Commit

Permalink
testing improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Lobz committed Apr 30, 2024
1 parent e983cea commit 0c7a7a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ Os testes foram escritos para ajudar no desenvolvimento da plataforma. Todos os
Para testar e desenvolver a plataforma, instale o notaR no seu ambiente local para testes, seguindo o guia acima. Além disso, é necessário instalar o `npm`. Com isso, para abrir a interface gráfica do `cypress`, basta executar o seguinte comando:

```
npx cypress run
npx cypress open
```

Na interface gráfica, selecione **E2E Testing**, e um browser à sua escolha.

Para rodar todos os testes de uma vez, direto do terminal, rode:

```
npx cypress run
```


Para mais detalhes, consulte a [documentação do Cypress](https://docs.cypress.io/).

## Licença de uso
Expand Down
3 changes: 3 additions & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function run()
$turma = Turma::factory()
->hasAttached($alunos)
->create();
$turma2 = Turma::factory()
->hasAttached($alunos)
->create();

$turma_vazia = Turma::factory()->create();

Expand Down
1 change: 1 addition & 0 deletions tests/cypress/integration/01_admin_login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('Login test', () => {
// seed a user in the DB that we can control from our tests
cy.exec(`${artisan} migrate:fresh`)
cy.exec(`${artisan} migrate:admin ${password}`)
cy.exec(`${artisan} db:seed`)

})

Expand Down

0 comments on commit 0c7a7a6

Please sign in to comment.