2014-10-07 17:28:38 -04:00
|
|
|
Feature: Project Source Browse Files
|
2012-09-10 08:34:01 -04:00
|
|
|
Background:
|
|
|
|
Given I sign in as a user
|
2012-06-15 00:15:28 -04:00
|
|
|
And I own project "Shop"
|
|
|
|
Given I visit project source page
|
|
|
|
|
|
|
|
Scenario: I browse files from master branch
|
|
|
|
Then I should see files from repository
|
|
|
|
|
|
|
|
Scenario: I browse files for specific ref
|
2014-07-31 09:20:47 -04:00
|
|
|
Given I visit project source page for "6d39438"
|
|
|
|
Then I should see files from repository for "6d39438"
|
2012-06-15 00:15:28 -04:00
|
|
|
|
|
|
|
Scenario: I browse file content
|
2014-07-31 09:20:47 -04:00
|
|
|
Given I click on ".gitignore" file in repo
|
2014-09-21 13:45:54 -04:00
|
|
|
Then I should see its content
|
2012-06-15 00:15:28 -04:00
|
|
|
|
|
|
|
Scenario: I browse raw file
|
2012-09-10 08:34:01 -04:00
|
|
|
Given I visit blob file from repo
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click link "Raw"
|
2012-06-15 00:15:28 -04:00
|
|
|
Then I should see raw file content
|
2012-10-12 12:56:06 -04:00
|
|
|
|
2013-11-05 03:45:23 -05:00
|
|
|
Scenario: I can create file
|
|
|
|
Given I click on "new file" link in repo
|
|
|
|
Then I can see new file page
|
|
|
|
|
2014-09-26 09:26:52 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: I can create and commit file
|
|
|
|
Given I click on "new file" link in repo
|
|
|
|
And I edit code
|
|
|
|
And I fill the new file name
|
|
|
|
And I fill the commit message
|
2014-10-02 18:13:23 -04:00
|
|
|
And I click on "Commit Changes"
|
2014-09-26 09:26:52 -04:00
|
|
|
Then I am redirected to the new file
|
|
|
|
And I should see its new content
|
|
|
|
|
2014-09-25 10:43:23 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: If I enter an illegal file name I see an error message
|
|
|
|
Given I click on "new file" link in repo
|
|
|
|
And I fill the new file name with an illegal name
|
|
|
|
And I edit code
|
|
|
|
And I fill the commit message
|
|
|
|
And I click on "Commit changes"
|
|
|
|
Then I am on the new file page
|
|
|
|
And I see a commit error message
|
|
|
|
|
2012-10-12 12:56:06 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: I can edit file
|
2014-07-31 09:20:47 -04:00
|
|
|
Given I click on ".gitignore" file in repo
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click button "Edit"
|
2012-10-12 13:27:50 -04:00
|
|
|
Then I can edit code
|
2014-04-15 11:02:02 -04:00
|
|
|
|
2014-09-26 09:26:52 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: I can edit and commit file
|
|
|
|
Given I click on ".gitignore" file in repo
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click button "Edit"
|
2014-09-26 09:26:52 -04:00
|
|
|
And I edit code
|
|
|
|
And I fill the commit message
|
2014-10-02 18:13:23 -04:00
|
|
|
And I click on "Commit Changes"
|
2014-09-26 09:26:52 -04:00
|
|
|
Then I am redirected to the ".gitignore"
|
|
|
|
And I should see its new content
|
|
|
|
|
2014-09-25 10:43:23 -04:00
|
|
|
@javascript @wip
|
|
|
|
Scenario: If I don't change the content of the file I see an error message
|
|
|
|
Given I click on ".gitignore" file in repo
|
|
|
|
And I click button "edit"
|
|
|
|
And I fill the commit message
|
|
|
|
And I click on "Commit changes"
|
|
|
|
# Test fails because carriage returns are added to the file.
|
|
|
|
Then I am on the ".gitignore" edit file page
|
|
|
|
And I see a commit error message
|
|
|
|
|
2014-04-15 11:02:02 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: I can see editing preview
|
2014-07-31 09:20:47 -04:00
|
|
|
Given I click on ".gitignore" file in repo
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click button "Edit"
|
2014-04-15 11:02:02 -04:00
|
|
|
And I edit code
|
|
|
|
And I click link "Diff"
|
|
|
|
Then I see diff
|
|
|
|
|
2014-09-26 09:26:52 -04:00
|
|
|
@javascript
|
|
|
|
Scenario: I can remove file and commit
|
|
|
|
Given I click on ".gitignore" file in repo
|
|
|
|
And I see the ".gitignore"
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click on "Remove"
|
2014-09-26 09:26:52 -04:00
|
|
|
And I fill the commit message
|
|
|
|
And I click on "Remove file"
|
|
|
|
Then I am redirected to the files URL
|
|
|
|
And I don't see the ".gitignore"
|
|
|
|
|
2014-07-09 04:12:02 -04:00
|
|
|
Scenario: I can browse directory with Browse Dir
|
2014-07-31 09:20:47 -04:00
|
|
|
Given I click on files directory
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click on History link
|
2014-07-09 04:12:02 -04:00
|
|
|
Then I see Browse dir link
|
|
|
|
|
|
|
|
Scenario: I can browse file with Browse File
|
|
|
|
Given I click on readme file
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click on History link
|
2014-07-09 04:12:02 -04:00
|
|
|
Then I see Browse file link
|
|
|
|
|
|
|
|
Scenario: I can browse code with Browse Code
|
2014-09-29 17:11:30 -04:00
|
|
|
Given I click on History link
|
2014-07-09 04:12:02 -04:00
|
|
|
Then I see Browse code link
|
2014-08-08 10:03:58 -04:00
|
|
|
|
|
|
|
# Permalink
|
|
|
|
|
|
|
|
Scenario: I click on the permalink link from a branch ref
|
|
|
|
Given I click on ".gitignore" file in repo
|
2014-09-29 17:11:30 -04:00
|
|
|
And I click on Permalink
|
2014-08-08 10:03:58 -04:00
|
|
|
Then I am redirected to the permalink URL
|
|
|
|
|
|
|
|
Scenario: I don't see the permalink link from a SHA ref
|
|
|
|
Given I visit project source page for "6d394385cf567f80a8fd85055db1ab4c5295806f"
|
|
|
|
And I click on ".gitignore" file in repo
|
|
|
|
Then I don't see the permalink link
|