-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from eliasrosa/develop
V1.0.0
- Loading branch information
Showing
157 changed files
with
8,783 additions
and
17,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NEXT_PUBLIC_API_KEY= | ||
NEXT_PUBLIC_API_URL=https://api.hgbrasil.com | ||
NEXT_PUBLIC_API_CACHE=force-cache | ||
NEXT_PUBLIC_API_REVALIDATE=3600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "@rocketseat/eslint-config/react"] | ||
"extends": ["@rocketseat/eslint-config/react", "plugin:@next/next/recommended", "plugin:cypress/recommended"], | ||
"rules" : { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
}, | ||
"globals": { | ||
"cy": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,6 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
src/styles/output.css | ||
.env |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,50 @@ | ||
## Getting Started | ||
## Requisitos | ||
Para executar este projeto, você precisará ter instalado: | ||
- [Node.js - v18](https://nodejs.org/en/) | ||
- [Docker - v24](https://www.docker.com/) | ||
|
||
First, run the development server: | ||
## Primeiros Passos | ||
|
||
Para começar, instale as dependências e execute o servidor de desenvolvimento: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
Isso iniciará o servidor de desenvolvimento, permitindo que você trabalhe no projeto. | ||
|
||
## Executar o Servidor Mock | ||
Para executar o servidor mock, que estará disponível em http://localhost:1080, utilize o seguinte comando: | ||
|
||
```bash | ||
docker compose up | ||
``` | ||
|
||
## Testes Unitários | ||
Para executar os testes unitários, use os comandos a seguir: | ||
|
||
```bash | ||
npm run test | ||
npm run test:watch | ||
``` | ||
|
||
## Testes End-to-End (e2e) | ||
Execute os testes end-to-end com o comando: | ||
|
||
```bash | ||
npm run test:e2e | ||
``` | ||
|
||
## Build da Aplicação | ||
Para gerar o build da aplicação, utilize o seguinte comando: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Análise de Código (Lint) | ||
Para realizar a análise de código e garantir conformidade com as práticas recomendadas, execute: | ||
|
||
```bash | ||
npm run lint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineConfig } from 'cypress' | ||
import { readFile } from 'fs/promises' | ||
|
||
export default defineConfig({ | ||
screenshotOnRunFailure: false, | ||
chromeWebSecurity: false, | ||
video: false, | ||
|
||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
viewportWidth: 1200, | ||
viewportHeight: 800, | ||
}, | ||
|
||
env: {}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe('sidebar', () => { | ||
it('test menu link to home', () => { | ||
cy.visit('/simulator') | ||
cy.acceptTermsOfUse() | ||
|
||
cy.get('[href="/"][data-testid="sidebar-menu-item"]') | ||
.should('be.visible') | ||
.click() | ||
|
||
cy.url().should('eq', Cypress.config().baseUrl + '/') | ||
}) | ||
|
||
it('test menu link to simulator', () => { | ||
cy.visit('/') | ||
cy.acceptTermsOfUse() | ||
|
||
cy.get('[href="/simulator"][data-testid="sidebar-menu-item"]') | ||
.should('be.visible') | ||
.click() | ||
|
||
cy.url().should('eq', Cypress.config().baseUrl + '/simulator') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
describe('simulator', () => { | ||
it('execute simulation with successfully', () => { | ||
cy.visit('/simulator') | ||
cy.acceptTermsOfUse() | ||
|
||
cy.simulate() | ||
|
||
cy.get('[data-testid="simulator-total-invested"]') | ||
.should('be.visible') | ||
.should('contain', 'R$ 185.000,00') | ||
|
||
cy.get('[data-testid="simulator-total-received"]') | ||
.should('be.visible') | ||
.should('contain', 'R$ 569.588,58') | ||
|
||
cy.get('[data-testid="simulator-total-accumulated"]') | ||
.should('be.visible') | ||
.should('contain', 'R$ 754.588,58') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// describe('suggestions', () => { | ||
// it('add ticker from suggestions card', () => { | ||
// cy.visit('/') | ||
// cy.acceptTermsOfUse() | ||
|
||
// cy.get('[data-testid="suggestions-card"] > :nth-child(1) > button').click() | ||
// }) | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe('terms of use', () => { | ||
it('show modal', () => { | ||
cy.visit('/') | ||
cy.contains('Termos de uso').should('be.visible') | ||
cy.contains('Aceitar e continuar navegando').should('be.visible') | ||
}) | ||
|
||
it('accept and close modal', () => { | ||
cy.visit('/') | ||
cy.acceptTermsOfUse() | ||
}) | ||
}) |
Oops, something went wrong.
04fefc5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tcc-nextjs – ./
tcc-nextjs-eliasrosa.vercel.app
tcc-nextjs-git-main-eliasrosa.vercel.app
tcc-nextjs-alpha.vercel.app
app.eliasdarosa.com.br