Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component should contain #68

Open
5 tasks
atherdon opened this issue Feb 17, 2019 · 1 comment
Open
5 tasks

component should contain #68

atherdon opened this issue Feb 17, 2019 · 1 comment

Comments

@atherdon
Copy link
Member

  • inside DocumentLayouts we should have one of RenderList by passing different type
  • DownloadLink -> Button with PDFDownloadLink
  • RenderList
  • GeneratePDFButton
  • ...

example:

describe('<MyComponent />', () => {
  
  it('renders a header', () => {
    const wrapper = shallow(<MyComponent />);
    expect(wrapper.contains(<h1>My Component</h1>)).toBe(true);
  });

  it('renders three <Foo /> components', () => {
    const wrapper = shallow(<MyComponent />);
    expect(wrapper.find(Foo).length).toBe(3);
  });
  
  it('expects to change the status when clicking the button', () => {
    const wrapper = shallow(<MyComponent />);
    
    expect(wrapper.state().status).toBe(false);
    expect(wrapper.contains(<p>Status is {'Off'}</p>)).toBe(true);
  
    wrapper.find('button').simulate('click');
    
    expect(wrapper.state().status).toBe(true);
    expect(wrapper.contains(<p>Status is {'On'}</p>)).toBe(true);
  });
  
});
@atherdon
Copy link
Member Author

@vidjanidhi You can grab this task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant