def test_teacher_add_external_assignment_using_calendar_date_8086(self):
"""Add an external assignment using the calendar date.
Steps:
Click on a calendar date
Click on the Add External Assignment option
Expected Result:
User taken to Add External Assignment page with due date filled in
"""
self.ps.test_updates['name'] = 't1.18.002' \
+ inspect.currentframe().f_code.co_name[4:]
self.ps.test_updates['tags'] = ['t1', 't1.18', 't1.18.002', '8086']
self.ps.test_updates['passed'] = False
# click on calendar date
calendar_date = self.teacher.wait.until(
expect.element_to_be_clickable(
(By.XPATH, '//div[contains(@class,"Day--upcoming")]')
)
)
self.teacher.driver.execute_script(
'return arguments[0].scrollIntoView();', calendar_date)
self.teacher.sleep(1)
actions = ActionChains(self.teacher.driver)
actions.move_to_element(calendar_date)
actions.move_by_offset(0, -35)
actions.click()
actions.move_by_offset(30, 70)
actions.click()
actions.perform()
assert('external/new' in self.teacher.current_url()),\
'not at Add External Assignment page'
self.ps.test_updates['passed'] = True
# Case C8087 - 003 - Teacher | Set open and due dates for all periods
# collectively
test_t1_18_CreateAnExternalAssignment.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录