##// END OF EJS Templates
tests: fixed repo tests after changes for repo type selector.
marcink -
r4330:d9a14621 default
parent child Browse files
Show More
@@ -84,15 +84,13 b' class TestAdminRepos(object):'
84 with mock.patch('rhodecode.BACKENDS', {'git': 'git'}):
84 with mock.patch('rhodecode.BACKENDS', {'git': 'git'}):
85 response = self.app.get(route_path('repo_new'), status=200)
85 response = self.app.get(route_path('repo_new'), status=200)
86 assert_response = response.assert_response()
86 assert_response = response.assert_response()
87 element = assert_response.get_element('#repo_type')
87 element = assert_response.get_element('[name=repo_type]')
88 assert element.text_content() == '\ngit\n'
88 assert element.get('value') == 'git'
89
89
90 def test_create_page_non_restricted_backends(self, autologin_user, backend):
90 def test_create_page_non_restricted_backends(self, autologin_user, backend):
91 response = self.app.get(route_path('repo_new'), status=200)
91 response = self.app.get(route_path('repo_new'), status=200)
92 assert_response = response.assert_response()
92 assert_response = response.assert_response()
93 assert_response.element_contains('#repo_type', 'git')
93 assert ['hg', 'git', 'svn'] == [x.get('value') for x in assert_response.get_elements('[name=repo_type]')]
94 assert_response.element_contains('#repo_type', 'svn')
95 assert_response.element_contains('#repo_type', 'hg')
96
94
97 @pytest.mark.parametrize(
95 @pytest.mark.parametrize(
98 "suffix", [u'', u'xxa'], ids=['', 'non-ascii'])
96 "suffix", [u'', u'xxa'], ids=['', 'non-ascii'])
@@ -157,12 +157,6 b''
157 setCopyPermsOption(e.val)
157 setCopyPermsOption(e.val)
158 });
158 });
159
159
160 $("#repo_type").select2({
161 'containerCssClass': "drop-menu",
162 'dropdownCssClass': "drop-menu-dropdown",
163 'minimumResultsForSearch': -1,
164 });
165
166 $('#repo_name').focus();
160 $('#repo_name').focus();
167
161
168 $('#select_my_group').on('click', function(e){
162 $('#select_my_group').on('click', function(e){
General Comments 0
You need to be logged in to leave comments. Login now