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
import { render, RenderOptions } from '@testing-library/react'; | |
import React from 'react'; | |
import { Provider } from 'react-redux'; | |
import { store } from '../../store'; | |
const Providers: React.FC = ({ children }) => { | |
return ( | |
<Provider store={store}> | |
{children} | |
</Provider> |
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
import React from 'react'; | |
import { fireEvent } from '@testing-library/react'; | |
import { renderWithProviders } from '../../../../helpers/test'; | |
import { LoginForm } from './LoginForm'; | |
describe('LoginForm Component', () => { | |
it('should submit the username and password', () => { | |
// GIVEN | |
const onSubmitMock = jest.fn(); | |
const password = 'test'; |
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
import React from 'react'; | |
import { configure } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
import { mountWithProviders } from '../../../../helpers/test'; | |
import { LoginForm } from './LoginForm'; | |
configure({ adapter: new Adapter() }); | |
describe('LoginForm Component', () => { | |
it('should show username label', () => { |
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
import React from "react"; | |
import { mount } from "enzyme"; | |
import { Provider } from "react-redux"; | |
import { createStore } from "redux"; | |
import { reducer as formReducer } from "redux-form"; | |
const store = createStore(() => ({ | |
form: formReducer, | |
})); |
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
import React from "react"; | |
import { Field, reduxForm } from "redux-form"; | |
const LoginComponent = ({errorMessage, handleSubmit}) => { | |
return ( | |
<form onSubmit={handleSubmit}> | |
<div> | |
<label htmlFor="username">USERNAME</label> | |
<Field id="username" name="username" component="input" type="text" /> | |
</div> |
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
#!/usr/bin/env bash | |
shopt -s nocasematch | |
set -e | |
set -o pipefail | |
FIX_PATTERN="*FIX*" | |
MASTER_BRANCH="master" | |
B2C_REPOSITORY="ClubMediterranee/cm-b2c" |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember 2.0' | |
}); |
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
import Ember from 'ember'; | |
var Person = Ember.Object.extend({ | |
firstName: null, | |
lastName: null, | |
age: null, | |
country: null, | |
dateOfDeath: null, | |
fullName: Ember.computed('firstName', 'lastName', function() { |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
NewerOlder