This file contains hidden or 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
import axios from 'axios'; | |
import { doAuthenticate } from "../api" | |
// temos que fazer o mock de library axios para simular uma request | |
jest.mock('axios'); | |
const mockAxios = axios as jest.MockedFunction<typeof axios>; | |
describe('Api functions', () => { | |
// verifique qual o valor de data que está chegando na função dologout e crie um objeto similar ao que temos abaixo dataMock |
This file contains hidden or 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
export const doAuthenticate = async (data: doAuthenticateData) => { | |
const options: AxiosRequestConfig = { | |
method: 'POST', | |
headers: { 'content-type': 'application/x-www-form-urlencoded' }, | |
data: qs.stringify(data), | |
url: API_URL_AUTH, | |
withCredentials: false | |
}; | |
const response = await axios(options); | |
return response; |
This file contains hidden or 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
import React, { Component, Fragment } from "react" | |
import Dropzone from "react-dropzone" | |
import { withStyles } from "@material-ui/core/styles" | |
import UploadDialog from "./Dialog" | |
const styles = theme => ({ | |
dropzoneAccept: { | |
borderColor: theme.palette.primary.main, | |
backgroundColor: `${theme.palette.primary.main}09` | |
}, |
This file contains hidden or 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
import { submit } from "./index" | |
import { shallow } from "enzyme" | |
import { Form, Field } from "react-final-form" | |
import { | |
validatePresence, | |
validateEmailField, | |
composeValidators | |
} from "app/utils/validations" | |
import FormField from "app/common/FormField" |
This file contains hidden or 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
// ESTUTURA DE DADOS com JavaScript | |
// ******{ VETORES/ARRAYS }******** | |
//JavaScript arrays are objects | |
// create Array | |
var numbers = []; | |
// you have an array with length of 0 |
This file contains hidden or 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
import React from 'react'; | |
import Header from '../components/Header'; | |
import Sidebar from '../components/Sidebar'; | |
import FilterBar from '../components/FilterBar'; | |
import DataView from '../components/DataView'; | |
import imgProduct from './images/01.jpg'; | |
import './style.sass'; | |
import { bindActionCreators } from 'redux'; |
This file contains hidden or 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
import * as ACTIONS from '../constants/products'; | |
export function inject(items) { | |
return { | |
type: ACTIONS.INJECT_PRODUCTS, | |
items | |
}; | |
} | |
export function filterPrice(key) { |
This file contains hidden or 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
import * as ACTIONS from '../constants/products'; | |
const initialState = { | |
items: [], | |
allCheked : [] | |
}; | |
const sortByPrice = (a, b) => { | |
var productA = parseInt(a.priceCash); | |
var productB = parseInt(b.priceCash); |
This file contains hidden or 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
header__search { | |
width : calc-percent(434px , 1024px); | |
height : 34px; | |
} |
NewerOlder