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-13.6.0.pre.alpha.play845allkitsbytypes1219 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.7.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.6.0.pre.alpha.tiptapreacthookformbug1210 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.6.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.5.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.4.0.pre.alpha.PLAY973Hash1181 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.4.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.3.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.2.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.1.0 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41129 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41128 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41126 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-13.0.0.pre.alpha.salesbookmismatchingdate1120 app/pb_kits/playbook/pb_title/title.test.js
playbook_ui-12.39.0.pre.alpha.salesbookmismatchingdate1117 app/pb_kits/playbook/pb_title/title.test.js