Esempio n. 1
0
 def test_open_by_tab_provider_main_page(self, app_fs,
                                         upload_and_create_test_provider):
     """Test provider main page from left menu"""
     provider_config_page = ProviderConfigPage(
         app_fs.driver, app_fs.adcm.url,
         upload_and_create_test_provider.id).open()
     provider_main_page = provider_config_page.open_main_tab()
     provider_main_page.wait_page_is_opened()
     provider_main_page.check_all_elements()
Esempio n. 2
0
 def test_filter_config_on_provider_config_page(
         self, app_fs, upload_and_create_test_provider):
     """Test config filter on provider config page"""
     params = {"search_param": "str_param", "group_name": "core-site"}
     provider_config_page = ProviderConfigPage(
         app_fs.driver, app_fs.adcm.url,
         upload_and_create_test_provider.id).open()
     with provider_config_page.config.wait_rows_change(
             expected_rows_amount=1):
         provider_config_page.config.search(params["search_param"])
     with allure.step(
             f"Check that rows are filtered by {params['search_param']}"):
         config_rows = provider_config_page.config.get_all_config_rows()
         assert (provider_config_page.config.get_config_row_info(
             config_rows[0]).name == f"{params['search_param']}:"
                 ), f"Name should be {params['search_param']}"
     with provider_config_page.config.wait_rows_change():
         provider_config_page.config.clear_search_input()
     with allure.step("Check that rows are not filtered"):
         config_rows = provider_config_page.config.get_all_config_rows()
         assert len(
             config_rows
         ) == 5, "Rows are filtered: there should be 4 row and 1 group"
     with provider_config_page.config.wait_rows_change(
             expected_rows_amount=3):
         provider_config_page.config.click_on_group(params["group_name"])
Esempio n. 3
0
 def test_open_config_from_provider_list_page(
         self, app_fs, upload_and_create_test_provider):
     """Tests open provider config from provider list page"""
     provider_page = ProviderListPage(app_fs.driver, app_fs.adcm.url).open()
     row = provider_page.table.get_all_rows()[0]
     provider_page.click_config_btn_in_row(row)
     ProviderConfigPage(
         app_fs.driver, app_fs.adcm.url,
         upload_and_create_test_provider.id).wait_page_is_opened()
Esempio n. 4
0
    def test_field_tooltips_on_provider_config_page(
            self, app_fs, bundle, upload_and_create_test_provider):
        """Test config fields tooltips on provider config page"""

        provider_config_page = ProviderConfigPage(
            app_fs.driver, app_fs.adcm.url,
            upload_and_create_test_provider.id).open()
        for item in CONFIG_ITEMS:
            provider_config_page.config.check_text_in_tooltip(
                item, f"Test description {item}")
Esempio n. 5
0
    def test_save_custom_config_on_provider_config_page(
            self, app_fs, upload_and_create_test_provider):
        """Test save config on provider config page"""

        params = {
            "config_name_new": "test_name",
            "config_name_old": "init",
        }
        provider_config_page = ProviderConfigPage(
            app_fs.driver, app_fs.adcm.url,
            upload_and_create_test_provider.id).open()
        provider_config_page.config.fill_config_fields_with_test_values()
        provider_config_page.config.set_description(params["config_name_new"])
        provider_config_page.config.save_config()
        provider_config_page.config.compare_versions(params["config_name_old"])
        provider_config_page.config.check_config_fields_history_with_test_values(
        )
Esempio n. 6
0
    def test_reset_config_in_row_on_provider_config_page(
            self, app_fs, upload_and_create_test_provider):
        """Test config reset on provider config page"""
        params = {
            "row_name": "str_param",
            "row_value_new": "test",
            "row_value_old": "0000",
            "config_name": "test_name",
        }
        provider_config_page = ProviderConfigPage(
            app_fs.driver, app_fs.adcm.url,
            upload_and_create_test_provider.id).open()
        config_row = provider_config_page.config.get_all_config_rows()[0]
        provider_config_page.config.type_in_field_with_few_inputs(
            row=config_row, values=[params["row_value_new"]], clear=True)
        provider_config_page.config.set_description(params["config_name"])
        provider_config_page.config.save_config()

        provider_config_page.config.reset_to_default(row=config_row)
        provider_config_page.config.assert_input_value_is(
            expected_value=params["row_value_old"],
            display_name=params["row_name"])
Esempio n. 7
0
    def test_field_validation_on_provider_config_page_with_default_value(
            self, app_fs, bundle, upload_and_create_test_provider):
        """Test config field validation on provider config page"""

        params = {
            'field_name': 'string',
            'new_value': 'test',
            "config_name": "test_name"
        }

        provider_config_page = ProviderConfigPage(
            app_fs.driver, app_fs.adcm.url,
            upload_and_create_test_provider.id).open()
        provider_config_page.config.clear_field_by_keys(params['field_name'])
        provider_config_page.config.check_field_is_required(
            params['field_name'])
        provider_config_page.config.type_in_field_with_few_inputs(
            row=provider_config_page.config.get_all_config_rows()[0],
            values=[params['new_value']])
        provider_config_page.config.save_config()
        provider_config_page.config.assert_input_value_is(
            expected_value=params["new_value"],
            display_name=params["field_name"])
Esempio n. 8
0
 def test_field_validation_on_provider_config_page(
         self, app_fs, bundle, upload_and_create_test_provider):
     """Test config field validation on provider config page"""
     params = {
         'pass_name': 'Test password',
         'req_name': 'Test Required item',
         'not_req_name': 'Test item',
         'wrong_value': 'test',
     }
     provider_config_page = ProviderConfigPage(
         app_fs.driver, app_fs.adcm.url,
         upload_and_create_test_provider.id).open()
     provider_config_page.config.check_password_confirm_required(
         params['pass_name'])
     provider_config_page.config.check_field_is_required(params['req_name'])
     config_row = provider_config_page.config.get_all_config_rows()[0]
     provider_config_page.config.type_in_field_with_few_inputs(
         row=config_row, values=[params['wrong_value']])
     provider_config_page.config.check_field_is_invalid(
         params['not_req_name'])
     provider_config_page.config.check_config_warn_icon_on_left_menu()
     provider_config_page.toolbar.check_warn_button(
         tab_name="test_provider",
         expected_warn_text=['test_provider has an issue with its config'])