-
Notifications
You must be signed in to change notification settings - Fork 6
# add-Toast #47
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
base: master
Are you sure you want to change the base?
# add-Toast #47
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # title-component | ||
| # add-Toast | ||
|
|
||
| ## Types of changes | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,7 +63,6 @@ | |
| "@storybook/node-logger": "^3.4.10", | ||
| "@storybook/react": "^3.4.10", | ||
| "@storybook/storybook-deployer": "^2.3.0", | ||
| "@types/classnames": "^2.2.6", | ||
|
||
| "babel-cli": "^6.26.0", | ||
| "babel-core": "^6.26.3", | ||
| "babel-eslint": "^10.0.1", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ import { shallow } from 'enzyme' | |
| import { Toast } from '../..' | ||
|
|
||
| describe('Toasts', () => { | ||
| it('Should render a span tag by default', () => { | ||
| it('Should render a div tag by default', () => { | ||
| const wrapper = shallow(<Toast />) | ||
|
|
||
| expect(wrapper.type()).toBe('div') | ||
|
|
@@ -17,7 +17,7 @@ describe('Toasts', () => { | |
| }) | ||
|
|
||
| it('Should pass additional classNames', () => { | ||
| const wrapper = shallow(<Toast className='extra'>My Toasts</Toast>) | ||
| const wrapper = shallow(<Toast className="extra">My Toasts</Toast>) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent quotes here. Use single quotes, follow the StandardJS style, run |
||
|
|
||
| expect(wrapper.hasClass('extra')).toBe(true) | ||
| }) | ||
|
|
@@ -29,13 +29,13 @@ describe('Toasts', () => { | |
| }) | ||
|
|
||
| it('Should render with "toast-{color}" class when a color is provided', () => { | ||
| const wrapper = shallow(<Toast color='primary'>Primary</Toast>) | ||
| const wrapper = shallow(<Toast color="primary">Primary</Toast>) | ||
|
|
||
| expect(wrapper.hasClass('toast-primary')).toBe(true) | ||
| }) | ||
|
|
||
| it('Should render custom tag', () => { | ||
| const wrapper = shallow(<Toast renderAs='main'>custom</Toast>) | ||
| const wrapper = shallow(<Toast renderAs="main">custom</Toast>) | ||
|
|
||
| expect(wrapper.type()).toBe('main') | ||
| }) | ||
|
|
@@ -46,23 +46,23 @@ describe('Toasts', () => { | |
| expect(wrapper).toMatchSnapshot() | ||
| }) | ||
|
|
||
| // it('Should have Toasts classname', () => { | ||
| // const wrapper = renderer.create(<Toasts>Test</Toasts>) | ||
| // it('Should have toast classname', () => { | ||
| // const wrapper = renderer.create(<Toast>Test</Toast>) | ||
|
|
||
| // expect(wrapper.toJSON()).toMatchSnapshot() | ||
| // }) | ||
|
|
||
| // it('Should concat classnames in props with Spectre classnames', () => { | ||
| // const wrapper = renderer.create( | ||
| // <Toasts className='other-class this-is-a-test'>classes</Toasts> | ||
| // <Toast className='other-class this-is-a-test'>classes</Toast> | ||
| // ) | ||
|
|
||
| // expect(wrapper.toJSON()).toMatchSnapshot() | ||
| // }) | ||
|
|
||
| // it('Should use inline styles', () => { | ||
| // const wrapper = renderer.create( | ||
| // <Toasts style={{ width: 250 }}>Inline styles</Toasts>) | ||
| // <Toast style={{ width: 250 }}>Inline styles</Toast>) | ||
|
|
||
| // expect(wrapper.toJSON()).toMatchSnapshot() | ||
| // }) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PULL_REQUEST_TEMPLATE.md should not be changed