Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eb120c22
Commit
eb120c22
authored
Jan 17, 2022
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing qa selector
Add test id for save button
parent
6ea17c73
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
14 deletions
+13
-14
app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
...projects/shared/permissions/components/settings_panel.vue
+2
-0
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+3
-3
qa/qa/page/project/settings/visibility_features_permissions.rb
.../page/project/settings/visibility_features_permissions.rb
+1
-4
spec/features/projects/features_visibility_spec.rb
spec/features/projects/features_visibility_spec.rb
+2
-2
spec/features/projects/settings/project_settings_spec.rb
spec/features/projects/settings/project_settings_spec.rb
+2
-2
spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb
...cts/settings/user_manages_merge_requests_settings_spec.rb
+3
-3
No files found.
app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
View file @
eb120c22
...
...
@@ -791,12 +791,14 @@ export default {
:disabled=
"false"
:phrase=
"confirmationPhrase"
:button-text=
"$options.i18n.confirmButtonText"
data-testid=
"project-features-save-button"
@
confirm=
"$emit('confirm')"
/>
<gl-button
v-else
type=
"submit"
variant=
"confirm"
data-testid=
"project-features-save-button"
button-class=
"qa-visibility-features-permissions-save-button"
>
{{ $options.i18n.confirmButtonText }}
...
...
app/views/projects/edit.html.haml
View file @
eb120c22
...
...
@@ -2,7 +2,7 @@
-
page_title
_
(
"General"
)
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
expanded
=
expanded_by_default?
-
re
mov
e_visibility_form_id
=
'reduce-visibility-form'
-
re
duc
e_visibility_form_id
=
'reduce-visibility-form'
%section
.settings.general-settings.no-animate.expanded
#js-general-settings
.settings-header
...
...
@@ -18,10 +18,10 @@
%p
=
_
(
'Choose visibility level, enable/disable project features and their permissions, disable email notifications, and show default award emoji.'
)
.settings-content
=
form_for
@project
,
html:
{
multipart:
true
,
class:
"sharing-permissions-form"
,
id:
re
mov
e_visibility_form_id
},
authenticity_token:
true
do
|
f
|
=
form_for
@project
,
html:
{
multipart:
true
,
class:
"sharing-permissions-form"
,
id:
re
duc
e_visibility_form_id
},
authenticity_token:
true
do
|
f
|
%input
{
name:
'update_section'
,
type:
'hidden'
,
value:
'js-shared-permissions'
}
%template
.js-project-permissions-form-data
{
type:
"application/json"
}=
project_permissions_panel_data
(
@project
).
to_json
.
html_safe
.js-project-permissions-form
{
data:
visibility_confirm_modal_data
(
@project
,
re
mov
e_visibility_form_id
)
}
.js-project-permissions-form
{
data:
visibility_confirm_modal_data
(
@project
,
re
duc
e_visibility_form_id
)
}
%section
.rspec-merge-request-settings.settings.merge-requests-feature.no-animate
#js-merge-request-settings
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)],
data:
{
qa_selector:
'merge_request_settings_content'
}
}
.settings-header
...
...
qa/qa/page/project/settings/visibility_features_permissions.rb
View file @
eb120c22
...
...
@@ -5,12 +5,9 @@ module QA
module
Project
module
Settings
class
VisibilityFeaturesPermissions
<
Page
::
Base
view
'app/helpers/projects_helper.rb'
do
element
:visibility_features_permissions_save_button
end
view
'app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue'
do
element
:project_visibility_dropdown
element
:visibility_features_permissions_save_button
end
def
set_project_visibility
(
visibility
)
...
...
spec/features/projects/features_visibility_spec.rb
View file @
eb120c22
...
...
@@ -24,7 +24,7 @@ RSpec.describe 'Edit Project Settings' do
# disable by clicking toggle
toggle_feature_off
(
"project[project_feature_attributes][
#{
tool_name
}
_access_level]"
)
page
.
within
(
'.sharing-permissions'
)
do
find
(
'
input[value="Save changes
"]'
).
click
find
(
'
[data-testid="project-features-save-button
"]'
).
click
end
wait_for_requests
expect
(
page
).
not_to
have_selector
(
".shortcuts-
#{
shortcut_name
}
"
)
...
...
@@ -32,7 +32,7 @@ RSpec.describe 'Edit Project Settings' do
# re-enable by clicking toggle again
toggle_feature_on
(
"project[project_feature_attributes][
#{
tool_name
}
_access_level]"
)
page
.
within
(
'.sharing-permissions'
)
do
find
(
'
input[value="Save changes
"]'
).
click
find
(
'
[data-testid="project-features-save-button
"]'
).
click
end
wait_for_requests
expect
(
page
).
to
have_selector
(
".shortcuts-
#{
shortcut_name
}
"
)
...
...
spec/features/projects/settings/project_settings_spec.rb
View file @
eb120c22
...
...
@@ -47,7 +47,7 @@ RSpec.describe 'Projects settings' do
# disable by clicking toggle
forking_enabled_button
.
click
page
.
within
(
'.sharing-permissions'
)
do
find
(
'
input[value="Save changes
"]'
).
click
find
(
'
[data-testid="project-features-save-button
"]'
).
click
end
wait_for_requests
...
...
@@ -77,7 +77,7 @@ RSpec.describe 'Projects settings' do
expect
(
default_award_emojis_input
.
value
).
to
eq
(
'false'
)
page
.
within
(
'.sharing-permissions'
)
do
find
(
'
input[value="Save changes
"]'
).
click
find
(
'
[data-testid="project-features-save-button
"]'
).
click
end
wait_for_requests
...
...
spec/features/projects/settings/user_manages_merge_requests_settings_spec.rb
View file @
eb120c22
...
...
@@ -54,7 +54,7 @@ RSpec.describe 'Projects > Settings > User manages merge request settings' do
within
(
'.sharing-permissions-form'
)
do
find
(
'.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .gl-toggle'
).
click
find
(
'
input[value="Save changes
"]'
).
send_keys
(
:return
)
find
(
'
[data-testid="project-features-save-button
"]'
).
send_keys
(
:return
)
end
expect
(
page
).
not_to
have_content
'Pipelines must succeed'
...
...
@@ -74,7 +74,7 @@ RSpec.describe 'Projects > Settings > User manages merge request settings' do
within
(
'.sharing-permissions-form'
)
do
find
(
'.project-feature-controls[data-for="project[project_feature_attributes][builds_access_level]"] .gl-toggle'
).
click
find
(
'
input[value="Save changes
"]'
).
send_keys
(
:return
)
find
(
'
[data-testid="project-features-save-button
"]'
).
send_keys
(
:return
)
end
expect
(
page
).
to
have_content
'Pipelines must succeed'
...
...
@@ -95,7 +95,7 @@ RSpec.describe 'Projects > Settings > User manages merge request settings' do
within
(
'.sharing-permissions-form'
)
do
find
(
'.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .gl-toggle'
).
click
find
(
'
input[value="Save changes
"]'
).
send_keys
(
:return
)
find
(
'
[data-testid="project-features-save-button
"]'
).
send_keys
(
:return
)
end
expect
(
page
).
to
have_content
'Pipelines must succeed'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment