本文整理汇总了Python中common.test.acceptance.pages.studio.settings_advanced.AdvancedSettingsPage.is_deprecated_setting_visible方法的典型用法代码示例。如果您正苦于以下问题:Python AdvancedSettingsPage.is_deprecated_setting_visible方法的具体用法?Python AdvancedSettingsPage.is_deprecated_setting_visible怎么用?Python AdvancedSettingsPage.is_deprecated_setting_visible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.test.acceptance.pages.studio.settings_advanced.AdvancedSettingsPage
的用法示例。
在下文中一共展示了AdvancedSettingsPage.is_deprecated_setting_visible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AdvancedSettingsValidationTest
# 需要导入模块: from common.test.acceptance.pages.studio.settings_advanced import AdvancedSettingsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings_advanced.AdvancedSettingsPage import is_deprecated_setting_visible [as 别名]
#.........这里部分代码省略.........
(
'course name from the page should be same as new_course_name:{}'.format(
new_course_name
)
)
)
def test_confirmation_is_shown_on_save(self):
"""
Scenario: Test that advanced settings shows confirmation after editing a field successfully
Given a staff logs in to studio
When this user goes to advanced settings page and edits any value
And he clicks 'save' button from the notification bar
Then he is able to see the confirmation message
"""
self.advanced_settings.set('Maximum Attempts', 5)
confirmation_message = self.advanced_settings.confirmation_message
self.assertEqual(
confirmation_message,
'Your policy changes have been saved.',
'Settings must be saved successfully in order to have confirmation message'
)
def test_deprecated_settings_invisible_by_default(self):
"""
Scenario: Test that advanced settings does not have deprecated settings by default
Given a staff logs in to studio
When this user goes to advanced settings page
Then the user does not see the deprecated settings
And sees 'Show Deprecated Settings' button
"""
button_text = self.advanced_settings.deprecated_settings_button_text
self.assertEqual(button_text, 'Show Deprecated Settings')
self.assertFalse(self.advanced_settings.is_deprecated_setting_visible())
def test_deprecated_settings_can_be_toggled(self):
"""
Scenario: Test that advanced settings can toggle deprecated settings
Given I am on the Advanced Course Settings page in Studio
When I toggle the display of deprecated settings
Then deprecated settings are then shown
And I toggle the display of deprecated settings
Then deprecated settings are not shown
"""
self.advanced_settings.toggle_deprecated_settings()
button_text = self.advanced_settings.deprecated_settings_button_text
self.assertEqual(
button_text,
'Hide Deprecated Settings',
"Button text should change to 'Hide Deprecated Settings' after the click"
)
self.assertTrue(self.advanced_settings.is_deprecated_setting_visible())
self.advanced_settings.toggle_deprecated_settings()
self.assertFalse(self.advanced_settings.is_deprecated_setting_visible())
self.assertEqual(
self.advanced_settings.deprecated_settings_button_text,
'Show Deprecated Settings',
"Button text should change to 'Show Deprecated Settings' after the click"
)
def test_multi_line_input(self):
"""
Scenario: Test that advanced settings correctly shows the multi-line input
Given I am on the Advanced Course Settings page in Studio
When I create a JSON object as a value for "Discussion Topic Mapping"