本文整理汇总了Python中common.test.acceptance.pages.lms.instructor_dashboard.InstructorDashboardPage.select_data_download方法的典型用法代码示例。如果您正苦于以下问题:Python InstructorDashboardPage.select_data_download方法的具体用法?Python InstructorDashboardPage.select_data_download怎么用?Python InstructorDashboardPage.select_data_download使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.test.acceptance.pages.lms.instructor_dashboard.InstructorDashboardPage
的用法示例。
在下文中一共展示了InstructorDashboardPage.select_data_download方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CohortConfigurationTest
# 需要导入模块: from common.test.acceptance.pages.lms.instructor_dashboard import InstructorDashboardPage [as 别名]
# 或者: from common.test.acceptance.pages.lms.instructor_dashboard.InstructorDashboardPage import select_data_download [as 别名]
#.........这里部分代码省略.........
self.assertEqual(message, self.cohort_management_page.assignment_settings_message)
def test_cohort_enable_disable(self):
"""
Scenario: Cohort Enable/Disable checkbox related functionality is working as intended.
Given I have a cohorted course with a user.
And I can see the `Enable Cohorts` checkbox is checked.
And cohort management controls are visible.
When I uncheck the `Enable Cohorts` checkbox.
Then cohort management controls are not visible.
And When I reload the page.
Then I can see the `Enable Cohorts` checkbox is unchecked.
And cohort management controls are not visible.
"""
self.assertTrue(self.cohort_management_page.is_cohorted)
self.assertTrue(self.cohort_management_page.cohort_management_controls_visible())
self.cohort_management_page.is_cohorted = False
self.assertFalse(self.cohort_management_page.cohort_management_controls_visible())
self.browser.refresh()
self.cohort_management_page.wait_for_page()
self.assertFalse(self.cohort_management_page.is_cohorted)
self.assertFalse(self.cohort_management_page.cohort_management_controls_visible())
def test_link_to_data_download(self):
"""
Scenario: a link is present from the cohort configuration in
the instructor dashboard to the Data Download section.
Given I have a course with a cohort defined
When I view the cohort in the LMS instructor dashboard
There is a link to take me to the Data Download section of the Instructor Dashboard.
"""
self.cohort_management_page.select_data_download()
data_download_page = DataDownloadPage(self.browser)
data_download_page.wait_for_page()
def test_cohort_by_csv_both_columns(self):
"""
Scenario: the instructor can upload a file with user and cohort assignments, using both emails and usernames.
Given I have a course with two cohorts defined
When I go to the cohort management section of the instructor dashboard
I can upload a CSV file with assignments of users to cohorts via both usernames and emails
Then I can download a file with results
And appropriate events have been emitted
"""
csv_contents = [
['username', 'email', 'ignored_column', 'cohort'],
[self.instructor_name, '', 'June', 'ManualCohort1'],
['', self.student_email, 'Spring', 'AutoCohort1'],
[self.other_student_name, '', 'Fall', 'ManualCohort1'],
]
filename = "cohort_csv_both_columns_1.csv"
self._create_csv_file(filename, csv_contents)
self._verify_csv_upload_acceptable_file(filename)
def test_cohort_by_csv_only_email(self):
"""
Scenario: the instructor can upload a file with user and cohort assignments, using only emails.
Given I have a course with two cohorts defined
When I go to the cohort management section of the instructor dashboard
I can upload a CSV file with assignments of users to cohorts via only emails
Then I can download a file with results
And appropriate events have been emitted