summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/gitlab_flavored_markdown_spec.rb24
-rw-r--r--spec/features/snippets_spec.rb2
-rw-r--r--spec/features/users_spec.rb19
3 files changed, 36 insertions, 9 deletions
diff --git a/spec/features/gitlab_flavored_markdown_spec.rb b/spec/features/gitlab_flavored_markdown_spec.rb
index 9a568511fa0..769fcd688b4 100644
--- a/spec/features/gitlab_flavored_markdown_spec.rb
+++ b/spec/features/gitlab_flavored_markdown_spec.rb
@@ -169,32 +169,40 @@ describe "Gitlab Flavored Markdown" do
describe "for notes" do
it "should render in commits#show", js: true do
visit project_commit_path(project, commit)
- fill_in "note_note", with: "see ##{issue.id}"
- click_button "Add Comment"
+ within ".new_note.js-main-target-form" do
+ fill_in "note_note", with: "see ##{issue.id}"
+ click_button "Add Comment"
+ end
page.should have_link("##{issue.id}")
end
it "should render in issue#show", js: true do
visit project_issue_path(project, issue)
- fill_in "note_note", with: "see ##{issue.id}"
- click_button "Add Comment"
+ within ".new_note.js-main-target-form" do
+ fill_in "note_note", with: "see ##{issue.id}"
+ click_button "Add Comment"
+ end
page.should have_link("##{issue.id}")
end
it "should render in merge_request#show", js: true do
visit project_merge_request_path(project, merge_request)
- fill_in "note_note", with: "see ##{issue.id}"
- click_button "Add Comment"
+ within ".new_note.js-main-target-form" do
+ fill_in "note_note", with: "see ##{issue.id}"
+ click_button "Add Comment"
+ end
page.should have_link("##{issue.id}")
end
it "should render in projects#wall", js: true do
visit wall_project_path(project)
- fill_in "note_note", with: "see ##{issue.id}"
- click_button "Add Comment"
+ within ".new_note.js-main-target-form" do
+ fill_in "note_note", with: "see ##{issue.id}"
+ click_button "Add Comment"
+ end
page.should have_link("##{issue.id}")
end
diff --git a/spec/features/snippets_spec.rb b/spec/features/snippets_spec.rb
index 770e34dc07c..1a0f6eaeef4 100644
--- a/spec/features/snippets_spec.rb
+++ b/spec/features/snippets_spec.rb
@@ -72,7 +72,7 @@ describe "Snippets" do
author: @user,
project: project)
visit project_snippet_path(project, @snippet)
- click_link "Edit"
+ click_link "Edit Snippet"
end
it "should open edit page" do
diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb
new file mode 100644
index 00000000000..ed9e44fb47e
--- /dev/null
+++ b/spec/features/users_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe 'Users' do
+ describe "GET /users/sign_up" do
+ before do
+ Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
+ end
+
+ it "should create a new user account" do
+ visit new_user_registration_path
+ fill_in "user_name", with: "Name Surname"
+ fill_in "user_username", with: "Great"
+ fill_in "user_email", with: "name@mail.com"
+ fill_in "user_password", with: "password1234"
+ fill_in "user_password_confirmation", with: "password1234"
+ expect { click_button "Sign up" }.to change {User.count}.by(1)
+ end
+ end
+end