Fakultas Ilmu Komputer UI

Commit ef4d5629 authored by Shafiya Adzhani's avatar Shafiya Adzhani
Browse files

[REFACTOR] increase coverage on form iumk 3

parent 320b2823
......@@ -3,8 +3,17 @@ import FormIUMK3 from './FormIUMK3'
import {testRender, makeTestStore} from '../../testUtils'
test('renders FormIUMK3 Element', () => {
const data = {
nama: 'PT UUN',
alamat: 'Jakarta',
barangJasa: 'Jual Bakso Aci',
status: 'PT',
karyawan: 'Individual',
kbli: '',
catatan: null,
}
const store = makeTestStore()
testRender(<FormIUMK3 />, {store})
testRender(<FormIUMK3 data={data} />, {store})
expect(screen.getByTestId('form-iumk-3')).toBeInTheDocument()
// Test label
......@@ -37,3 +46,20 @@ test('renders FormIUMK3 Element', () => {
expect(screen.getByTestId('form-iumk-3-input-harga')).toBeInTheDocument()
expect(screen.getByTestId('form-iumk-3-input-catatan')).toBeInTheDocument()
})
test('renders FormIUMK3 Element with catatan', () => {
const data = {
nama: 'PT UUN',
alamat: 'Jakarta',
barangJasa: 'Jual Bakso Aci',
status: 'PT',
karyawan: 'Individual',
kbli: '',
catatan: 'Contoh catatan',
}
const store = makeTestStore()
testRender(<FormIUMK3 data={data} />, {store})
expect(screen.getByTestId('form-iumk-3')).toBeInTheDocument()
expect(screen.getByTestId('form-iumk-3-input-catatan')).toBeInTheDocument()
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment