Skip to content

Commit

Permalink
test(Statistic): add common
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Apr 2, 2016
1 parent 8412cc0 commit 09e9e73
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions test/specs/views/Stastistic/Statistic-test.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
import React from 'react'
import { Statistic } from 'stardust'
import faker from 'faker'
import Statistic from 'src/views/Statistic/Statistic'
import StatisticLabel from 'src/views/Statistic/StatisticLabel'
import StatisticValue from 'src/views/Statistic/StatisticValue'
import StatisticStatistics from 'src/views/Statistic/StatisticStatistics'
import * as common from 'test/specs/commonTests'

describe('Statistic', () => {
it('renders children', () => {
const child = faker.hacker.phrase()
deprecatedRender(<Statistic>{child}</Statistic>)
.assertText(child)
})
common.isConformant(Statistic)
common.hasUIClassName(StatisticStatistics)
common.rendersChildren(Statistic)
common.hasSubComponents(Statistic, [StatisticLabel, StatisticValue, StatisticStatistics])
})

describe('Statistics', () => {
it('renders children', () => {
const child = faker.hacker.phrase()
deprecatedRender(<Statistic.Statistics>{child}</Statistic.Statistics>)
.assertText(child)
})
})
describe('StatisticLabel', () => {
common.isConformant(Statistic)
common.rendersChildren(Statistic)
})

describe('Label', () => {
it('renders children', () => {
const child = faker.hacker.phrase()
deprecatedRender(<Statistic.Label>{child}</Statistic.Label>)
.assertText(child)
})
})
describe('StatisticValue', () => {
common.isConformant(Statistic)
common.rendersChildren(Statistic)
})

describe('Value', () => {
it('renders children', () => {
const child = faker.hacker.phrase()
deprecatedRender(<Statistic.Value>{child}</Statistic.Value>)
.assertText(child)
})
})
describe('Statistics', () => {
common.isConformant(StatisticStatistics)
common.hasUIClassName(StatisticStatistics)
common.rendersChildren(StatisticStatistics)
})

0 comments on commit 09e9e73

Please sign in to comment.