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
f0cf32bf
Commit
f0cf32bf
authored
May 08, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just assert the existence of the timeago element
parent
7e33696e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
spec/features/snippets/notes_on_personal_snippets_spec.rb
spec/features/snippets/notes_on_personal_snippets_spec.rb
+4
-3
No files found.
spec/features/snippets/notes_on_personal_snippets_spec.rb
View file @
f0cf32bf
...
...
@@ -67,8 +67,7 @@ describe 'Comments on personal snippets', :js, feature: true do
end
context
'when editing a note'
do
# Matches `less than a minute ago`, `about a minute ago` and `N minutes ago`
let
(
:timeago_regex
)
{
/((less than|about) a minute|\d+? minutes) ago/
}
edited_text
=
find
(
'.edited-text'
)
it
'changes the text'
do
page
.
within
(
"#notes-list li#note_
#{
snippet_notes
[
0
].
id
}
"
)
do
...
...
@@ -81,9 +80,11 @@ describe 'Comments on personal snippets', :js, feature: true do
end
page
.
within
(
"#notes-list li#note_
#{
snippet_notes
[
0
].
id
}
"
)
do
edited_text
=
find
(
'.edited-text'
)
expect
(
page
).
to
have_css
(
'.note_edited_ago'
)
expect
(
page
).
to
have_content
(
'new content'
)
expect
(
find
(
'.note_edited_ago'
).
text
).
to
match
(
timeago_regex
)
expect
(
edited_text
).
to
have_selector
(
'.note_edited_ago'
)
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