debian-mirror-gitlab/features/steps/shared/note.rb

26 lines
610 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
module SharedNote
include Spinach::DSL
2017-09-10 17:25:29 +05:30
include WaitForRequests
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
after do
2017-09-10 17:25:29 +05:30
wait_for_requests if javascript_test?
2017-08-17 22:00:37 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I haven\'t written any comment text' do
2015-09-11 14:41:01 +05:30
page.within(".js-main-target-form") do
2014-09-02 18:07:02 +05:30
fill_in "note[note]", with: ""
end
end
2015-04-26 12:48:37 +05:30
step 'The comment preview tab should say there is nothing to do' do
2015-09-11 14:41:01 +05:30
page.within(".js-main-target-form") do
2015-04-26 12:48:37 +05:30
find('.js-md-preview-button').click
expect(find('.js-md-preview')).to have_content('Nothing to preview.')
2014-09-02 18:07:02 +05:30
end
end
step 'I should see no notes at all' do
expect(page).not_to have_css('.note')
end
2014-09-02 18:07:02 +05:30
end