Fakultas Ilmu Komputer UI

Commit b9ec122f authored by M. Reza Qorib's avatar M. Reza Qorib
Browse files

[#140654507] #13 Refactor component name

parent e3e1abf9
/* eslint-disable no-unused-expressions */
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ModalPendaftaran from '../../components/ModalPendaftaran';
import ModalPendaftaran from '../../components/ApplyModal';
describe('ModalPendaftaran', () => {
describe('ApplyModal', () => {
it('renders without problem', () => {
const modalPendaftaran = ReactTestUtils.renderIntoDocument(
<ModalPendaftaran id={4} data={{key: 'value'}} buttonTitle="submit" />);
<ApplicancyModal id={4} data={{key: 'value'}} buttonTitle="submit" />);
expect(modalPendaftaran).to.exist;
});
it('open without problem', () => {
const modalPendaftaran = ReactTestUtils.renderIntoDocument(
<ModalPendaftaran id={4} data={{ key: 'value' }} buttonTitle="submit" />);
<ApplicancyModal id={4} data={{ key: 'value' }} buttonTitle="submit" />);
const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalPendaftaran, 'Button');
ReactTestUtils.Simulate.click(modal);
......
......@@ -2,7 +2,7 @@ import React from 'react';
import { Modal, Button, Icon, TextArea, Form } from 'semantic-ui-react';
import ModalAlert from './ModalAlert';
export default class ModalPendaftaran extends React.Component {
export default class AplicancyModal extends React.Component {
static propTypes = {
data: React.PropTypes.object.isRequired,
id: React.PropTypes.number.isRequired,
......
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