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
b87b4d75
Commit
b87b4d75
authored
Apr 03, 2019
by
Alexandru Croitor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move tag quick action spec to shared example
parent
07cc1885
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
spec/features/commits/user_uses_quick_actions_spec.rb
spec/features/commits/user_uses_quick_actions_spec.rb
+1
-22
spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb
.../quick_actions/commit/tag_quick_action_shared_examples.rb
+24
-0
No files found.
spec/features/commits/user_uses_quick_actions_spec.rb
View file @
b87b4d75
...
...
@@ -22,27 +22,6 @@ describe 'Commit > User uses quick actions', :js do
let
(
:tag_message
)
{
'Stable release'
}
let
(
:truncated_commit_sha
)
{
Commit
.
truncate_sha
(
commit
.
sha
)
}
it
'tags this commit'
do
add_note
(
"/tag
#{
tag_name
}
#{
tag_message
}
"
)
expect
(
page
).
to
have_content
'Commands applied'
expect
(
page
).
to
have_content
"tagged commit
#{
truncated_commit_sha
}
"
expect
(
page
).
to
have_content
tag_name
visit
project_tag_path
(
project
,
tag_name
)
expect
(
page
).
to
have_content
tag_name
expect
(
page
).
to
have_content
tag_message
expect
(
page
).
to
have_content
truncated_commit_sha
end
describe
'preview'
,
:js
do
it
'removes quick action from note and explains it'
do
preview_note
(
"/tag
#{
tag_name
}
#{
tag_message
}
"
)
expect
(
page
).
not_to
have_content
'/tag'
expect
(
page
).
to
have_content
%{Tags this commit to #{tag_name} with "#{tag_message}"}
expect
(
page
).
to
have_content
tag_name
end
end
it_behaves_like
'tag quick action'
end
end
spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb
View file @
b87b4d75
# frozen_string_literal: true
shared_examples
'tag quick action'
do
context
"post note to existing commit"
do
it
'tags this commit'
do
add_note
(
"/tag
#{
tag_name
}
#{
tag_message
}
"
)
expect
(
page
).
to
have_content
'Commands applied'
expect
(
page
).
to
have_content
"tagged commit
#{
truncated_commit_sha
}
"
expect
(
page
).
to
have_content
tag_name
visit
project_tag_path
(
project
,
tag_name
)
expect
(
page
).
to
have_content
tag_name
expect
(
page
).
to
have_content
tag_message
expect
(
page
).
to
have_content
truncated_commit_sha
end
end
context
'preview'
,
:js
do
it
'removes quick action from note and explains it'
do
preview_note
(
"/tag
#{
tag_name
}
#{
tag_message
}
"
)
expect
(
page
).
not_to
have_content
'/tag'
expect
(
page
).
to
have_content
%{Tags this commit to #{tag_name} with "#{tag_message}"}
expect
(
page
).
to
have_content
tag_name
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