Fakultas Ilmu Komputer UI

Commit 7e737ac2 authored by sirinbaisa's avatar sirinbaisa
Browse files

[#19] [#140652771] Page vacancy Company dan pofile test dan Tabs test

parent 2241ae2f
......@@ -4,7 +4,6 @@
text-align: center;
}
* {
box-sizing: border-box;
-webkit-box-sizing: border-box;
......
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import CreateLowongan from '../CreateLowongan';
import Storage from '../lib/Storage';
describe('CreateLowongan', () => {
const companySession = {
url: 'http://localhost:8001/api/users/8/',
username: 'Tutuplapak',
email: '',
is_staff: false,
company: {
id: 3,
user: {
url: 'http://localhost:8001/api/users/8/',
username: 'Tutuplapak',
email: '',
is_staff: false,
},
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535000Z',
updated: '2017-03-28T07:30:10.535000Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
verified: true,
logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
supervisor: null,
student: null,
};
const errorSession = {
url: 'http://localhost:8001/api/users/8/',
username: 'Tutuplapak',
email: '',
is_staff: false,
company: null,
supervisor: null,
student: null,
};
it('renders for companies without problem', () => {
Storage.set('user-data', companySession);
const createLowongan = ReactTestUtils.renderIntoDocument(
<CreateLowongan />);
expect(createLowongan).to.exist;
});
it('renders without problem for error case', () => {
Storage.set('user-data', errorSession);
const createLowongan = ReactTestUtils.renderIntoDocument(
<CreateLowongan />);
expect(createLowongan).to.exist;
});
});
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ProfilePage from '../ProfilePage';
import Storage from '../lib/Storage';
describe('ProfilePage', () => {
it('renders without problem', () => {
const profile = ReactTestUtils.renderIntoDocument(
<ProfilePage />);
expect(profile).to.exist;
});
});
......@@ -5,7 +5,7 @@ import VacancyPage from '../VacancyPage';
import Storage from '../lib/Storage';
// import Server from '../../lib/Server';
describe('VacancyList', () => {
describe('VacancyPage', () => {
const studentSession = {
url: 'http://localhost:8000/api/users/9/',
username: 'muhammad.reza42',
......
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import Tabs from '../../components/Tabs';
describe('ApplyModal', () => {
it('renders without problem', () => {
const tabs = ReactTestUtils.renderIntoDocument(
<Tabs selected={1} children={[]} />);
expect(tabs).to.exist;
});
});
......@@ -82,11 +82,11 @@ export default class VacancyList extends React.Component {
}
render = () => (
<Segment>
<div>
{ this.companyHeader() }
<Item.Group relaxed>
{ this.generateVacancies() }
</Item.Group>
</Segment>
</div>
);
}
......@@ -7,6 +7,7 @@ import Login from './Login';
import VacancyPage from './VacancyPage';
import HomeCompany from './HomeCompany';
import CreateLowongan from './CreateLowongan';
import ProfilePage from './ProfilePage';
import Server from './lib/Server';
import Storage from './lib/Storage';
......@@ -43,11 +44,11 @@ export default class App extends React.Component {
<Route path="/login" component={Login} />
<Route component={Dashboard} onEnter={this.handleAuth}>
<Route path="/" component={VacancyPage} />
<Route path="/profile" component={Profile} />
<Route path="/lowongan" component={VacancyPage} />
<Route path="/company" component={HomeCompany} />
<Route path="/users" component={Profile} />
<Route path="/create-lowongan" component={CreateLowongan} />
<Route path="/profile" component={ProfilePage} />
</Route>
<Route path="/home" onEnter={this.handleHome} />
<Redirect from="*" to="/home" />
......
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