本文整理汇总了Python中common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage.wait_for_page方法的典型用法代码示例。如果您正苦于以下问题:Python GroupConfigurationsPage.wait_for_page方法的具体用法?Python GroupConfigurationsPage.wait_for_page怎么用?Python GroupConfigurationsPage.wait_for_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage
的用法示例。
在下文中一共展示了GroupConfigurationsPage.wait_for_page方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_no_content_groups
# 需要导入模块: from common.test.acceptance.pages.studio.settings_group_configurations import GroupConfigurationsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage import wait_for_page [as 别名]
def test_no_content_groups(self):
"""
Scenario: if the course has no content groups defined (user_partitions of type cohort),
the settings in the cohort management tab reflect this
Given I have a course with a cohort defined but no content groups
When I view the cohort in the instructor dashboard and select settings
Then the cohort is not linked to a content group
And there is text stating that no content groups are defined
And I cannot select the radio button to enable content group association
And there is a link I can select to open Group settings in Studio
"""
self.cohort_management_page.select_cohort(self.manual_cohort_name)
self.assertIsNone(self.cohort_management_page.get_cohort_associated_content_group())
self.assertEqual(
"Warning:\nNo content groups exist. Create a content group",
self.cohort_management_page.get_cohort_related_content_group_message()
)
self.assertFalse(self.cohort_management_page.select_content_group_radio_button())
self.cohort_management_page.select_studio_group_settings()
group_settings_page = GroupConfigurationsPage(
self.browser,
self.course_info['org'],
self.course_info['number'],
self.course_info['run']
)
group_settings_page.wait_for_page()
示例2: GroupConfigurationsTest
# 需要导入模块: from common.test.acceptance.pages.studio.settings_group_configurations import GroupConfigurationsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage import wait_for_page [as 别名]
#.........这里部分代码省略.........
create_user_partition_json(0, "Name", "Description.", groups),
],
},
})
if associate_experiment:
# Assign newly created group configuration to experiment
vertical = self.course_fixture.get_nested_xblocks(category="vertical")[0]
split_test = XBlockFixtureDesc('split_test', 'Test Content Experiment', metadata={'user_partition_id': 0})
self.course_fixture.create_xblock(vertical.locator, split_test)
# Go to the Group Configuration Page
self.page.visit()
config = self.page.experiment_group_configurations[0]
if associate_experiment:
return config, split_test
return config
def publish_unit_in_lms_and_view(self, courseware_page, publish=True):
"""
Given course outline page, publish first unit and view it in LMS when publish is false, it will only view
"""
self.outline_page.visit()
self.outline_page.expand_all_subsections()
section = self.outline_page.section_at(0)
unit = section.subsection_at(0).unit_at(0).go_to()
# I publish and view in LMS and it is rendered correctly
if publish:
unit.publish_action.click()
unit.view_published_version()
self.assertEqual(len(self.browser.window_handles), 2)
courseware_page.wait_for_page()
def get_select_options(self, page, selector):
"""
Get list of options of dropdown that is specified by selector on a given page.
"""
select_element = page.q(css=selector)
self.assertTrue(select_element.is_present())
return [option.text for option in Select(select_element[0]).options]
def test_no_group_configurations_added(self):
"""
Scenario: Ensure that message telling me to create a new group configuration is
shown when group configurations were not added.
Given I have a course without group configurations
When I go to the Group Configuration page in Studio
Then I see "You have not created any group configurations yet." message
"""
self.page.visit()
self.assertTrue(self.page.experiment_group_sections_present)
self.assertTrue(self.page.no_experiment_groups_message_is_present)
self.assertIn(
"You have not created any group configurations yet.",
self.page.no_experiment_groups_message_text
)
def test_group_configurations_have_correct_data(self):
"""
Scenario: Ensure that the group configuration is rendered correctly in expanded/collapsed mode.
Given I have a course with 2 group configurations
And I go to the Group Configuration page in Studio
And I work with the first group configuration
And I see `name`, `id` are visible and have correct values