summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 16:20:47 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 16:20:47 +0300
commitbb2f4d665e946806d0bb94d3a50569ae6aa12e66 (patch)
treefbd06792dd73aa2ea2a617715f937d17a7066c92 /features
parent830eaa7f4e9026cc2d1088fd601d5a913fdbdbb6 (diff)
downloadgitlab-ce-bb2f4d665e946806d0bb94d3a50569ae6aa12e66.tar.gz
Fix browse code spinach tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature12
-rw-r--r--features/project/source/git_blame.feature2
-rw-r--r--features/project/source/multiselect_blob.feature2
-rw-r--r--features/project/source/search_code.feature6
-rw-r--r--features/steps/project/browse_files.rb25
-rw-r--r--features/steps/project/browse_git_repo.rb8
-rw-r--r--features/steps/project/multiselect_blob.rb4
-rw-r--r--features/steps/project/search_code.rb11
-rw-r--r--features/steps/shared/paths.rb8
9 files changed, 38 insertions, 40 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index 4af2cc83581..f8934da8de5 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -8,11 +8,11 @@ Feature: Project Browse files
Then I should see files from repository
Scenario: I browse files for specific ref
- Given I visit project source page for "8470d70"
- Then I should see files from repository for "8470d70"
+ Given I visit project source page for "6d39438"
+ Then I should see files from repository for "6d39438"
Scenario: I browse file content
- Given I click on "Gemfile.lock" file in repo
+ Given I click on ".gitignore" file in repo
Then I should see it content
Scenario: I browse raw file
@@ -26,20 +26,20 @@ Feature: Project Browse files
@javascript
Scenario: I can edit file
- Given I click on "Gemfile.lock" file in repo
+ Given I click on ".gitignore" file in repo
And I click button "edit"
Then I can edit code
@javascript
Scenario: I can see editing preview
- Given I click on "Gemfile.lock" file in repo
+ Given I click on ".gitignore" file in repo
And I click button "edit"
And I edit code
And I click link "Diff"
Then I see diff
Scenario: I can browse directory with Browse Dir
- Given I click on app directory
+ Given I click on files directory
And I click on history link
Then I see Browse dir link
diff --git a/features/project/source/git_blame.feature b/features/project/source/git_blame.feature
index 3b20437a875..ae62c166c12 100644
--- a/features/project/source/git_blame.feature
+++ b/features/project/source/git_blame.feature
@@ -5,6 +5,6 @@ Feature: Project Browse git repo
Given I visit project source page
Scenario: I blame file
- Given I click on "Gemfile.lock" file in repo
+ Given I click on ".gitignore" file in repo
And I click blame button
Then I should see git file blame
diff --git a/features/project/source/multiselect_blob.feature b/features/project/source/multiselect_blob.feature
index 0fdfe7ce938..f60b646a8d9 100644
--- a/features/project/source/multiselect_blob.feature
+++ b/features/project/source/multiselect_blob.feature
@@ -2,7 +2,7 @@ Feature: Project Multiselect Blob
Background:
Given I sign in as a user
And I own project "Shop"
- And I visit "Gemfile.lock" file in repo
+ And I visit ".gitignore" file in repo
@javascript
Scenario: I click line 1 in file
diff --git a/features/project/source/search_code.feature b/features/project/source/search_code.feature
index 13f15cc922f..ad8a650d895 100644
--- a/features/project/source/search_code.feature
+++ b/features/project/source/search_code.feature
@@ -4,6 +4,6 @@ Feature: Project Search code
And I own project "Shop"
Given I visit project source page
- Scenario: Search for term "Welcome to GitLab"
- When I search for term "Welcome to GitLab"
- Then I should see files from repository containing "Welcome to GitLab"
+ Scenario: Search for term "coffee"
+ When I search for term "coffee"
+ Then I should see files from repository containing "coffee"
diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb
index 7134050da69..1e54e00f37a 100644
--- a/features/steps/project/browse_files.rb
+++ b/features/steps/project/browse_files.rb
@@ -4,24 +4,23 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
include SharedPaths
step 'I should see files from repository' do
- page.should have_content "app"
- page.should have_content "history"
- page.should have_content "Gemfile"
+ page.should have_content "VERSION"
+ page.should have_content ".gitignore"
+ page.should have_content "LICENSE"
end
- step 'I should see files from repository for "8470d70"' do
- current_path.should == project_tree_path(@project, "8470d70")
- page.should have_content "app"
- page.should have_content "history"
- page.should have_content "Gemfile"
+ step 'I should see files from repository for "6d39438"' do
+ current_path.should == project_tree_path(@project, "6d39438")
+ page.should have_content ".gitignore"
+ page.should have_content "LICENSE"
end
- step 'I click on "Gemfile.lock" file in repo' do
- click_link "Gemfile.lock"
+ step 'I click on ".gitignore" file in repo' do
+ click_link ".gitignore"
end
step 'I should see it content' do
- page.should have_content "DEPENDENCIES"
+ page.should have_content "*.rbc"
end
step 'I click link "raw"' do
@@ -63,8 +62,8 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.should have_content "Commit message"
end
- step 'I click on app directory' do
- click_link 'app'
+ step 'I click on files directory' do
+ click_link 'files'
end
step 'I click on history link' do
diff --git a/features/steps/project/browse_git_repo.rb b/features/steps/project/browse_git_repo.rb
index cd9a60f49cb..2c3017dd4e2 100644
--- a/features/steps/project/browse_git_repo.rb
+++ b/features/steps/project/browse_git_repo.rb
@@ -3,8 +3,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
include SharedProject
include SharedPaths
- Given 'I click on "Gemfile.lock" file in repo' do
- click_link "Gemfile.lock"
+ Given 'I click on ".gitignore" file in repo' do
+ click_link ".gitignore"
end
And 'I click blame button' do
@@ -12,8 +12,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
end
Then 'I should see git file blame' do
- page.should have_content "DEPENDENCIES"
+ page.should have_content "*.rb"
page.should have_content "Dmitriy Zaporozhets"
- page.should have_content "Moving to rails 3.2"
+ page.should have_content "Initial commit"
end
end
diff --git a/features/steps/project/multiselect_blob.rb b/features/steps/project/multiselect_blob.rb
index 28df7bc9312..d4dc1186970 100644
--- a/features/steps/project/multiselect_blob.rb
+++ b/features/steps/project/multiselect_blob.rb
@@ -52,7 +52,7 @@ class ProjectMultiselectBlob < Spinach::FeatureSteps
page.evaluate_script("window.history.forward()")
end
- step 'I click on "Gemfile.lock" file in repo' do
- click_link "Gemfile.lock"
+ step 'I click on ".gitignore" file in repo' do
+ click_link ".gitignore"
end
end
diff --git a/features/steps/project/search_code.rb b/features/steps/project/search_code.rb
index d117b019a15..8d130a8ed0d 100644
--- a/features/steps/project/search_code.rb
+++ b/features/steps/project/search_code.rb
@@ -3,15 +3,14 @@ class ProjectSearchCode < Spinach::FeatureSteps
include SharedProject
include SharedPaths
- When 'I search for term "Welcome to GitLab"' do
- fill_in "search", with: "Welcome to GitLab"
+ When 'I search for term "coffee"' do
+ fill_in "search", with: "coffee"
click_button "Go"
click_link 'Repository Code'
end
- Then 'I should see files from repository containing "Welcome to GitLab"' do
- page.should have_content "Welcome to GitLab"
- page.should have_content "GitLab is a free project and repository management application"
+ Then 'I should see files from repository containing "coffee"' do
+ page.should have_content "coffee"
+ page.should have_content " CONTRIBUTING.md"
end
-
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 21cc8da6d7c..6acf877c256 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -260,12 +260,12 @@ module SharedPaths
visit project_blob_path(@project, File.join(ValidCommit::ID, ValidCommit::BLOB_FILE_PATH))
end
- step 'I visit "Gemfile.lock" file in repo' do
- visit project_blob_path(@project, File.join(root_ref, 'Gemfile.lock'))
+ step 'I visit ".gitignore" file in repo' do
+ visit project_blob_path(@project, File.join(root_ref, '.gitignore'))
end
- step 'I visit project source page for "8470d70"' do
- visit project_tree_path(@project, "8470d70")
+ step 'I visit project source page for "6d39438"' do
+ visit project_tree_path(@project, "6d39438")
end
step 'I visit project tags page' do