Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEirik Lygre <eirik.lygre@gmail.com>2015-12-09 17:07:10 +0300
committerEirik Lygre <eirik.lygre@gmail.com>2015-12-09 17:07:10 +0300
commitbb79573c01ad77d6b52245d3af262bc56f79693f (patch)
tree1bd51c1c8adc50462f22591d6ab5af8315cf9eb6 /features
parent94dc9ef9e1a85b8a4506358479a549dc3a1306b6 (diff)
parent9bfd6c44e23754b6f699586f6a0cec2879e107e0 (diff)
Merge branch 'master' into default_clone_protocol_based_on_user_keys
Diffstat (limited to 'features')
-rw-r--r--features/project/commits/diff_comments.feature6
-rw-r--r--features/project/graph.feature5
-rw-r--r--features/project/issues/award_emoji.feature6
-rw-r--r--features/project/merge_requests/accept.feature6
-rw-r--r--features/project/source/browse_files.feature12
-rw-r--r--features/steps/admin/labels.rb2
-rw-r--r--features/steps/project/commits/commits.rb2
-rw-r--r--features/steps/project/graph.rb9
-rw-r--r--features/steps/project/hooks.rb4
-rw-r--r--features/steps/project/issues/award_emoji.rb31
-rw-r--r--features/steps/project/issues/labels.rb2
-rw-r--r--features/steps/project/merge_requests/acceptance.rb4
-rw-r--r--features/steps/project/source/browse_files.rb31
-rw-r--r--features/steps/shared/diff_note.rb17
14 files changed, 106 insertions, 31 deletions
diff --git a/features/project/commits/diff_comments.feature b/features/project/commits/diff_comments.feature
index 4a2b870e082..d6e0c84537e 100644
--- a/features/project/commits/diff_comments.feature
+++ b/features/project/commits/diff_comments.feature
@@ -14,6 +14,12 @@ Feature: Project Commits Diff Comments
Then I should see a diff comment saying "Typo, please fix"
@javascript
+ Scenario: I can add a diff comment with a single emoji
+ Given I open a diff comment form
+ And I write a diff comment like ":smile:"
+ Then I should see a diff comment with an emoji image
+
+ @javascript
Scenario: I get a temporary form for the first comment on a diff line
Given I open a diff comment form
Then I should see a temporary diff comment form
diff --git a/features/project/graph.feature b/features/project/graph.feature
index 2acd65aea5f..63793d6f989 100644
--- a/features/project/graph.feature
+++ b/features/project/graph.feature
@@ -18,3 +18,8 @@ Feature: Project Graph
Given project "Shop" has CI enabled
When I visit project "Shop" CI graph page
Then page should have CI graphs
+
+ @javascript
+ Scenario: I should see project languages graphs
+ When I visit project "Shop" languages graph page
+ Then page should have languages graphs
diff --git a/features/project/issues/award_emoji.feature b/features/project/issues/award_emoji.feature
index a9bc8ffb9bb..2609f129d07 100644
--- a/features/project/issues/award_emoji.feature
+++ b/features/project/issues/award_emoji.feature
@@ -11,4 +11,8 @@ Feature: Award Emoji
And I click to emoji in the picker
Then I have award added
And I can remove it by clicking to icon
- \ No newline at end of file
+
+ @javascript
+ Scenario: I add award emoji using regular comment
+ Given I leave comment with a single emoji
+ Then I have award added
diff --git a/features/project/merge_requests/accept.feature b/features/project/merge_requests/accept.feature
index 3e6e59a3808..9bc2b7c8eca 100644
--- a/features/project/merge_requests/accept.feature
+++ b/features/project/merge_requests/accept.feature
@@ -8,10 +8,12 @@ Feature: Project Merge Requests Acceptance
Given I am on the Merge Request detail page
When I click on "Remove source branch" option
And I click on Accept Merge Request
- Then I should not see the Remove Source Branch button
+ Then I should see merge request merged
+ And I should not see the Remove Source Branch button
@javascript
Scenario: Accepting the Merge Request without removing the source branch
Given I am on the Merge Request detail page
When I click on Accept Merge Request
- Then I should see the Remove Source Branch button
+ Then I should see merge request merged
+ And I should see the Remove Source Branch button
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index e545ea63ca8..439787f2641 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -110,12 +110,6 @@ Feature: Project Source Browse Files
Given I visit a binary file in the repo
Then I cannot see the edit button
- Scenario: If I don't have edit permission the edit link is disabled
- Given public project "Community"
- And I visit project "Community" source page
- And I click on ".gitignore" file in repo
- Then The edit button is disabled
-
@javascript
Scenario: I can edit and commit file
Given I click on ".gitignore" file in repo
@@ -221,3 +215,9 @@ Feature: Project Source Browse Files
Given I switch ref to fix
And I visit the fix tree
Then I see the commit data for a directory with a leading dot
+
+ Scenario: I browse LFS object
+ Given I click on "files/lfs/lfs_object.iso" file in repo
+ Then I should see download link and object size
+ And I should not see lfs pointer details
+ And I should see buttons for allowed commands
diff --git a/features/steps/admin/labels.rb b/features/steps/admin/labels.rb
index 2ea5dffdc66..55ddcc25085 100644
--- a/features/steps/admin/labels.rb
+++ b/features/steps/admin/labels.rb
@@ -71,7 +71,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I should see label color error message' do
page.within '.label-form' do
- expect(page).to have_content 'Color is invalid'
+ expect(page).to have_content 'Color must be a valid color code'
end
end
diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb
index e5b3f27135d..0d6a9a8fc66 100644
--- a/features/steps/project/commits/commits.rb
+++ b/features/steps/project/commits/commits.rb
@@ -118,6 +118,6 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
step 'I see builds list' do
expect(page).to have_content "build: pending"
- expect(page).to have_content "Latest builds"
+ expect(page).to have_content "1 build"
end
end
diff --git a/features/steps/project/graph.rb b/features/steps/project/graph.rb
index 98f31f3b76a..b09ec86e5df 100644
--- a/features/steps/project/graph.rb
+++ b/features/steps/project/graph.rb
@@ -14,6 +14,15 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
visit commits_namespace_project_graph_path(project.namespace, project, "master")
end
+ step 'I visit project "Shop" languages graph page' do
+ visit languages_namespace_project_graph_path(project.namespace, project, "master")
+ end
+
+ step 'page should have languages graphs' do
+ expect(page).to have_content "Ruby 66.63 %"
+ expect(page).to have_content "JavaScript 22.96 %"
+ end
+
step 'page should have commits graphs' do
expect(page).to have_content "Commit statistics for master"
expect(page).to have_content "Commits per day of month"
diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb
index df4a23a3716..be4db770948 100644
--- a/features/steps/project/hooks.rb
+++ b/features/steps/project/hooks.rb
@@ -70,8 +70,6 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
step 'I should see hook service down error message' do
expect(page).to have_selector '.flash-alert',
- text: 'Hook execution failed. '\
- 'Ensure hook URL is correct and '\
- 'service is up.'
+ text: 'Hook execution failed: Exception from'
end
end
diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb
index 8f7a45dec0e..325eaf2ea6a 100644
--- a/features/steps/project/issues/award_emoji.rb
+++ b/features/steps/project/issues/award_emoji.rb
@@ -9,33 +9,40 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
end
step 'I click to emoji-picker' do
- page.within ".awards-controls" do
- page.find(".add-award").click
+ page.within '.awards-controls' do
+ page.find('.add-award').click
end
end
step 'I click to emoji in the picker' do
- page.within ".awards-menu" do
- page.first("img").click
+ page.within '.awards-menu' do
+ page.first('img').click
end
end
step 'I can remove it by clicking to icon' do
- page.within ".awards" do
- page.first(".award").click
- expect(page).to_not have_selector ".award"
+ page.within '.awards' do
+ page.first('.award').click
+ expect(page).to_not have_selector '.award'
end
end
step 'I have award added' do
- page.within ".awards" do
- expect(page).to have_selector ".award"
- expect(page.find(".award .counter")).to have_content "1"
+ page.within '.awards' do
+ expect(page).to have_selector '.award'
+ expect(page.find('.award .counter')).to have_content '1'
end
end
step 'project "Shop" has issue "Bugfix"' do
- @project = Project.find_by(name: "Shop")
- @issue = create(:issue, title: "Bugfix", project: project)
+ @project = Project.find_by(name: 'Shop')
+ @issue = create(:issue, title: 'Bugfix', project: project)
+ end
+
+ step 'I leave comment with a single emoji' do
+ page.within('.js-main-target-form') do
+ fill_in 'note[note]', with: ':smile:'
+ click_button 'Add Comment'
+ end
end
end
diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb
index e273bb391b3..2ab8956867b 100644
--- a/features/steps/project/issues/labels.rb
+++ b/features/steps/project/issues/labels.rb
@@ -55,7 +55,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I should see label color error message' do
page.within '.label-form' do
- expect(page).to have_content 'Color is invalid'
+ expect(page).to have_content 'Color must be a valid color code'
end
end
diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb
index 6adecaa8385..383c055c4ef 100644
--- a/features/steps/project/merge_requests/acceptance.rb
+++ b/features/steps/project/merge_requests/acceptance.rb
@@ -32,4 +32,8 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
step 'I am signed in as a developer of the project' do
login_as(@user)
end
+
+ step 'I should see merge request merged' do
+ expect(page).to have_content('The changes were merged into')
+ end
end
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 05d1346d006..f2b95764267 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -53,10 +53,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(page).not_to have_link 'edit'
end
- step 'The edit button is disabled' do
- expect(page).to have_css '.disabled', text: 'Edit'
- end
-
step 'I can edit code' do
set_new_content
expect(evaluate_script('blob.editor.getValue()')).to eq new_gitignore_content
@@ -305,6 +301,33 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(page).not_to have_content('Loading commit data...')
end
+ step 'I click on "files/lfs/lfs_object.iso" file in repo' do
+ visit namespace_project_tree_path(@project.namespace, @project, "lfs")
+ click_link 'files'
+ click_link "lfs"
+ click_link "lfs_object.iso"
+ end
+
+ step 'I should see download link and object size' do
+ expect(page).to have_content 'Download (1.5 MB)'
+ end
+
+ step 'I should not see lfs pointer details' do
+ expect(page).not_to have_content 'version https://git-lfs.github.com/spec/v1'
+ expect(page).not_to have_content 'oid sha256:91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897'
+ expect(page).not_to have_content 'size 1575078'
+ end
+
+ step 'I should see buttons for allowed commands' do
+ expect(page).to have_content 'Raw'
+ expect(page).to have_content 'History'
+ expect(page).to have_content 'Permalink'
+ expect(page).not_to have_content 'Edit'
+ expect(page).not_to have_content 'Blame'
+ expect(page).not_to have_content 'Delete'
+ expect(page).not_to have_content 'Replace'
+ end
+
private
def set_new_content
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 72621911a37..dd466cde28d 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -87,6 +87,17 @@ module SharedDiffNote
end
end
+ step 'I write a diff comment like ":smile:"' do
+ page.within(diff_file_selector) do
+ click_diff_line(sample_commit.line_code)
+
+ page.within("form[rel$='#{sample_commit.line_code}']") do
+ fill_in 'note[note]', with: ':smile:'
+ click_button('Add Comment')
+ end
+ end
+ end
+
step 'I submit the diff comment' do
page.within(diff_file_selector) do
click_button("Add Comment")
@@ -197,6 +208,12 @@ module SharedDiffNote
end
end
+ step 'I should see a diff comment with an emoji image' do
+ page.within("#{diff_file_selector} .note") do
+ expect(page).to have_xpath("//img[@alt=':smile:']")
+ end
+ end
+
step 'I click side-by-side diff button' do
find('#parallel-diff-btn').trigger('click')
end