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
Collection of Practice
2019
1606837915-practice
Commits
1343e3fe
Commit
1343e3fe
authored
Oct 02, 2019
by
Izzatul Muttaqin
Browse files
Mengubah functional_test
parent
240f3ca7
Pipeline
#21487
failed with stage
in 1 minute and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functional_test.py
View file @
1343e3fe
from
django.test
import
LiveServerTestCase
from
selenium
import
webdriver
from
selenium.common.exceptions
import
WebDriverException
from
selenium.webdriver.common.keys
import
Keys
...
...
@@ -41,6 +40,12 @@ class NewVisitorTest(unittest.TestCase):
rows
=
table
.
find_elements_by_tag_name
(
'tr'
)
self
.
assertIn
(
row_text
,
[
row
.
text
for
row
in
rows
])
def
test_assert_name
(
self
):
self
.
browser
.
get
(
HEROKU_APP_HOST
)
introduction
=
self
.
browser
.
find_element_by_id
(
"intro"
)
self
.
assertIn
(
'Izzatul'
,
introduction
.
text
)
def
test_can_start_a_list_and_retrieve_it_later
(
self
):
self
.
browser
.
get
(
HEROKU_APP_HOST
)
...
...
practice/templates/homepage/home.html
View file @
1343e3fe
<html>
<title>
To-Do lists {{ name }}
</title>
<body>
<h1>
Hello, this is {{ name }}.
</h1>
<h1
id=
"intro"
>
Hello, this is {{ name }}.
</h1>
<h1>
Your To-Do list
</h1>
<form
method=
"POST"
>
<input
name=
"item_text"
id=
"id_new_item"
placeholder=
"Enter a to-do item"
/>
...
...
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