當前位置: 首頁>>代碼示例>>Python>>正文


Python AdvancedSettingsPage.is_deprecated_setting_visible方法代碼示例

本文整理匯總了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"
開發者ID:cmscom,項目名稱:edx-platform,代碼行數:70,代碼來源:test_studio_settings.py


注:本文中的common.test.acceptance.pages.studio.settings_advanced.AdvancedSettingsPage.is_deprecated_setting_visible方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。