Skip to content

Commit

Permalink
Merge pull request #2 from Quest-Finder/1-automate-profile-page
Browse files Browse the repository at this point in the history
Primeiro teste de Perfil
  • Loading branch information
revalois authored May 3, 2024
2 parents 65da4ca + 9e5d727 commit 8f04be0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ Este projeto será uma framework de automação de teste para o projeto 'Tem Vag
### Links úteis
[Documentação Playwrigth](https://playwright.dev/)

[Ambiente de testes](https://frontend-nnf7bytugq-uc.a.run.app/)
[Ambiente de testes](https://frontend-nnf7bytugq-uc.a.run.app/)

### Como executar os testes
Execute esse comando para rodar os testes

```npx playwright test```

Execute esse comando para rodar os testes de forma visual

```npx playwright test --ui```
13 changes: 13 additions & 0 deletions tests/perfil.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { test, expect } = require('@playwright/test');

test('acessar perfil', async ({ page }) => {
await page.goto('https://frontend-nnf7bytugq-uc.a.run.app/user/profile?show=profile');

await expect(page).toHaveTitle(/Tem Vaga Mestre/);

await expect(page.getByRole('heading', { name: 'Estilos preferidos' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Conquistas' })).toBeVisible();

await page.getByRole('button', { name: 'Ver mais'}).click();
});

0 comments on commit 8f04be0

Please sign in to comment.