Sha256: 0c435fe1192ca4c501d78d8cf0bdade152d7c456f794c10f3c88cc5af05c9e38

Contents?: true

Size: 1.21 KB

Versions: 396

Compression:

Stored size: 1.21 KB

Contents

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

const testId = "loadingInline"

test('should render custom class and data', () => {
    render(
        <LoadingInline
            className='custom-class'
            data={{ testid: testId }}
        />
    )

    const kit = screen.getByTestId(testId)
    expect(kit).toHaveClass('custom-class')
})

test('should render id', () => {
    render(
        <LoadingInline
            data={{ testid: testId }}
            id={testId}
        />
    )

    const kit = screen.getByTestId(testId)
    expect(kit).toHaveProperty('id', testId)
})

test('should render aria-label', () => {
    render(
        <LoadingInline
            aria={{ label: testId }}
            data={{ testid: testId }}
        />
    )

    const kit = screen.getByTestId(testId)
    expect(kit).toHaveAttribute('aria-label', testId)
})


test('displays custom text content', () => {
    render(
        <LoadingInline
            aria={{ label: testId }}
            data={{ testid: testId }}
            text=' Saving'
        />
    )
  
    const kit = screen.getByTestId(testId)
    expect(kit).toHaveTextContent('Saving')
})

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
playbook_ui-14.9.0.pre.rc.9 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY1680newwidthprop4661 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY1658tanstackbump4657 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4567 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4559 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.9.0.pre.rc.1 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js
playbook_ui-14.8.0.pre.alpha.PLAY16254545 app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js