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.10.0.pre.alpha.play1662cssbargraph5201 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.9 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5200 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.8 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.7 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.6 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.5 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5193 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.4 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.3 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0.pre.alpha.PBNTR662stickyrightcolumnreact5160 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.2 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.1 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5137 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.11.0.pre.rc.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.9.0.pre.alpha.PBNTR767advancedtablemultiheadercolumns5136 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.9.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5121 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.9.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5120 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-14.10.0.pre.rc.24 app/pb_kits/playbook/pb_title/title.test.js