browse_files.feature 2.78 KB
Newer Older
Ciro Santilli's avatar
Ciro Santilli committed
1
Feature: Project Source Browse Files
2 3
  Background:
    Given I sign in as a user
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4 5 6 7 8 9 10
    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
11 12
    Given I visit project source page for "6d39438"
    Then I should see files from repository for "6d39438"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
13 14

  Scenario: I browse file content
15
    Given I click on ".gitignore" file in repo
Ciro Santilli's avatar
Ciro Santilli committed
16
    Then I should see its content
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17 18

  Scenario: I browse raw file
19
    Given I visit blob file from repo
20
    And I click link "Raw"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
    Then I should see raw file content
Valeriy Sizov's avatar
Valeriy Sizov committed
22

23 24 25 26
  Scenario: I can create file
    Given I click on "new file" link in repo
    Then I can see new file page

Ciro Santilli's avatar
Ciro Santilli committed
27 28 29 30 31 32 33 34 35 36
  @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
    And I click on "Commit changes"
    Then I am redirected to the new file
    And I should see its new content

Valeriy Sizov's avatar
Valeriy Sizov committed
37 38
  @javascript
  Scenario: I can edit file
39
    Given I click on ".gitignore" file in repo
40
    And I click button "Edit"
41
    Then I can edit code
skv-headless's avatar
skv-headless committed
42

Ciro Santilli's avatar
Ciro Santilli committed
43 44 45
  @javascript
  Scenario: I can edit and commit file
    Given I click on ".gitignore" file in repo
46
    And I click button "Edit"
Ciro Santilli's avatar
Ciro Santilli committed
47 48 49 50 51 52
    And I edit code
    And I fill the commit message
    And I click on "Commit changes"
    Then I am redirected to the ".gitignore"
    And I should see its new content

skv-headless's avatar
skv-headless committed
53 54
  @javascript
  Scenario: I can see editing preview
55
    Given I click on ".gitignore" file in repo
56
    And I click button "Edit"
skv-headless's avatar
skv-headless committed
57 58 59 60
    And I edit code
    And I click link "Diff"
    Then I see diff

Ciro Santilli's avatar
Ciro Santilli committed
61 62 63 64
  @javascript
  Scenario: I can remove file and commit
    Given I click on ".gitignore" file in repo
    And I see the ".gitignore"
65
    And I click on "Remove"
Ciro Santilli's avatar
Ciro Santilli committed
66 67 68 69 70
    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"

71
  Scenario: I can browse directory with Browse Dir
72
    Given I click on files directory
73
    And I click on History link
74 75 76 77
    Then I see Browse dir link

  Scenario: I can browse file with Browse File
    Given I click on readme file
78
    And I click on History link
79 80 81
    Then I see Browse file link

  Scenario: I can browse code with Browse Code
82
    Given I click on History link
83
    Then I see Browse code link
84 85 86 87 88

  # Permalink

  Scenario: I click on the permalink link from a branch ref
    Given I click on ".gitignore" file in repo
89
    And I click on Permalink
90 91 92 93 94 95
    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