diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/graph.feature | 5 | ||||
-rw-r--r-- | features/project/source/browse_files.feature | 6 | ||||
-rw-r--r-- | features/steps/project/graph.rb | 9 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 27 |
4 files changed, 47 insertions, 0 deletions
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/source/browse_files.feature b/features/project/source/browse_files.feature index e545ea63ca8..37f99b37619 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -221,3 +221,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/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/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 05d1346d006..2792174cc93 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -305,6 +305,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 |