summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-12-24 13:38:17 +0200
committerValery Sizov <vsv2711@gmail.com>2015-12-24 13:38:17 +0200
commit999a374f778909b3681190dcf0936ba9bb989413 (patch)
tree03a14e9bc34eb856a66c3a641ac1383d21a6f396 /features
parentd794ae8e1f6351282707d45df97ac0ec2a41eeb6 (diff)
parente557c8d0a2c1b05148a9d73a8a658962a3ef6147 (diff)
downloadgitlab-ce-999a374f778909b3681190dcf0936ba9bb989413.tar.gz
Merge branch 'emoji-picker-search'into emoji_picker_frequently_usedemoji_picker_frequently_used
Diffstat (limited to 'features')
-rw-r--r--features/project/issues/award_emoji.feature10
-rw-r--r--features/project/issues/issues.feature6
-rw-r--r--features/project/service.feature6
-rw-r--r--features/steps/explore/groups.rb8
-rw-r--r--features/steps/explore/projects.rb12
-rw-r--r--features/steps/groups.rb2
-rw-r--r--features/steps/profile/profile.rb2
-rw-r--r--features/steps/project/forked_merge_requests.rb3
-rw-r--r--features/steps/project/issues/award_emoji.rb12
-rw-r--r--features/steps/project/issues/issues.rb10
-rw-r--r--features/steps/project/merge_requests.rb4
-rw-r--r--features/steps/project/project.rb2
-rw-r--r--features/steps/project/services.rb18
-rw-r--r--features/steps/project/snippets.rb2
-rw-r--r--features/steps/project/source/browse_files.rb12
-rw-r--r--features/steps/shared/diff_note.rb2
-rw-r--r--features/steps/shared/paths.rb8
-rw-r--r--features/steps/snippets/snippets.rb2
-rw-r--r--features/support/capybara.rb2
19 files changed, 91 insertions, 32 deletions
diff --git a/features/project/issues/award_emoji.feature b/features/project/issues/award_emoji.feature
index cbf2e7104ab..9a06fdc2ee6 100644
--- a/features/project/issues/award_emoji.feature
+++ b/features/project/issues/award_emoji.feature
@@ -19,6 +19,12 @@ Feature: Award Emoji
Then I can see the activity and food categories
@javascript
+ Scenario: I can search emoji
+ Given I click to emoji-picker
+ And I search "hand"
+ Then I see search result for "hand"
+
+ @javascript
Scenario: I add award emoji using regular comment
- Given I leave comment with a single emoji
- Then I have award added
+ Given I leave comment with a single emoji
+ Then I have award added
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index f08b30e0b88..ab234bc7507 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -197,3 +197,9 @@ Feature: Project Issues
And I should not see labels field
And I submit new issue "500 error on profile"
Then I should see issue "500 error on profile"
+
+ @javascript
+ Scenario: Another user adds a comment to issue I'm currently viewing
+ Given I visit issue page "Release 0.4"
+ And another user adds a comment with text "Yay!" to issue "Release 0.4"
+ Then I should see a new comment with text "Yay!"
diff --git a/features/project/service.feature b/features/project/service.feature
index ff3e7a0b38e..3a7b8308524 100644
--- a/features/project/service.feature
+++ b/features/project/service.feature
@@ -55,6 +55,12 @@ Feature: Project Services
And I fill email on push settings
Then I should see email on push service settings saved
+ Scenario: Activate JIRA service
+ When I visit project "Shop" services page
+ And I click jira service link
+ And I fill jira settings
+ Then I should see jira service settings saved
+
Scenario: Activate Irker (IRC Gateway) service
When I visit project "Shop" services page
And I click Irker service link
diff --git a/features/steps/explore/groups.rb b/features/steps/explore/groups.rb
index 87cd33c37eb..87f32e70d59 100644
--- a/features/steps/explore/groups.rb
+++ b/features/steps/explore/groups.rb
@@ -75,18 +75,18 @@ class Spinach::Features::ExploreGroups < Spinach::FeatureSteps
name: projectname,
path: "#{groupname}-#{projectname}",
visibility_level: visibility_level
- )
+ )
create(:issue,
title: "#{projectname} feature",
project: project
- )
+ )
create(:merge_request,
title: "#{projectname} feature implemented",
source_project: project,
target_project: project
- )
+ )
create(:closed_issue_event,
project: project
- )
+ )
end
end
diff --git a/features/steps/explore/projects.rb b/features/steps/explore/projects.rb
index f819dec2192..742ba5d71f6 100644
--- a/features/steps/explore/projects.rb
+++ b/features/steps/explore/projects.rb
@@ -61,11 +61,11 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
create(:issue,
title: "Bug",
project: public_project
- )
+ )
create(:issue,
title: "New feature",
project: public_project
- )
+ )
visit namespace_project_issues_path(public_project.namespace, public_project)
end
@@ -80,11 +80,11 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
create(:issue,
title: "Internal Bug",
project: internal_project
- )
+ )
create(:issue,
title: "New internal feature",
project: internal_project
- )
+ )
visit namespace_project_issues_path(internal_project.namespace, internal_project)
end
@@ -104,7 +104,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
title: "Bug fix for public project",
source_project: public_project,
target_project: public_project,
- )
+ )
end
step 'I should see list of merge requests for "Community" project' do
@@ -121,7 +121,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
title: "Feature implemented",
source_project: internal_project,
target_project: internal_project
- )
+ )
end
step 'I should see list of merge requests for "Internal" project' do
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index f5e3fee61c0..4c5122d1b7d 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -85,7 +85,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step 'I should see new group "Owned" avatar' do
expect(owned_group.avatar).to be_instance_of AvatarUploader
- expect(owned_group.avatar.url).to eq "/uploads/group/avatar/#{ Group.find_by(name:"Owned").id }/banana_sample.gif"
+ expect(owned_group.avatar.url).to eq "/uploads/group/avatar/#{Group.find_by(name:"Owned").id}/banana_sample.gif"
end
step 'I should see the "Remove avatar" button' do
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index 40b2aa7c357..0305f7e6da0 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -34,7 +34,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step 'I should see new avatar' do
expect(@user.avatar).to be_instance_of AvatarUploader
- expect(@user.avatar.url).to eq "/uploads/user/avatar/#{ @user.id }/banana_sample.gif"
+ expect(@user.avatar.url).to eq "/uploads/user/avatar/#{@user.id}/banana_sample.gif"
end
step 'I should see the "Remove avatar" button' do
diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb
index d3675060994..cbdce78dc0c 100644
--- a/features/steps/project/forked_merge_requests.rb
+++ b/features/steps/project/forked_merge_requests.rb
@@ -41,7 +41,8 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
click_button "Compare branches and continue"
- expect(page).to have_content "New Merge Request"
+ expect(page).to have_css("h3.page-title", text: "New Merge Request")
+
fill_in "merge_request_title", with: "Merge Request On Forked Project"
end
diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb
index c94d0ba7306..a7e15398819 100644
--- a/features/steps/project/issues/award_emoji.rb
+++ b/features/steps/project/issues/award_emoji.rb
@@ -52,4 +52,16 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
click_button 'Add Comment'
end
end
+
+ step 'I search "hand"' do
+ page.within('.emoji-menu-content') do
+ fill_in 'emoji_search', with: 'hand'
+ end
+ end
+
+ step 'I see search result for "hand"' do
+ page.within '.emoji-menu-content' do
+ expect(page).to have_selector '[data-emoji="raised_hand"]'
+ end
+ end
end
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index a13044c3ae1..4a7ff21d385 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -284,6 +284,16 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
+ step 'another user adds a comment with text "Yay!" to issue "Release 0.4"' do
+ issue = Issue.find_by!(title: 'Release 0.4')
+ create(:note_on_issue, noteable: issue, note: 'Yay!')
+ end
+
+ step 'I should see a new comment with text "Yay!"' do
+ page.within '#notes' do
+ expect(page).to have_content('Yay!')
+ end
+ end
def filter_issue(text)
fill_in 'issue_search', with: text
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 0d340d97ff9..be993d11093 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -273,7 +273,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see merged request' do
- page.within '.issue-box' do
+ page.within '.status-box' do
expect(page).to have_content "Merged"
end
end
@@ -283,7 +283,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see reopened merge request "Bug NS-04"' do
- page.within '.issue-box' do
+ page.within '.status-box' do
expect(page).to have_content "Open"
end
end
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 9ca7c8ebbc7..37bf52b4a95 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -37,7 +37,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
step 'I should see new project avatar' do
expect(@project.avatar).to be_instance_of AvatarUploader
url = @project.avatar.url
- expect(url).to eq "/uploads/project/avatar/#{ @project.id }/banana_sample.gif"
+ expect(url).to eq "/uploads/project/avatar/#{@project.id}/banana_sample.gif"
end
step 'I should see the "Remove avatar" button' do
diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb
index ed3957ca873..536199ddb4f 100644
--- a/features/steps/project/services.rb
+++ b/features/steps/project/services.rb
@@ -173,6 +173,24 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
expect(find_field('Sound').find('option[selected]').value).to eq 'bike'
end
+ step 'I click jira service link' do
+ click_link 'JIRA'
+ end
+
+ step 'I fill jira settings' do
+ fill_in 'Project url', with: 'http://jira.example'
+ fill_in 'Username', with: 'gitlab'
+ fill_in 'Password', with: 'gitlab'
+ fill_in 'Api url', with: 'http://jira.example/rest/api/2'
+ click_button 'Save'
+ end
+
+ step 'I should see jira service settings saved' do
+ expect(find_field('Project url').value).to eq 'http://jira.example'
+ expect(find_field('Username').value).to eq 'gitlab'
+ expect(find_field('Api url').value).to eq 'http://jira.example/rest/api/2'
+ end
+
step 'I click Atlassian Bamboo CI service link' do
click_link 'Atlassian Bamboo CI'
end
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index a3aef9bf8c3..504654f90dd 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -42,7 +42,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I click link "Edit"' do
- page.within ".page-title" do
+ page.within ".detail-page-header" do
click_link "Edit"
end
end
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index b88709620ab..0c6df18ce2e 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -238,13 +238,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I am redirected to the new file' do
- expect(current_path).to eq(namespace_project_blob_path(
- @project.namespace, @project, 'master/' + new_file_name))
+ expect(current_path).to eq(
+ namespace_project_blob_path(@project.namespace, @project, 'master/' + new_file_name))
end
step 'I am redirected to the new file with directory' do
- expect(current_path).to eq(namespace_project_blob_path(
- @project.namespace, @project, 'master/' + new_file_name_with_directory))
+ expect(current_path).to eq(
+ namespace_project_blob_path(@project.namespace, @project, 'master/' + new_file_name_with_directory))
end
step 'I am redirected to the new merge request page' do
@@ -252,8 +252,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I am redirected to the root directory' do
- expect(current_path).to eq(namespace_project_tree_path(
- @project.namespace, @project, 'master/'))
+ expect(current_path).to eq(
+ namespace_project_tree_path(@project.namespace, @project, 'master/'))
end
step "I don't see the permalink link" do
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index dd466cde28d..c6a0ae2ba38 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -166,7 +166,7 @@ module SharedDiffNote
end
step 'I should see add a diff comment button' do
- expect(page).to have_css('.js-add-diff-note-button', visible: true)
+ expect(page).to have_css('.js-add-diff-note-button')
end
step 'I should see an empty diff comment form' do
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index c74a5fd3bc7..b33bd332655 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -212,8 +212,8 @@ module SharedPaths
end
step 'I visit a binary file in the repo' do
- visit namespace_project_blob_path(@project.namespace, @project, File.join(
- root_ref, 'files/images/logo-black.png'))
+ visit namespace_project_blob_path(@project.namespace, @project,
+ File.join(root_ref, 'files/images/logo-black.png'))
end
step "I visit my project's commits page" do
@@ -316,8 +316,8 @@ module SharedPaths
end
step 'I am on the ".gitignore" edit file page' do
- expect(current_path).to eq(namespace_project_edit_blob_path(
- @project.namespace, @project, File.join(root_ref, '.gitignore')))
+ expect(current_path).to eq(
+ namespace_project_edit_blob_path(@project.namespace, @project, File.join(root_ref, '.gitignore')))
end
step 'I visit project source page for "6d39438"' do
diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb
index 80d1ddeef05..023032e679f 100644
--- a/features/steps/snippets/snippets.rb
+++ b/features/steps/snippets/snippets.rb
@@ -13,7 +13,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps
end
step 'I click link "Edit"' do
- page.within ".page-title" do
+ page.within ".detail-page-header" do
click_link "Edit"
end
end
diff --git a/features/support/capybara.rb b/features/support/capybara.rb
index 31dbf0feb2f..4156c7ec484 100644
--- a/features/support/capybara.rb
+++ b/features/support/capybara.rb
@@ -2,7 +2,7 @@ require 'spinach/capybara'
require 'capybara/poltergeist'
# Give CI some extra time
-timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10
+timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|