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
1b4048ab
Commit
1b4048ab
authored
Mar 12, 2021
by
Désirée Chevalier
Committed by
Sanad Liaquat
Mar 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update e2e checkbox functionality
Standardizes how e2e tests interact with checkboxes
parent
cffdff1f
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
89 additions
and
79 deletions
+89
-79
app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue
...scripts/ci_variable_list/components/ci_variable_modal.vue
+0
-1
app/assets/javascripts/ide/components/commit_sidebar/new_merge_request_option.vue
...de/components/commit_sidebar/new_merge_request_option.vue
+0
-1
app/views/admin/application_settings/_performance_bar.html.haml
...ews/admin/application_settings/_performance_bar.html.haml
+2
-2
app/views/projects/_new_project_fields.html.haml
app/views/projects/_new_project_fields.html.haml
+1
-1
qa/qa/ee/page/admin/settings/component/elasticsearch.rb
qa/qa/ee/page/admin/settings/component/elasticsearch.rb
+2
-2
qa/qa/ee/page/group/epic/new.rb
qa/qa/ee/page/group/epic/new.rb
+1
-0
qa/qa/ee/page/group/settings/general.rb
qa/qa/ee/page/group/settings/general.rb
+17
-17
qa/qa/ee/page/project/settings/merge_request.rb
qa/qa/ee/page/project/settings/merge_request.rb
+2
-2
qa/qa/ee/page/project/settings/push_rules.rb
qa/qa/ee/page/project/settings/push_rules.rb
+5
-5
qa/qa/page/admin/settings/component/ip_limits.rb
qa/qa/page/admin/settings/component/ip_limits.rb
+3
-3
qa/qa/page/admin/settings/component/outbound_requests.rb
qa/qa/page/admin/settings/component/outbound_requests.rb
+1
-1
qa/qa/page/admin/settings/component/performance_bar.rb
qa/qa/page/admin/settings/component/performance_bar.rb
+1
-1
qa/qa/page/admin/settings/component/sign_up_restrictions.rb
qa/qa/page/admin/settings/component/sign_up_restrictions.rb
+4
-4
qa/qa/page/base.rb
qa/qa/page/base.rb
+19
-4
qa/qa/page/group/settings/general.rb
qa/qa/page/group/settings/general.rb
+24
-24
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+1
-0
qa/qa/page/project/new.rb
qa/qa/page/project/new.rb
+1
-1
qa/qa/page/project/operations/kubernetes/add_existing.rb
qa/qa/page/project/operations/kubernetes/add_existing.rb
+1
-1
qa/qa/page/project/settings/auto_devops.rb
qa/qa/page/project/settings/auto_devops.rb
+2
-2
qa/qa/page/project/settings/ci_variables.rb
qa/qa/page/project/settings/ci_variables.rb
+0
-1
qa/qa/page/project/settings/incidents.rb
qa/qa/page/project/settings/incidents.rb
+1
-1
qa/qa/page/project/settings/merge_request.rb
qa/qa/page/project/settings/merge_request.rb
+1
-1
qa/qa/page/project/web_ide/edit.rb
qa/qa/page/project/web_ide/edit.rb
+0
-4
No files found.
app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue
View file @
1b4048ab
...
...
@@ -265,7 +265,6 @@ export default {
<gl-form-checkbox
ref=
"masked-ci-variable"
v-model=
"masked"
data-qa-selector=
"ci_variable_masked_checkbox"
data-testid=
"ci-variable-masked-checkbox"
>
{{
__
(
'
Mask variable
'
)
}}
...
...
app/assets/javascripts/ide/components/commit_sidebar/new_merge_request_option.vue
View file @
1b4048ab
...
...
@@ -41,7 +41,6 @@ export default {
:disabled=
"shouldDisableNewMrOption"
:checked=
"shouldCreateMR"
type=
"checkbox"
data-qa-selector=
"start_new_mr_checkbox"
@
change=
"toggleShouldCreateMR"
/>
<span
class=
"gl-ml-3 ide-option-label"
>
...
...
app/views/admin/application_settings/_performance_bar.html.haml
View file @
1b4048ab
...
...
@@ -4,8 +4,8 @@
%fieldset
.form-group
.form-check
=
f
.
check_box
:performance_bar_enabled
,
class:
'form-check-input'
=
f
.
label
:performance_bar_enabled
,
class:
'form-check-label
qa-enable-performance-bar-checkbox
'
do
=
f
.
check_box
:performance_bar_enabled
,
class:
'form-check-input'
,
data:
{
qa_selector:
'enable_performance_bar_checkbox'
}
=
f
.
label
:performance_bar_enabled
,
class:
'form-check-label'
do
Enable access to the Performance Bar
.form-group
=
f
.
label
:performance_bar_allowed_group_path
,
'Allowed group'
,
class:
'label-bold'
...
...
app/views/projects/_new_project_fields.html.haml
View file @
1b4048ab
...
...
@@ -55,7 +55,7 @@
%div
{
:class
=>
"col-sm-12"
}
.form-check
-
experiment
(
:new_project_readme
,
actor:
current_user
)
do
|
e
|
=
check_box_tag
'project[initialize_with_readme]'
,
'1'
,
e
.
run
,
class:
'form-check-input
qa-initialize-with-readme-checkbox'
,
data:
{
track_label:
"
#{
track_label
}
"
,
track_event:
"activate_form_input"
,
track_property:
"init_with_readme"
,
track_value:
""
}
=
check_box_tag
'project[initialize_with_readme]'
,
'1'
,
e
.
run
,
class:
'form-check-input
'
,
data:
{
qa_selector:
"initialize_with_readme_checkbox"
,
track_label:
"
#{
track_label
}
"
,
track_event:
"activate_form_input"
,
track_property:
"init_with_readme"
,
track_value:
""
}
=
label_tag
'project[initialize_with_readme]'
,
class:
'form-check-label'
do
.option-title
%strong
=
s_
(
'ProjectsNew|Initialize repository with a README'
)
...
...
qa/qa/ee/page/admin/settings/component/elasticsearch.rb
View file @
1b4048ab
...
...
@@ -15,11 +15,11 @@ module QA
end
def
check_indexing
check_element
:indexing_checkbox
check_element
(
:indexing_checkbox
)
end
def
check_search
check_element
:search_checkbox
check_element
(
:search_checkbox
)
end
def
enter_link
(
link
)
...
...
qa/qa/ee/page/group/epic/new.rb
View file @
1b4048ab
...
...
@@ -17,6 +17,7 @@ module QA
end
def
enable_confidential_epic
# TODO: Fix this workaround for checkbox hidden by label
find_element
(
:confidential_epic_checkbox
,
visible:
false
).
click
end
...
...
qa/qa/ee/page/group/settings/general.rb
View file @
1b4048ab
...
...
@@ -59,9 +59,9 @@ module QA
within_element
(
:custom_project_template_select
)
do
clear_current_selection_if_present
end
click_element
:custom_project_template_select
click_element
(
:custom_project_template_select
)
search_and_select
(
path
)
click_element
:save_changes_button
click_element
(
:save_changes_button
)
end
def
set_ip_address_restriction
(
ip_address
)
...
...
@@ -77,31 +77,31 @@ module QA
ip_restriction_field_input
=
find_element
(
:ip_restriction_field
).
find
(
'input[type="text"]'
)
ip_restriction_field_input
.
set
ip_address
ip_restriction_field_input
.
send_keys
(
:enter
)
click_element
:save_permissions_changes_button
click_element
(
:save_permissions_changes_button
)
end
def
set_membership_lock_enabled
expand_content
:permission_lfs_2fa_content
check_element
:membership_lock_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
check_element
(
:membership_lock_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_membership_lock_disabled
expand_content
:permission_lfs_2fa_content
uncheck_element
:membership_lock_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
uncheck_element
(
:membership_lock_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_prevent_forking_outside_group_enabled
expand_content
:permission_lfs_2fa_content
check_element
:prevent_forking_outside_group_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
check_element
(
:prevent_forking_outside_group_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_prevent_forking_outside_group_disabled
expand_content
:permission_lfs_2fa_content
uncheck_element
:prevent_forking_outside_group_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
uncheck_element
(
:prevent_forking_outside_group_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_repository_size_limit
(
limit
)
...
...
@@ -122,9 +122,9 @@ module QA
within_element
(
:file_template_repository_dropdown
)
do
clear_current_selection_if_present
end
click_element
:file_template_repository_dropdown
click_element
(
:file_template_repository_dropdown
)
search_and_select
(
path
)
click_element
:save_changes_button
click_element
(
:save_changes_button
)
end
end
end
...
...
qa/qa/ee/page/project/settings/merge_request.rb
View file @
1b4048ab
...
...
@@ -29,11 +29,11 @@ module QA
end
def
click_pipelines_for_merged_results_checkbox
check_element
:merged_results_pipeline_checkbox
check_element
(
:merged_results_pipeline_checkbox
)
end
def
click_merge_trains_checkbox
check_element
:merge_trains_checkbox
check_element
(
:merge_trains_checkbox
)
end
def
enable_merge_train
...
...
qa/qa/ee/page/project/settings/push_rules.rb
View file @
1b4048ab
...
...
@@ -28,23 +28,23 @@ module QA
end
def
check_reject_unsigned_commits
check_element
:reject_unsigned_commits_checkbox
check_element
(
:reject_unsigned_commits_checkbox
)
end
def
check_committer_restriction
check_element
:committer_restriction_checkbox
check_element
(
:committer_restriction_checkbox
)
end
def
check_deny_delete_tag
check_element
:deny_delete_tag_checkbox
check_element
(
:deny_delete_tag_checkbox
)
end
def
check_restrict_author
check_element
:restrict_author_checkbox
check_element
(
:restrict_author_checkbox
)
end
def
check_prevent_secrets
check_element
:prevent_secrets_checkbox
check_element
(
:prevent_secrets_checkbox
)
end
def
fill_commit_message_rule
(
message
)
...
...
qa/qa/page/admin/settings/component/ip_limits.rb
View file @
1b4048ab
...
...
@@ -14,9 +14,9 @@ module QA
end
def
enable_throttles
check_element
:throttle_unauthenticated_checkbox
check_element
:throttle_authenticated_api_checkbox
check_element
:throttle_authenticated_web_checkbox
check_element
(
:throttle_unauthenticated_checkbox
)
check_element
(
:throttle_authenticated_api_checkbox
)
check_element
(
:throttle_authenticated_web_checkbox
)
end
def
save_settings
...
...
qa/qa/page/admin/settings/component/outbound_requests.rb
View file @
1b4048ab
...
...
@@ -19,7 +19,7 @@ module QA
private
def
check_allow_requests_to_local_network_from_services_checkbox
check_element
:allow_requests_from_services_checkbox
check_element
(
:allow_requests_from_services_checkbox
)
end
def
click_save_changes_button
...
...
qa/qa/page/admin/settings/component/performance_bar.rb
View file @
1b4048ab
...
...
@@ -12,7 +12,7 @@ module QA
end
def
enable_performance_bar
c
lick_element
:enable_performance_bar_checkbox
c
heck_element
(
:enable_performance_bar_checkbox
)
Capybara
.
current_session
.
driver
.
browser
.
manage
.
add_cookie
(
name:
'perf_bar_enabled'
,
value:
'true'
)
end
...
...
qa/qa/page/admin/settings/component/sign_up_restrictions.rb
View file @
1b4048ab
...
...
@@ -13,13 +13,13 @@ module QA
end
def
require_admin_approval_after_user_signup
check_element
:require_admin_approval_after_user_signup_checkbox
click_element
:save_changes_button
check_element
(
:require_admin_approval_after_user_signup_checkbox
)
click_element
(
:save_changes_button
)
end
def
disable_signups
uncheck_element
:signup_enabled_checkbox
click_element
:save_changes_button
uncheck_element
(
:signup_enabled_checkbox
)
click_element
(
:save_changes_button
)
end
end
end
...
...
qa/qa/page/base.rb
View file @
1b4048ab
...
...
@@ -133,9 +133,15 @@ module QA
end
def
check_element
(
name
)
if
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
"
#{
name
}
is already checked"
)
return
end
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
).
set
(
true
)
checked
=
find_element
(
name
).
checked?
find_element
(
name
,
visible:
false
).
click
checked
=
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
checked
?
"
#{
name
}
was checked"
:
"
#{
name
}
was not checked"
)
...
...
@@ -144,10 +150,19 @@ module QA
end
def
uncheck_element
(
name
)
unless
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
"
#{
name
}
is already unchecked"
)
return
end
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
).
set
(
false
)
find_element
(
name
,
visible:
false
).
click
unchecked
=
!
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
unchecked
?
"
#{
name
}
was unchecked"
:
"
#{
name
}
was not unchecked"
)
!
find_element
(
name
).
checked?
unchecked
end
end
...
...
qa/qa/page/group/settings/general.rb
View file @
1b4048ab
...
...
@@ -54,57 +54,57 @@ module QA
end
def
set_lfs_enabled
expand_content
:permission_lfs_2fa_content
check_element
:lfs_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
check_element
(
:lfs_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_lfs_disabled
expand_content
:permission_lfs_2fa_content
uncheck_element
:lfs_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
uncheck_element
(
:lfs_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_request_access_enabled
expand_content
:permission_lfs_2fa_content
check_element
:request_access_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
check_element
(
:request_access_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_request_access_disabled
expand_content
:permission_lfs_2fa_content
uncheck_element
:request_access_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
uncheck_element
(
:request_access_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_require_2fa_enabled
expand_content
:permission_lfs_2fa_content
check_element
:require_2fa_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
check_element
(
:require_2fa_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_require_2fa_disabled
expand_content
:permission_lfs_2fa_content
uncheck_element
:require_2fa_checkbox
click_element
:save_permissions_changes_button
expand_content
(
:permission_lfs_2fa_content
)
uncheck_element
(
:require_2fa_checkbox
)
click_element
(
:save_permissions_changes_button
)
end
def
set_project_creation_level
(
value
)
expand_content
:permission_lfs_2fa_content
expand_content
(
:permission_lfs_2fa_content
)
select_element
(
:project_creation_level_dropdown
,
value
)
click_element
:save_permissions_changes_button
click_element
(
:save_permissions_changes_button
)
end
def
toggle_request_access
expand_content
:permission_lfs_2fa_content
expand_content
(
:permission_lfs_2fa_content
)
if
find_element
(
:request_access_checkbox
).
checked?
uncheck_element
:request_access_checkbox
uncheck_element
(
:request_access_checkbox
)
else
check_element
:request_access_checkbox
check_element
(
:request_access_checkbox
)
end
click_element
:save_permissions_changes_button
click_element
(
:save_permissions_changes_button
)
end
end
end
...
...
qa/qa/page/merge_request/show.rb
View file @
1b4048ab
...
...
@@ -228,6 +228,7 @@ module QA
!
find_element
(
:squash_checkbox
).
disabled?
end
# TODO: Fix workaround for data-qa-selector failure
click_element
(
:squash_checkbox
)
end
...
...
qa/qa/page/project/new.rb
View file @
1b4048ab
...
...
@@ -68,7 +68,7 @@ module QA
end
def
enable_initialize_with_readme
check_element
:initialize_with_readme_checkbox
check_element
(
:initialize_with_readme_checkbox
)
end
end
end
...
...
qa/qa/page/project/operations/kubernetes/add_existing.rb
View file @
1b4048ab
...
...
@@ -36,7 +36,7 @@ module QA
end
def
uncheck_rbac!
uncheck_element
:rbac_checkbox
uncheck_element
(
:rbac_checkbox
)
end
end
end
...
...
qa/qa/page/project/settings/auto_devops.rb
View file @
1b4048ab
...
...
@@ -11,8 +11,8 @@ module QA
end
def
enable_autodevops
check_element
:enable_autodevops_checkbox
click_element
:save_changes_button
check_element
(
:enable_autodevops_checkbox
)
click_element
(
:save_changes_button
)
end
end
end
...
...
qa/qa/page/project/settings/ci_variables.rb
View file @
1b4048ab
...
...
@@ -10,7 +10,6 @@ module QA
view
'app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue'
do
element
:ci_variable_key_field
element
:ci_variable_value_field
element
:ci_variable_masked_checkbox
element
:ci_variable_save_button
element
:ci_variable_delete_button
end
...
...
qa/qa/page/project/settings/incidents.rb
View file @
1b4048ab
...
...
@@ -13,7 +13,7 @@ module QA
end
def
enable_issues_for_incidents
check_element
:create_issue_checkbox
check_element
(
:create_issue_checkbox
)
end
def
select_issue_template
(
template
)
...
...
qa/qa/page/project/settings/merge_request.rb
View file @
1b4048ab
...
...
@@ -29,7 +29,7 @@ module QA
end
def
enable_merge_if_all_disscussions_are_resolved
c
lick_element
:allow_merge_if_all_discussions_are_resolved_checkbox
c
heck_element
(
:allow_merge_if_all_discussions_are_resolved_checkbox
)
click_save_changes
end
end
...
...
qa/qa/page/project/web_ide/edit.rb
View file @
1b4048ab
...
...
@@ -44,10 +44,6 @@ module QA
element
:commit_button
end
view
'app/assets/javascripts/ide/components/commit_sidebar/new_merge_request_option.vue'
do
element
:start_new_mr_checkbox
end
view
'app/assets/javascripts/ide/components/repo_editor.vue'
do
element
:editor_container
end
...
...
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