Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
31 changes: 31 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Avaliação Junior
Feito em React!

### Live version: [Aqui](https://ineedajob-hireme.surge.sh/)
## O que aprendi ?
Acabei melhorando um pouco meu css, embora não tenha conseguido fazer a animação funcionar quando os componentes desmontam 😞.

### Falta implementar:
+ Responsividade

## Coisas que usei pra construir esse app.
+ React
+ JavaScript
+ styled-components
+ axios
+ cypress (para os testes)

## Como rodar a aplicação.
Você vai precisar ter o do nodejs v16 instalado. Baixe ou clone o repositório e execute:
<ol>
<li>npm install</li>
<li>npm start</li>
</ol>

## Como rodar os testes.
Você vai precisar ter o cypress instalado e então execute:
<ol>
<li>npx cypress open</li>
<li>na nova janela clique em um dos arquivos de teste disponível</li>
<li>Deixe a mágica acontecer 🙂</li>
</ol>
1 change: 1 addition & 0 deletions app/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 5 additions & 0 deletions app/cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
24 changes: 24 additions & 0 deletions app/cypress/integration/fullteste.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
describe("Testes gerais", () => {
it('pesquisa um item', () => {
cy.visit('http://localhost:3000/');
cy.get('.sc-caiLqq').click().type('onix').type('{enter}');
cy.get('.sc-hKwDye').contains('onix').should('be.visible');
cy.get('.sc-caiLqq').clear();
cy.get(':nth-child(1) > .sc-hKwDye > .sc-eCImPb').contains('bulbasaur').should('be.visible');
});

it('Abre e fecha formulario de criação de um novo card', () => {
cy.get('.sc-jObWnj').click();
cy.get('.sc-kfPuZi').should('be.visible');
cy.get('.sc-dlVxhl').click();
cy.get(':nth-child(1) > .sc-hKwDye > .sc-eCImPb').contains('bulbasaur').should('be.visible');
});

it('Abre e fecha o card de deletar', () => {
cy.get(':nth-child(1) > .sc-jRQBWg > #deleteButton').click();
cy.get('.sc-crHmcD').should('be.visible');
cy.get('.sc-ieecCq').click();
cy.get(':nth-child(1) > .sc-hKwDye > .sc-eCImPb').contains('bulbasaur').should('be.visible');
});

})
22 changes: 22 additions & 0 deletions app/cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
25 changes: 25 additions & 0 deletions app/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions app/cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading