Sha256: 351786600d6413e534395243adb52965fa1293833e299d35249535ff7202e914

Contents?: true

Size: 1.32 KB

Versions: 789

Compression:

Stored size: 1.32 KB

Contents

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

import Title from './_title'

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

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

test('with thin font weight', () => {
    render(
        <Title
            bold={false}
            data={{ testid: 'primary-test' }}
            text="Test thin font weight"
        />
    )

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

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

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

test('with responsive title', () => {
    render(
        <Title
            data={{ testid: 'primary-test' }}
            size={{ xs: "3", sm: "2", md: "1" }}
            text="Responsive Title"
        />
    )

    const kit = screen.getByTestId('primary-test')
    expect(kit).toHaveClass('pb_title_kit pb_title_kit_xs_3 pb_title_kit_sm_2 pb_title_kit_md_1')
})

Version data entries

789 entries across 789 versions & 1 rubygems

Version Path
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5437 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.6 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5413 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.12.0.pre.rc.5 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5409 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 app/pb_kits/playbook/pb_title/title.test.js