diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2018-04-24 09:20:11 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-24 09:20:11 +0000 |
commit | 8ad7cb7788b964a7c9e4ca11c4308e0bbc1d4bbc (patch) | |
tree | f1fc234e2ee3054268da0ec3880b4b31876c7376 /features | |
parent | a544f6ec58ba5f9cfbff6b59b50bc92bc2274bdb (diff) | |
download | gitlab-ce-8ad7cb7788b964a7c9e4ca11c4308e0bbc1d4bbc.tar.gz |
Replace find file project spinach tests with RSpec
Diffstat (limited to 'features')
-rw-r--r-- | features/project/find_file.feature | 42 | ||||
-rw-r--r-- | features/steps/project/project_find_file.rb | 72 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 4 |
3 files changed, 0 insertions, 118 deletions
diff --git a/features/project/find_file.feature b/features/project/find_file.feature deleted file mode 100644 index ae8fa245923..00000000000 --- a/features/project/find_file.feature +++ /dev/null @@ -1,42 +0,0 @@ -@dashboard -Feature: Project Find File - Background: - Given I sign in as a user - And I own a project - And I visit my project's files page - - @javascript - Scenario: Navigate to find file by shortcut - Given I press "t" - Then I should see "find file" page - - Scenario: Navigate to find file - Given I click Find File button - Then I should see "find file" page - - @javascript - Scenario: I search file - Given I visit project find file page - And I fill in file find with "change" - Then I should not see ".gitignore" in files - And I should not see ".gitmodules" in files - And I should see "CHANGELOG" in files - And I should not see "VERSION" in files - - @javascript - Scenario: I search file that not exist - Given I visit project find file page - And I fill in file find with "asdfghjklqwertyuizxcvbnm" - Then I should not see ".gitignore" in files - And I should not see ".gitmodules" in files - And I should not see "CHANGELOG" in files - And I should not see "VERSION" in files - - @javascript - Scenario: I search file that partially matches - Given I visit project find file page - And I fill in file find with "git" - Then I should see ".gitignore" in files - And I should see ".gitmodules" in files - And I should not see "CHANGELOG" in files - And I should not see "VERSION" in files diff --git a/features/steps/project/project_find_file.rb b/features/steps/project/project_find_file.rb deleted file mode 100644 index 461160b8430..00000000000 --- a/features/steps/project/project_find_file.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedProject - include SharedProjectTab - - step 'I press "t"' do - find('body').native.send_key('t') - end - - step 'I click Find File button' do - click_link 'Find file' - end - - step 'I should see "find file" page' do - ensure_active_main_tab('Repository') - expect(page).to have_selector('.file-finder-holder', count: 1) - end - - step 'I fill in Find by path with "git"' do - ensure_active_main_tab('Repository') - expect(page).to have_selector('.file-finder-holder', count: 1) - end - - step 'I fill in file find with "git"' do - find_file "git" - end - - step 'I fill in file find with "change"' do - find_file "change" - end - - step 'I fill in file find with "asdfghjklqwertyuizxcvbnm"' do - find_file "asdfghjklqwertyuizxcvbnm" - end - - step 'I should see "VERSION" in files' do - expect(page).to have_content("VERSION") - end - - step 'I should not see "VERSION" in files' do - expect(page).not_to have_content("VERSION") - end - - step 'I should see "CHANGELOG" in files' do - expect(page).to have_content("CHANGELOG") - end - - step 'I should not see "CHANGELOG" in files' do - expect(page).not_to have_content("CHANGELOG") - end - - step 'I should see ".gitmodules" in files' do - expect(page).to have_content(".gitmodules") - end - - step 'I should not see ".gitmodules" in files' do - expect(page).not_to have_content(".gitmodules") - end - - step 'I should see ".gitignore" in files' do - expect(page).to have_content(".gitignore") - end - - step 'I should not see ".gitignore" in files' do - expect(page).not_to have_content(".gitignore") - end - - def find_file(text) - fill_in 'file_find', with: text - end -end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index d16c127f6e6..014e6ad625b 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -200,10 +200,6 @@ module SharedPaths visit edit_project_path(@project) end - step "I visit my project's files page" do - visit project_tree_path(@project, root_ref) - end - step 'I visit a binary file in the repo' do visit project_blob_path(@project, File.join(root_ref, 'files/images/logo-black.png')) |