Fakultas Ilmu Komputer UI

Commit 923bdbdb authored by Michael Christopher Manullang's avatar Michael Christopher Manullang
Browse files

Merge branch '1706039723-95' into 'master'

1706039723 95

Closes #95

See merge request !26
parents 2dd0d75c 8dcce00b
Pipeline #58092 passed with stages
in 20 minutes and 41 seconds
......@@ -30,6 +30,12 @@ UnitTest:
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)%/'
before_script:
- export DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_DB
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
- apt-get update -yy
- apt-get update -qq && apt-get install -y -qq unzip
- apt-get install -y google-chrome-stable
- apt-get install -y xvfb
- pip install -r requirements.txt
- python manage.py makemigrations
- python manage.py migrate
......
......@@ -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;
......
.katalog-brand {
background-color: #615CFD
}
\ No newline at end of file
<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
......@@ -39,6 +39,7 @@
<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 %}
......@@ -47,7 +48,10 @@
</head>
<body style="background-color: #f8f8f8;">
<!-- Page Content -->
{% include 'app/includes/navbar_katalog_materi.html' %}
<!-- Page Content -->
<div class="container">
<header class="jumbotron my-4">
<div class="container">
......
......@@ -37,6 +37,14 @@ from app.utils.fileManagementUtil import get_random_filename, remove_image_exifd
ERROR_403_MESSAGE = 'Kamu harus login untuk mengakses halaman ini'
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
from selenium.common.exceptions import NoSuchElementException
class DaftarKatalogTest(TestCase):
def test_daftar_katalog_url_exist(self):
......@@ -1347,6 +1355,39 @@ class RevisiMateriTest(TestCase):
self.assertEqual(response.status_code, 200)
# Logout
self.client.logout()
class NameBannerFunctionalTest(LiveServerTestCase):
selenium = None
@classmethod
def setUpClass(cls):
super().setUpClass()
options = Options()
options.add_argument('--headless')
options.add_argument("start-maximized")
options.add_argument("disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--no-sandbox")
options.add_argument("--no-sandbox")
cls.selenium = webdriver.Chrome(ChromeDriverManager().install(),
chrome_options=options)
cls.selenium.implicitly_wait(10)
@classmethod
def tearDownClass(cls):
cls.selenium.quit()
super().tearDownClass()
def test_list_todo_available(self):
self.selenium.get(f'{self.live_server_url}')
try:
self.assertIn('Digipus', self.selenium.find_element_by_css_selector('nav.katalog-navbar').text)
except NoSuchElementException:
self.fail('No such element: Katalog Brand')
class GenerateDummyCommandTest(TestCase):
......
......@@ -15,7 +15,9 @@ cfgv==3.1.0
chardet==3.0.4
click==7.1.1
colorama==0.4.3
configparser==5.0.1
coverage==5.0.4
crayons==0.4.0
cryptography==2.9.2
distlib==0.3.0
dj-database-url==0.5.0
......@@ -52,6 +54,7 @@ pluggy==0.13.1
pre-commit==2.3.0
protobuf==3.11.3
psycopg2==2.8.4
psycopg2-binary==2.8.6
py==1.8.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
......@@ -71,6 +74,7 @@ PyYAML==5.3.1
regex==2020.4.4
requests==2.23.0
rsa==4.0
selenium==3.141.0
simplejson==3.7.3
six==1.14.0
soupsieve==2.0
......@@ -81,6 +85,7 @@ typed-ast==1.4.1
urllib3==1.25.9
virtualenv==20.0.18
wcwidth==0.1.9
webdriver-manager==3.2.2
whitenoise==5.0.1
wrapt==1.11.2
xlrd==1.2.0
......
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