Fakultas Ilmu Komputer UI

Commit f050c3c6 authored by Ahmad Yazid's avatar Ahmad Yazid
Browse files

1506722752 222 Tutorial tambah lowongan

parent b201d07c
/* 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(modalCompany, '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(modalCompany, 'Button');
ReactTestUtils.Simulate.click(modal);
expect(modalCompany).to.exist;
});
});
import React from 'react';
import { Modal, Button } from 'semantic-ui-react';
import ModalAlert from './ModalAlert';
import GeneralModal from './GeneralModal';
export default class CompanyInfo extends GeneralModal {
render() {
return (
<Modal
trigger={(
<Button primary onClick={this.handleOpen} floated="center">
Cara Tambah Lowongan
</Button>
)}
closeIcon="close"
open={this.state.modalOpen}
onClose={this.handleClose}
>
<Modal.Header>Cara Tambah Lowongan</Modal.Header>
<Modal.Content>
<ModalAlert
ref={(modal) => {
this.modalAlert = modal;
}}
/>
<Modal.Description>
<Modal.Header>
{' '}
<h1>Berikut Cara Menambahkan Lowongan Pada Situs Kape:</h1>
</Modal.Header>
</Modal.Description>
<h2>
{' '}
1.Click tombol warna hijau yang bertuliskan tambah lowongan baru.
</h2>
<h2>
{' '}
2.Isi semua informasi secara rinci supaya lowongan lebih deskriptif.
</h2>
<h2>
{' '}
3.Klik tombol submit.
</h2>
<h2>
{' '}
4. Lowongan berhasil ditambahkan.
</h2>
<h2>
{' '}
5. Untuk melihat semua pendaftar tekan lah tombol warna biru yang bertuliskan lihat semua pendaftar
</h2>
<h2>
{' '}
6. Jangan lupa untuk melihat secara berkala sehingga tidak tertingal calon perkerja pada perusahaan anda.
</h2>
</Modal.Content>
<Modal.Actions />
</Modal>
);
}
}
......@@ -6,7 +6,7 @@ import Server from '../lib/Server';
import Storage from '../lib/Storage';
import moment from 'moment';
import ModalAlert from './ModalAlert';
import CompanyInfo from './CompanyInfo';
var quotes = require('starwars');
const defaultPicture = 'https://semantic-ui.com/images/avatar/small/elliot.jpg';
......@@ -56,8 +56,8 @@ export default class TopMenu extends React.Component {
"4. Pastikan persyaratan sudah terpenuhi\n" +
"5. Jelaskan mengapa anda ingin mengikuti lowongan internship tersebut di 'Cover Letter'\n"+
"6. Klik tombol 'Daftar'\n",
kapeDescription: "Kanal Akses Pendaftaran KP Elektronik",
welcomeStudent: "Selamat Datang, "
kapeDescription: "Kanal Akses Pendaftaran KP Elektronik",
welcomeStudent: "Selamat Datang, "
};
this.logout = this.logout.bind(this);
this.logoutCompany = this.logoutCompany.bind(this);
......@@ -170,7 +170,6 @@ export default class TopMenu extends React.Component {
{this.state.kapeDescription}
</Menu.Item>
</Menu.Menu>
<Menu.Menu position="center">
{this.props.user.role === 'student' && (
<Menu.Item style={{ padding: '25px' }}>
......@@ -182,6 +181,9 @@ export default class TopMenu extends React.Component {
<Menu.Menu position="right">
{this.props.user.role === 'student' && (
<Menu.Item>{btn}</Menu.Item>
)}
{this.props.user.role === 'company' && (
<CompanyInfo>Company Info</CompanyInfo>
)}
<Menu.Item style={{ margin: '3px' }}>
{this.state.currentDate}
......
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