summaryrefslogtreecommitdiff
path: root/features/steps/shared/note.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-22 20:56:12 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-22 20:56:12 +0300
commitc31c8c55a4b805932ff24e08dc4cdacb497b1a82 (patch)
treef4654ca2c6872015fb1346f5318c9c2d5140e18d /features/steps/shared/note.rb
parentfbdf34d7abc678435ab4a603e93dcc83cb89a981 (diff)
parentef6e94e37e0fce23acf32992476aeb63405be0c1 (diff)
downloadgitlab-ce-c31c8c55a4b805932ff24e08dc4cdacb497b1a82.tar.gz
Merge branch 'spinach-step' of https://github.com/cirosantilli/gitlabhq into cirosantilli-spinach-step
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: features/steps/project/markdown_render.rb
Diffstat (limited to 'features/steps/shared/note.rb')
-rw-r--r--features/steps/shared/note.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 1c52d4c72d8..4019fe3697a 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -1,18 +1,18 @@
module SharedNote
include Spinach::DSL
- Given 'I delete a comment' do
+ step 'I delete a comment' do
find('.note').hover
find(".js-note-delete").click
end
- Given 'I haven\'t written any comment text' do
+ step 'I haven\'t written any comment text' do
within(".js-main-target-form") do
fill_in "note[note]", with: ""
end
end
- Given 'I leave a comment like "XML attached"' do
+ step 'I leave a comment like "XML attached"' do
within(".js-main-target-form") do
fill_in "note[note]", with: "XML attached"
click_button "Add Comment"
@@ -20,84 +20,84 @@ module SharedNote
end
end
- Given 'I preview a comment text like "Bug fixed :smile:"' do
+ step 'I preview a comment text like "Bug fixed :smile:"' do
within(".js-main-target-form") do
fill_in "note[note]", with: "Bug fixed :smile:"
find(".js-note-preview-button").trigger("click")
end
end
- Given 'I submit the comment' do
+ step 'I submit the comment' do
within(".js-main-target-form") do
click_button "Add Comment"
end
end
- Given 'I write a comment like "Nice"' do
+ step 'I write a comment like "Nice"' do
within(".js-main-target-form") do
fill_in "note[note]", with: "Nice"
end
end
- Then 'I should not see a comment saying "XML attached"' do
+ step 'I should not see a comment saying "XML attached"' do
page.should_not have_css(".note")
end
- Then 'I should not see the cancel comment button' do
+ step 'I should not see the cancel comment button' do
within(".js-main-target-form") do
should_not have_link("Cancel")
end
end
- Then 'I should not see the comment preview' do
+ step 'I should not see the comment preview' do
within(".js-main-target-form") do
page.should have_css(".js-note-preview", visible: false)
end
end
- Then 'I should not see the comment preview button' do
+ step 'I should not see the comment preview button' do
within(".js-main-target-form") do
page.should have_css(".js-note-preview-button", visible: false)
end
end
- Then 'I should not see the comment text field' do
+ step 'I should not see the comment text field' do
within(".js-main-target-form") do
page.should have_css(".js-note-text", visible: false)
end
end
- Then 'I should see a comment saying "XML attached"' do
+ step 'I should see a comment saying "XML attached"' do
within(".note") do
page.should have_content("XML attached")
end
end
- Then 'I should see an empty comment text field' do
+ step 'I should see an empty comment text field' do
within(".js-main-target-form") do
page.should have_field("note[note]", with: "")
end
end
- Then 'I should see the comment edit button' do
+ step 'I should see the comment edit button' do
within(".js-main-target-form") do
page.should have_css(".js-note-write-button", visible: true)
end
end
- Then 'I should see the comment preview' do
+ step 'I should see the comment preview' do
within(".js-main-target-form") do
page.should have_css(".js-note-preview", visible: true)
end
end
- Then 'I should see the comment preview button' do
+ step 'I should see the comment preview button' do
within(".js-main-target-form") do
page.should have_css(".js-note-preview-button", visible: true)
end
end
- Then 'I should see comment "XML attached"' do
+ step 'I should see comment "XML attached"' do
within(".note") do
page.should have_content("XML attached")
end