import React from 'react'
import { mount } from 'enzyme'
import expect from 'expect'
import { withScreenshot } from 'storybook-chrome-screenshot'

import { storiesOf, action, specs, describe, it } from '../.storybook/facade'
import AppContainer from './AppContainer'
import Button from 'components/Button'
import NotFoundPage from 'not-found'
import ResumePage from 'resume'

import 'styles/foundation'
import 'styles/common'
import 'styles/storybook.css'

storiesOf('Button', module)
  .add('with text', () => (
    <Button onClick={action('clicked')}>Hello Button</Button>
  ))
  .add(
    'screenshot',
    withScreenshot()(() => <Button>Screenshot test with changes</Button>)
  )
  .add('with some emoji', () => (
    <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>
  ))
  .add('Hello World', () => {
    const story = <Button onClick={action('Hello World')}>Hello World</Button>

    specs(() =>
      describe('Hello World', () => {
        it('Should have the Hello World label', () => {
          const output = mount(story)
          expect(output.text()).toContain('Hello World')
        })
      })
    )

    return story
  })

storiesOf('NotFoundPage', module).add(
  'screenshot',
  //withScreenshot()(
  () => (
    <AppContainer>
      <NotFoundPage />
    </AppContainer>
  )
  //)
)

storiesOf('ResumePage', module).add(
  'screenshot',
  withScreenshot()(() => (
    <AppContainer>
      <ResumePage />
    </AppContainer>
  ))
)

@@ -580,21 +580,16 @@
 %0A  .add(
-%0A    
 'screens
@@ -593,20 +593,16 @@
 enshot',
-%0A   
  withScr
@@ -639,26 +639,8 @@
 shot
- test with changes
 %3C/Bu
@@ -645,19 +645,16 @@
 Button%3E)
-%0A  
 )%0A  .add

Introduce changes