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
44306f26
Commit
44306f26
authored
Jul 18, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix note polling specs.
parent
397686df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
spec/features/issues/note_polling_spec.rb
spec/features/issues/note_polling_spec.rb
+6
-9
No files found.
spec/features/issues/note_polling_spec.rb
View file @
44306f26
...
...
@@ -43,17 +43,17 @@ feature 'Issue notes polling', :feature, :js do
it
'when editing but have not changed anything, and an update comes in, show the updated content in the textarea'
do
click_edit_action
(
existing_note
)
expect
(
page
).
to
have_field
(
"note
[note]
"
,
with:
note_text
)
expect
(
page
).
to
have_field
(
"note
-body
"
,
with:
note_text
)
update_note
(
existing_note
,
updated_text
)
expect
(
page
).
to
have_field
(
"note
[note]
"
,
with:
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
[note]
"
,
with:
note_text
)
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
)
...
...
@@ -64,7 +64,7 @@ feature 'Issue notes polling', :feature, :js do
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
[note]
"
,
with:
note_text
)
expect
(
page
).
to
have_field
(
"note
-body
"
,
with:
note_text
)
find
(
"#note_
#{
existing_note
.
id
}
.js-note-text"
).
set
(
'something random'
)
...
...
@@ -88,14 +88,12 @@ feature 'Issue notes polling', :feature, :js do
visit
project_issue_path
(
project
,
issue
)
end
it
'
has .original-note-content to compare agains
t'
do
it
'
displays the updated conten
t'
do
expect
(
page
).
to
have_selector
(
"#note_
#{
existing_note
.
id
}
"
,
text:
note_text
)
expect
(
page
).
to
have_selector
(
"#note_
#{
existing_note
.
id
}
.original-note-content"
,
count:
1
,
visible:
false
)
update_note
(
existing_note
,
updated_text
)
expect
(
page
).
to
have_selector
(
"#note_
#{
existing_note
.
id
}
"
,
text:
updated_text
)
expect
(
page
).
to
have_selector
(
"#note_
#{
existing_note
.
id
}
.original-note-content"
,
count:
1
,
visible:
false
)
end
end
...
...
@@ -109,9 +107,8 @@ feature 'Issue notes polling', :feature, :js do
visit
project_issue_path
(
project
,
issue
)
end
it
'
has .original-note-content to compare against
'
do
it
'
shows the system note
'
do
expect
(
page
).
to
have_selector
(
"#note_
#{
system_note
.
id
}
"
,
text:
note_text
)
expect
(
page
).
to
have_selector
(
"#note_
#{
system_note
.
id
}
.original-note-content"
,
count:
1
,
visible:
false
)
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