Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
e0682f72
Commit
e0682f72
authored
Oct 08, 2020
by
Michael Christopher Manullang
Browse files
Implemented Name Banner
parent
9c28c3c1
Pipeline
#57934
failed
Changes
8
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
e0682f72
...
...
@@ -18,6 +18,42 @@ pylint:
paths
:
-
./pylint/
functional-test
:
image
:
ubuntu:latest
stage
:
fntest
services
:
-
postgres:alpine
variables
:
POSTGRES_DB
:
gitlab_test
POSTGRES_USER
:
gitlab_test
POSTGRES_PASSWORD
:
SebuahPassword
POSTGRES_HOST_AUTH_METHOD
:
trust
before_script
:
-
apt-get update -qq
-
apt-get install -qq software-properties-common
-
apt-add-repository universe
-
add-apt-repository ppa:deadsnakes/ppa
-
apt update
-
apt-get install -qq python3.7
-
apt-get install -qq python3-pip
-
pip3 install virtualenv
-
virtualenv env
-
source env/bin/activate
-
export DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_DB
-
pip3 install -r requirements.txt
-
python3 manage.py makemigrations
-
python3 manage.py migrate
-
python3 manage.py collectstatic --no-input
-
apt-get install -qq firefox
-
apt install -qq curl -y
-
curl -L -O https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-linux64.tar.gz
-
tar -xf geckodriver-v0.27.0-linux64.tar.gz -C /usr/local/bin
-
chmod +x /usr/local/bin/geckodriver
when
:
on_success
script
:
-
python manage.py runserver && python3 functional_tests.py
allow_failure
:
true
UnitTest
:
services
:
-
postgres:alpine
...
...
app/static/app/css/heroic-features.css
View file @
e0682f72
...
...
@@ -4,7 +4,7 @@
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-heroic-features/blob/master/LICENSE)
*/
body
{
padding-top
:
56px
;
/*
padding-top: 56px;
*/
}
.center
{
text-align
:
center
;
...
...
app/static/css/navbar_katalog_materi.css
0 → 100644
View file @
e0682f72
.katalog-brand
{
background-color
:
#615CFD
}
\ No newline at end of file
app/templates/app/includes/navbar_katalog_materi.html
0 → 100644
View file @
e0682f72
<nav
class=
"navbar navbar-dark static-top shadow katalog-navbar"
>
<!-- Sidebar Toggle (Topbar) -->
<div
class=
"sidebar-brand-text"
>
Digipus
</div>
</nav>
\ No newline at end of file
app/templates/app/katalog_materi.html
View file @
e0682f72
...
...
@@ -39,14 +39,19 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/styles.css' %}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/util.css' %}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/main.css' %}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/navbar_katalog_materi.css' %}"
>
<!--===============================================================================================-->
{% endblock header %}
{% block content %}
</head>
<body
style=
"background-color: #f8f8f8;"
>
{% include 'app/includes/navbar_katalog_materi.html' %}
<!-- Page Content -->
<div
class=
"container"
>
...
...
app/tests.py
View file @
e0682f72
...
...
@@ -928,4 +928,18 @@ class RevisiMateriTest(TestCase):
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# Logout
self
.
client
.
logout
()
\ No newline at end of file
self
.
client
.
logout
()
#from selenium import webdriver
#class NameBannerFunctionalTest(TestCase):
# browser = webdriver.Firefox()
# #I visit the homepage
# browser.get('http://localhost:8000')
# #I see a namebanner
# assert 'navbar' in browser
# #The namebanner has digipus on it
# assert 'Digipus' in browser.body.navbar
# browser.quit()
digipus/__pycache__/settings.cpython-36.pyc
View file @
e0682f72
No preview for this file type
functional_tests.py
0 → 100644
View file @
e0682f72
from
selenium
import
webdriver
from
selenium.webdriver.common.keys
import
Keys
import
time
import
unittest
from
selenium.common.exceptions
import
NoSuchElementException
class
NavbarKatalogFunctionalTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
browser
=
webdriver
.
Firefox
()
def
tearDown
(
self
):
self
.
browser
.
quit
()
def
test_title_is_michael_christopher_manullang
(
self
):
#Ketika Pengguna mengakses web page, ia akan menemukan navbar yang berisikan digipus.
self
.
browser
.
get
(
'http://127.0.0.1:8000'
)
try
:
self
.
assertIn
(
'Digipus'
,
self
.
browser
.
find_element_by_css_selector
(
'nav.katalog-navbar'
).
text
)
except
NoSuchElementException
:
self
.
fail
(
'No such element: Katalog Brand'
)
if
__name__
==
'__main__'
:
unittest
.
main
()
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment