Sha256: d8f87e7811511ec35cca0bc46b0dd68e88bd6dab6fb4f8da68fc3ce17e98fd81

Contents?: true

Size: 631 Bytes

Versions: 1067

Compression:

Stored size: 631 Bytes

Contents

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

import Caption from './_caption'

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

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

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

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

Version data entries

1,067 entries across 1,067 versions & 1 rubygems

Version Path
playbook_ui-10.21.0.pre.alpha.jg1 app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.21.0.pre.alpha.na1 app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.21.0.pre.alpha.jd1 app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.20.0 app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.19.0 app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.19.0.pre.lightbox app/pb_kits/playbook/pb_caption/caption.test.js
playbook_ui-10.19.0.pre.popover.alpha1 app/pb_kits/playbook/pb_caption/caption.test.js