One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| import SwiftUI | |
| import WebKit | |
| import Combine | |
| class WebViewData: ObservableObject { | |
| @Published var loading: Bool = false | |
| @Published var scrollPercent: Float = 0 | |
| @Published var url: URL? = nil | |
| @Published var urlBar: String = "https://nasa.gov" | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Tronwallet-browser Example</title> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" |
| import reducer, { initialState } from './../reducer'; | |
| import * as types from './../types'; | |
| describe('#Contact reducers', () => { | |
| it('O state inicial pode ser retornado', () => { | |
| expect(reducer(undefined, {})).toEqual(initialState); | |
| }); | |
| it('#trySubmit', () => { | |
| const mockedAction = { |
| import configureMockStore from 'redux-mock-store'; | |
| import nock from 'nock'; | |
| import thunk from 'redux-thunk'; | |
| import * as actions from './../action'; | |
| import * as types from './../types'; | |
| const middlewares = [ thunk ]; | |
| const mockStore = configureMockStore(middlewares); |
| import * as actions from './../action'; | |
| import * as types from './../types'; | |
| describe("#Contact Actions", ()=> { | |
| describe("#função trySubmit", ()=> { | |
| it('Retornar o objeto esperado', ()=> { | |
| const anObject = actions.trySubmit(); | |
| const likeThis = { | |
| type: types.TRY_SUBMIT |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { mount, shallow } from 'enzyme'; | |
| import sinon from 'sinon'; | |
| import From from './../components/Form'; | |
| describe("#Contact form",()=> { | |
| const onSubmit = sinon.spy(); |
| import * as types from './types'; | |
| export const initialState = { | |
| msg: '' | |
| }; | |
| export default (state = initialState, action) => { | |
| switch (action.type) { | |
| case types.TRY_SUBMIT: | |
| return trySubmit(state); |
| import fetch from 'isomorphic-fetch'; | |
| import * as types from './types'; | |
| export function submitForm(formData) { | |
| return dispatch => { | |
| dispatch(trySubmit()); //tentando fazer o submit | |
| return fetch("http://localhost:3004/contact", { | |
| method: "POST", | |
| headers: { | |
| 'Accept': 'application/json', |
| export const TRY_SUBMIT = 'TRY_SUBMIT'; | |
| export const SUBMIT_SUCCESS = 'SUBMIT_SUCCESS'; | |
| export const SUBMIT_FAILURE = 'SUBMIT_FAILURE'; |