Fakultas Ilmu Komputer UI

Commit 0eb0b6f9 authored by Izzatul Muttaqin's avatar Izzatul Muttaqin
Browse files

Ubah ci dan memperbaik functional_test untuk tugas lama

parent 3bd87c68
Pipeline #28144 passed with stages
in 7 minutes and 24 seconds
......@@ -12,7 +12,7 @@ Test:
script:
- python3 manage.py makemigrations
- python3 manage.py migrate
- python3 manage.py test excercise1
- python3 manage.py test practice
tags:
- test
......
from selenium.webdriver.common.keys import Keys
from .tests import FunctionalTest
class ItemValidationTest(FunctionalTest):
def test_item_validation(self):
self.browser.get(self.live_server_url)
self.get_item_input_box().send_keys(Keys.ENTER)
self.wait_for(lambda: self.browser.find_elements_by_css_selector(
'#id_text:invalid'
))
self.get_item_input_box().send_keys('Buy milk')
self.wait_for(lambda: self.browser.find_elements_by_css_selector(
'#id_text:valid'
))
self.get_item_input_box().send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('2: Buy milk')
self.get_item_input_box().send_keys('Buy cheese')
self.get_item_input_box().send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('3: Buy cheese')
\ No newline at end of file
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