Sha256: 7214dd593ab35a6fdf5c8c8536b15261657785bd2b94abdf493bf8eb8a0afff9

Contents?: true

Size: 896 Bytes

Versions: 797

Compression:

Stored size: 896 Bytes

Contents

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

import Body from '../../../pb_body/_body'
import { SCREEN_SIZES } from '../../test-utils'

const testSubject = 'body'

test('Global Props: Returns ordinal suffixed class name', () => {
  for(let x = 0, y = 2; x < y; ++x) {
    const testId = `${testSubject}-${x}`
    render(
      <Body
          data={{ testid: testId }}
          flexGrow={x}
          text="Hi"
      />
    )
    const kit = screen.getByTestId(testId)
    expect(kit).toHaveClass(`flex_grow_${x}`)

    SCREEN_SIZES.forEach((size) => {
      const testId = `${testSubject}-${x}-${size}`
      render(
        <Body
            data={{ testid: testId }}
            flexGrow={{ [size]: x }}
            text="Hi"
        />
      )
      const kit = screen.getByTestId(testId)
      expect(kit).toHaveClass(`flex_grow_${size}_${x}`)
    })
  }
})

Version data entries

797 entries across 797 versions & 1 rubygems

Version Path
playbook_ui-13.6.0.pre.alpha.play845allkitsbytypes1219 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.7.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.6.0.pre.alpha.tiptapreacthookformbug1210 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.6.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.5.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.4.0.pre.alpha.PLAY973Hash1181 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.4.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.3.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.2.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.1.0 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41129 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41128 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.0.0.pre.alpha.PLAY966collapsiblenav41126 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-13.0.0.pre.alpha.salesbookmismatchingdate1120 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
playbook_ui-12.39.0.pre.alpha.salesbookmismatchingdate1117 app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js