Sha256: f20f2c3eba50b0721477808dfda18c6c8b3bafe81662b7f51f3953905c10ad04

Contents?: true

Size: 607 Bytes

Versions: 36

Compression:

Stored size: 607 Bytes

Contents

import React from 'react'
import { render, screen } from '../utilities/test-utils'

import Body from './_body'

test('returns namespaced class name', () => {
  render(
    <Body
        data={{ testid: 'primary-test' }}
        text="Test colors"
    />
  )

  const kit = screen.getByTestId('primary-test')
  expect(kit).toHaveClass('pb_body_kit')
})

test('with colors', () => {
  render(
    <Body
        color="success"
        data={{ testid: 'primary-test' }}
        text="Test colors"
    />
  )

  const kit = screen.getByTestId('primary-test')
  expect(kit).toHaveClass('pb_body_kit_success')
})

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
playbook_ui-11.0.0.pre.alpha.2 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-11.0.0.pre.alpha.1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.27.0.pre.lazysizes1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.27.0.pre.datepicker1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.alpha5 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.rc1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.alpha.sticky1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.alpha.display1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.alpha3 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.25.1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.26.0.pre.alpha1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.25.0 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.24.0 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.23.0 app/pb_kits/playbook/pb_body/body.test.js
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_body/body.test.js