Sha256: 3caa65b5358ef6fecf511df0441f5d0b4b9390229587a611fe8def727a85bada

Contents?: true

Size: 633 Bytes

Versions: 81

Compression:

Stored size: 633 Bytes

Contents

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

import Legend from './_legend'

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

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

test('color prop', () => {
  render(
    <Legend
        color="category_17"
        data={{ testid: 'primary-test' }}
        text="Test colors"
    />
  )

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

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
playbook_ui-11.11.0.pre.alpha.paginate2 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.11.0.pre.alpha.dialog2 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.11.0.pre.alpha.paginate1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.11.0.pre.alpha.renderer1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.11.0.pre.alpha.dialog1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.11.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.10.0.pre.alpha.pre.bold1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.10.0.pre.alpha.pagination1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.10.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.9.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.9.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.8.1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.8.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.7.0.pre.alpha.table1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.7.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.6.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.5.0.pre.alpha.fontawesome app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.7.0.pre.alpha.pre.guagechart1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.6.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-11.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_legend/legend.test.js