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
5cedcf5e
Commit
5cedcf5e
authored
Oct 21, 2021
by
Nailia Iskhakova
Committed by
Savas Vedova
Oct 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable SAST on project creation in QA spec during the experiment
parent
3ec0fd33
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
app/views/projects/_new_project_fields.html.haml
app/views/projects/_new_project_fields.html.haml
+2
-2
qa/qa/page/project/new.rb
qa/qa/page/project/new.rb
+8
-0
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+1
-0
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
...atures/browser_ui/1_manage/project/create_project_spec.rb
+5
-5
No files found.
app/views/projects/_new_project_fields.html.haml
View file @
5cedcf5e
...
...
@@ -72,7 +72,7 @@
-
e
.
try
do
.form-group
.form-check.gl-mb-3
=
check_box_tag
'project[initialize_with_sast]'
,
'1'
,
true
,
class:
'form-check-input'
,
data:
{
track_experiment:
e
.
name
,
track_label:
track_label
,
track_action:
'activate_form_input'
,
track_property:
'init_with_sast'
}
=
check_box_tag
'project[initialize_with_sast]'
,
'1'
,
true
,
class:
'form-check-input'
,
data:
{
qa_selector:
'initialize_with_sast_checkbox'
,
track_experiment:
e
.
name
,
track_label:
track_label
,
track_action:
'activate_form_input'
,
track_property:
'init_with_sast'
}
=
label_tag
'project[initialize_with_sast]'
,
class:
'form-check-label'
do
=
s_
(
'ProjectsNew|Enable Static Application Security Testing (SAST)'
)
.form-text.text-muted
...
...
@@ -81,7 +81,7 @@
-
e
.
try
(
:free_indicator
)
do
.form-group
.form-check.gl-mb-3
=
check_box_tag
'project[initialize_with_sast]'
,
'1'
,
true
,
class:
'form-check-input'
,
data:
{
track_experiment:
e
.
name
,
track_label:
track_label
,
track_action:
'activate_form_input'
,
track_property:
'init_with_sast'
}
=
check_box_tag
'project[initialize_with_sast]'
,
'1'
,
true
,
class:
'form-check-input'
,
data:
{
qa_selector:
'initialize_with_sast_checkbox'
,
track_experiment:
e
.
name
,
track_label:
track_label
,
track_action:
'activate_form_input'
,
track_property:
'init_with_sast'
}
=
label_tag
'project[initialize_with_sast]'
,
class:
'form-check-label'
do
=
s_
(
'ProjectsNew|Enable Static Application Security Testing (SAST)'
)
%span
.badge.badge-info.badge-pill.gl-badge.sm
=
_
(
'Free'
)
...
...
qa/qa/page/project/new.rb
View file @
5cedcf5e
...
...
@@ -13,6 +13,7 @@ module QA
view
'app/views/projects/_new_project_fields.html.haml'
do
element
:initialize_with_readme_checkbox
element
:initialize_with_sast_checkbox
element
:project_namespace_field
,
'namespaces_options'
# rubocop:disable QA/ElementWithPattern
element
:project_name
,
'text_field :name'
# rubocop:disable QA/ElementWithPattern
element
:project_path
,
'text_field :path'
# rubocop:disable QA/ElementWithPattern
...
...
@@ -79,6 +80,13 @@ module QA
choose
visibility
.
capitalize
end
# Disable experiment for SAST at project creation https://gitlab.com/gitlab-org/gitlab/-/issues/333196
def
disable_initialize_with_sast
return
unless
has_element?
(
:initialize_with_sast_checkbox
)
uncheck_element
(
:initialize_with_sast_checkbox
)
end
def
click_github_link
click_link
'GitHub'
end
...
...
qa/qa/resource/project.rb
View file @
5cedcf5e
...
...
@@ -93,6 +93,7 @@ module QA
new_page
.
choose_name
(
@name
)
new_page
.
add_description
(
@description
)
new_page
.
set_visibility
(
@visibility
)
new_page
.
disable_initialize_with_sast
new_page
.
disable_initialize_with_readme
unless
@initialize_with_readme
new_page
.
create_new_project
end
...
...
qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
View file @
5cedcf5e
...
...
@@ -5,13 +5,13 @@ module QA
describe
'Project'
,
:requires_admin
do
shared_examples
'successful project creation'
do
it
'creates a new project'
do
Page
::
Project
::
Show
.
perform
do
|
project
|
expect
(
project
).
to
have_content
(
project_name
)
expect
(
project
).
to
have_content
(
Page
::
Project
::
Show
.
perform
do
|
project
_page
|
expect
(
project
_page
).
to
have_content
(
project_name
)
expect
(
project
_page
).
to
have_content
(
/Project \S?
#{
project_name
}
\S+ was successfully created/
)
expect
(
project
).
to
have_content
(
'create awesome project test'
)
expect
(
project
).
to
have_content
(
'The repository for this project is empty'
)
expect
(
project
_page
).
to
have_content
(
'create awesome project test'
)
expect
(
project
_page
).
to
have_content
(
'The repository for this project is empty'
)
end
end
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