summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2017-05-05 10:57:29 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-05-05 10:57:29 +0000
commit645593e5af1fe9e7fa345788aeaa90d2313d6486 (patch)
tree514b8e8acbc10e915c50971c31b7fab6fdbcb18f /features
parenta5347fe58f6ace1ced67fa32a8469ba4e2819606 (diff)
downloadgitlab-ce-645593e5af1fe9e7fa345788aeaa90d2313d6486.tar.gz
Add instant comments support
Diffstat (limited to 'features')
-rw-r--r--features/steps/project/merge_requests.rb7
-rw-r--r--features/steps/shared/note.rb4
2 files changed, 11 insertions, 0 deletions
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index a06b2f2911f..4b7d6cd840b 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -458,6 +458,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Comment"
end
+ wait_for_ajax
+
page.within ".files>div:nth-child(2) .note-body > .note-text" do
expect(page).to have_content "Line is correct"
end
@@ -470,6 +472,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
fill_in "note_note", with: "Line is wrong on here"
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I should still see a comment like "Line is correct" in the second file' do
@@ -574,6 +578,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
fill_in "note_note", with: message
click_button "Comment"
end
+
+ wait_for_ajax
+
page.within(".notes_holder", visible: true) do
expect(page).to have_content message
end
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 7885cc7ab77..7d260025052 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -24,6 +24,8 @@ module SharedNote
fill_in "note[note]", with: "XML attached"
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I preview a comment text like "Bug fixed :smile:"' do
@@ -37,6 +39,8 @@ module SharedNote
page.within(".js-main-target-form") do
click_button "Comment"
end
+
+ wait_for_ajax
end
step 'I write a comment like ":+1: Nice"' do