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-10.25.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.24.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.23.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.23.0.pre.cachetest app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.23.0.pre.alpha1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.22.1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.22.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.1.pre.alpha1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.lightbox.2 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.lightbox app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.rg1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.jg1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.na1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.21.0.pre.alpha.jd1 app/pb_kits/playbook/pb_legend/legend.test.js
playbook_ui-10.20.0 app/pb_kits/playbook/pb_legend/legend.test.js