Skip to content

Commit

Permalink
test(Grid): common tests
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Apr 1, 2016
1 parent 5ae236c commit 0ddc198
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 38 deletions.
14 changes: 8 additions & 6 deletions test/specs/collections/Grid/Grid-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react'
import { Grid } from 'stardust'
import Grid from 'src/collections/Grid/Grid'
import GridRow from 'src/collections/Grid/GridRow'
import GridColumn from 'src/collections/Grid/GridColumn'
import * as common from 'test/specs/commonTests'

describe('Grid', () => {
it('renders its children', () => {
deprecatedRender(<Grid>check it out</Grid>)
.assertText('check it out')
})
common.isConformant(Grid)
common.hasUIClassName(Grid)
common.rendersChildren(Grid)
common.hasSubComponents(Grid, [GridRow, GridColumn])
})
20 changes: 3 additions & 17 deletions test/specs/collections/Grid/GridColumn-test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
import Grid from 'src/collections/Grid/Grid'
import GridRow from 'src/collections/Grid/GridRow'
import GridColumn from 'src/collections/Grid/GridColumn'
import * as common from '../../commonTests'

describe('Grid', () => {
common.isConformant(Grid)
common.hasUIClassName(Grid)
common.rendersChildren(Grid)
common.hasSubComponents(Grid, [GridRow, GridColumn])
})

describe('GridRow', () => {
common.isConformant(GridRow)
common.rendersChildren(GridRow)
})
import * as common from 'test/specs/commonTests'

describe('GridColumn', () => {
common.isConformant(GridRow)
common.rendersChildren(GridRow)
common.isConformant(GridColumn)
common.rendersChildren(GridColumn)
})
16 changes: 1 addition & 15 deletions test/specs/collections/Grid/GridRow-test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
import Grid from 'src/collections/Grid/Grid'
import GridRow from 'src/collections/Grid/GridRow'
import GridColumn from 'src/collections/Grid/GridColumn'
import * as common from '../../commonTests'

describe('Grid', () => {
common.isConformant(Grid)
common.hasUIClassName(Grid)
common.rendersChildren(Grid)
common.hasSubComponents(Grid, [GridRow, GridColumn])
})
import * as common from 'test/specs/commonTests'

describe('GridRow', () => {
common.isConformant(GridRow)
common.rendersChildren(GridRow)
})

describe('GridColumn', () => {
common.isConformant(GridRow)
common.rendersChildren(GridRow)
})

0 comments on commit 0ddc198

Please sign in to comment.