Fakultas Ilmu Komputer UI

Commit 0dc5b590 authored by Ahmad Yazid's avatar Ahmad Yazid
Browse files

Merge branch '1506722752-222' into 'master'

1506722752 222 Tutorial tambah lowongan

See merge request !251
parents b201d07c f050c3c6
Pipeline #26719 passed with stages
in 13 minutes and 12 seconds
/* 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'; ...@@ -6,7 +6,7 @@ import Server from '../lib/Server';
import Storage from '../lib/Storage'; import Storage from '../lib/Storage';
import moment from 'moment'; import moment from 'moment';
import ModalAlert from './ModalAlert'; import ModalAlert from './ModalAlert';
import CompanyInfo from './CompanyInfo';
var quotes = require('starwars'); var quotes = require('starwars');
const defaultPicture = 'https://semantic-ui.com/images/avatar/small/elliot.jpg'; const defaultPicture = 'https://semantic-ui.com/images/avatar/small/elliot.jpg';
...@@ -170,7 +170,6 @@ export default class TopMenu extends React.Component { ...@@ -170,7 +170,6 @@ export default class TopMenu extends React.Component {
{this.state.kapeDescription} {this.state.kapeDescription}
</Menu.Item> </Menu.Item>
</Menu.Menu> </Menu.Menu>
<Menu.Menu position="center"> <Menu.Menu position="center">
{this.props.user.role === 'student' && ( {this.props.user.role === 'student' && (
<Menu.Item style={{ padding: '25px' }}> <Menu.Item style={{ padding: '25px' }}>
...@@ -182,6 +181,9 @@ export default class TopMenu extends React.Component { ...@@ -182,6 +181,9 @@ export default class TopMenu extends React.Component {
<Menu.Menu position="right"> <Menu.Menu position="right">
{this.props.user.role === 'student' && ( {this.props.user.role === 'student' && (
<Menu.Item>{btn}</Menu.Item> <Menu.Item>{btn}</Menu.Item>
)}
{this.props.user.role === 'company' && (
<CompanyInfo>Company Info</CompanyInfo>
)} )}
<Menu.Item style={{ margin: '3px' }}> <Menu.Item style={{ margin: '3px' }}>
{this.state.currentDate} {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