Sha256: 7df97e91bce35dccbf08ae7d436f800de72df9c770c2030f66e82c8c283841d3

Contents?: true

Size: 513 Bytes

Versions: 642

Compression:

Stored size: 513 Bytes

Contents

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

import Body from '../../../pb_body/_body'

const testSubject = 'body'

test('Global Props: Returns corrrect truncate class name', () => {
  for(let x = 1, y = 5; x <= y; ++x) {
    const testId = `${testSubject}-${x}`
    render(
      <Body
          data={{ testid: testId }}
          text="Hi"
          truncate={`${x}`}
      />
    )
    const kit = screen.getByTestId(testId)
    expect(kit).toHaveClass(`truncate_${x}`)
  }
})

Version data entries

642 entries across 642 versions & 1 rubygems

Version Path
playbook_ui-13.14.0.pre.alpha.play1120lintdatepicker1797 app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
playbook_ui-13.15.0 app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js