Sha256: 074e8c48ba2ce2fa841d1fc2eacf3f933d57d982b5a5730c9e032e84e2ceb002
Contents?: true
Size: 864 Bytes
Versions: 19
Compression:
Stored size: 864 Bytes
Contents
import React from 'react' import { render, screen } from '../utilities/test-utils' import FileUpload from './_file_upload' const testid = 'fileupload-test' test('returns namespaced class name', () => { render( <FileUpload data={{ testid: testid }} /> ) const kit = screen.getByTestId(testid) expect(kit).toHaveClass('pb_file_upload_kit') }) test('shows default drag text', () => { render( <FileUpload data={{ testid: testid }} /> ) const kit = screen.getByTestId(testid) expect(kit).toHaveTextContent('Choose a file or drag it here') }) test('displays max file size text', () => { render( <FileUpload data={{ testid: testid }} maxSize={1e+6} /> ) const kit = screen.getByTestId(testid) expect(kit).toHaveTextContent('Choose a file or drag it here. Max file size is 1 MB.') })
Version data entries
19 entries across 19 versions & 1 rubygems