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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
8345f2e6
Commit
8345f2e6
authored
Aug 12, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix note polling specs with the new behavior of not updating an external updated note being edited
parent
60adf5a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
spec/features/issues/note_polling_spec.rb
spec/features/issues/note_polling_spec.rb
+5
-16
No files found.
spec/features/issues/note_polling_spec.rb
View file @
8345f2e6
...
...
@@ -39,33 +39,22 @@ feature 'Issue notes polling', :js do
expect
(
page
).
to
have_selector
(
"#note_
#{
existing_note
.
id
}
"
,
text:
updated_text
)
end
it
'when editing but have not changed anything, and an update comes in, show
the updated content in the textarea
'
do
it
'when editing but have not changed anything, and an update comes in, show
warning and does not update the note
'
do
click_edit_action
(
existing_note
)
expect
(
page
).
to
have_field
(
"note
-body
"
,
with:
note_text
)
expect
(
page
).
to
have_field
(
"note
[note]
"
,
with:
note_text
)
update_note
(
existing_note
,
updated_text
)
expect
(
page
).
to
have_field
(
"note-body"
,
with:
updated_text
)
end
it
'when editing but you changed some things, and an update comes in, show a warning'
do
click_edit_action
(
existing_note
)
expect
(
page
).
to
have_field
(
"note-body"
,
with:
note_text
)
find
(
"#note_
#{
existing_note
.
id
}
.js-note-text"
).
set
(
'something random'
)
update_note
(
existing_note
,
updated_text
)
expect
(
page
).
not_to
have_field
(
"note[note]"
,
with:
updated_text
)
expect
(
page
).
to
have_selector
(
".alert"
)
end
it
'when editing but you changed some things, an update comes in, and you press cancel, show the updated content'
do
click_edit_action
(
existing_note
)
expect
(
page
).
to
have_field
(
"note-body"
,
with:
note_text
)
find
(
"#note_
#{
existing_note
.
id
}
.js-note-text"
).
set
(
'something random'
)
expect
(
page
).
to
have_field
(
"note[note]"
,
with:
note_text
)
update_note
(
existing_note
,
updated_text
)
...
...
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