-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix the onClick function Bug. close #7 + Remove onClick Function Test on elements. - Segment, Label, Icon, Header, Flag, Button - Add Collections and Views Test Function.
- Loading branch information
Showing
36 changed files
with
521 additions
and
125 deletions.
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Breadcrumb = require('../../../src/index.js').Breadcrumb; | ||
|
||
describe('Breadcrumb', function () { | ||
it('should have .ui.breadcrumb class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Breadcrumb></Breadcrumb> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('breadcrumb'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Breadcrumb>123</Breadcrumb> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Breadcrumb className="custom"></Breadcrumb> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Form = require('../../../src/index.js').Form; | ||
|
||
describe('Form', function () { | ||
it('should have .ui.form class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Form></Form> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('form'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Form>123</Form> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Form className="custom"></Form> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Grid = require('../../../src/index.js').Grid; | ||
|
||
describe('Grid', function () { | ||
it('should have .ui.grid class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Grid></Grid> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('grid'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Grid>123</Grid> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Grid className="custom"></Grid> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Menu = require('../../../src/index.js').Menu; | ||
|
||
describe('Menu', function () { | ||
it('should have .ui.menu class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Menu></Menu> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('menu'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Menu>123</Menu> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Menu className="custom"></Menu> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Message = require('../../../src/index.js').Message; | ||
|
||
describe('Message', function () { | ||
it('should have .ui.message class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Message></Message> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('message'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Message>123</Message> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Message className="custom"></Message> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use strict"; | ||
|
||
jest.dontMock('../../../src/index.js'); | ||
|
||
var React = require('react'); | ||
var TestUtils = require('react/lib/ReactTestUtils'); | ||
var Table = require('../../../src/index.js').Table; | ||
|
||
describe('Table', function () { | ||
it('should have .ui.table class by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Table></Table> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('ui'); | ||
expect(instance.getDOMNode().className).toMatch('table'); | ||
}); | ||
|
||
it('should have child by default', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Table>123</Table> | ||
); | ||
|
||
expect(instance.getDOMNode().textContent).toMatch('123'); | ||
}); | ||
|
||
it('should have custom class with custom className', function () { | ||
var instance = TestUtils.renderIntoDocument( | ||
<Table className="custom"></Table> | ||
); | ||
|
||
expect(instance.getDOMNode().className).toMatch('custom'); | ||
}); | ||
}); |
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
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
Oops, something went wrong.