Fakultas Ilmu Komputer UI

Commit 9241af29 authored by Ahmad Yazid's avatar Ahmad Yazid
Browse files

[RED] added test to test new modal for feature CompanyInfo

parent 8808c327
/* eslint-disable no-unused-expressions */
import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import CompanyInfo from '../../components/CompanyInfo';
describe('CompanyInfo', () => {
it('renders without problem', () => {
const modalInfo = ReactTestUtils.renderIntoDocument(<CompanyInfo buttonTitle="submit" />);
expect(modalInfo).to.exist;
});
it('open without problem', () => {
const modalCompany = ReactTestUtils.renderIntoDocument(<CompanyInfo buttonTitle="submit" />);
const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalPendaftaran, 'Button');
modalCompany.handleApply();
ReactTestUtils.Simulate.click(modal);
expect(modalCompany).to.exist;
});
it('open with problem', () => {
const modalCompany = ReactTestUtils.renderIntoDocument(<CompanyInfo buttonTitle="submit" />);
const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalInfo, 'Button');
ReactTestUtils.Simulate.click(modal);
expect(modalCompany).to.exist;
});
});
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