github.com/scorpionis/hub@v2.2.1+incompatible/features/browse.feature (about) 1 Feature: hub browse 2 Background: 3 Given I am "mislav" on github.com with OAuth token "OTOKEN" 4 5 Scenario: No repo 6 When I run `hub browse` 7 Then the exit status should be 1 8 Then the output should contain exactly "git browse [-u] [[<USER>/]<REPOSITORY>|--] [SUBPAGE]\n" 9 10 Scenario: Project with owner 11 When I successfully run `hub browse mislav/dotfiles` 12 Then there should be no output 13 And "open https://github.com/mislav/dotfiles" should be run 14 15 Scenario: Project without owner 16 Given I am "mislav" on github.com 17 When I successfully run `hub browse dotfiles` 18 Then "open https://github.com/mislav/dotfiles" should be run 19 20 Scenario: Explicit project overrides current 21 Given I am in "git://github.com/josh/rails-behaviors.git" git repo 22 And I am "mislav" on github.com 23 When I successfully run `hub browse dotfiles` 24 Then "open https://github.com/mislav/dotfiles" should be run 25 26 Scenario: Project issues 27 When I successfully run `hub browse mislav/dotfiles issues` 28 Then "open https://github.com/mislav/dotfiles/issues" should be run 29 30 Scenario: Project wiki 31 When I successfully run `hub browse mislav/dotfiles wiki` 32 Then "open https://github.com/mislav/dotfiles/wiki" should be run 33 34 Scenario: Project commits on master 35 When I successfully run `hub browse mislav/dotfiles commits` 36 Then "open https://github.com/mislav/dotfiles/commits/master" should be run 37 38 Scenario: Specific commit in project 39 When I successfully run `hub browse mislav/dotfiles commit/4173c3b` 40 Then "open https://github.com/mislav/dotfiles/commit/4173c3b" should be run 41 42 Scenario: Output the URL instead of browse 43 When I successfully run `hub browse -u mislav/dotfiles` 44 Then the output should contain exactly "https://github.com/mislav/dotfiles\n" 45 But "open https://github.com/mislav/dotfiles" should not be run 46 47 Scenario: Current project 48 Given I am in "git://github.com/mislav/dotfiles.git" git repo 49 When I successfully run `hub browse` 50 Then there should be no output 51 And "open https://github.com/mislav/dotfiles" should be run 52 53 Scenario: Commit in current project 54 Given I am in "git://github.com/mislav/dotfiles.git" git repo 55 When I successfully run `hub browse -- commit/abcd1234` 56 Then "open https://github.com/mislav/dotfiles/commit/abcd1234" should be run 57 58 Scenario: Current branch 59 Given I am in "git://github.com/mislav/dotfiles.git" git repo 60 And git "push.default" is set to "upstream" 61 And I am on the "feature" branch with upstream "origin/experimental" 62 When I successfully run `hub browse` 63 Then "open https://github.com/mislav/dotfiles/tree/experimental" should be run 64 65 Scenario: Default branch 66 Given I am in "git://github.com/mislav/dotfiles.git" git repo 67 And the default branch for "origin" is "develop" 68 And I am on the "develop" branch with upstream "origin/develop" 69 When I successfully run `hub browse` 70 Then "open https://github.com/mislav/dotfiles" should be run 71 72 Scenario: Current branch, no tracking 73 Given I am in "git://github.com/mislav/dotfiles.git" git repo 74 And I am on the "feature" branch 75 When I successfully run `hub browse` 76 Then "open https://github.com/mislav/dotfiles" should be run 77 78 Scenario: Default branch in upstream repo as opposed to fork 79 Given I am in "git://github.com/jashkenas/coffee-script.git" git repo 80 And the "mislav" remote has url "git@github.com:mislav/coffee-script.git" 81 And the default branch for "origin" is "master" 82 And I am on the "master" branch pushed to "mislav/master" 83 When I successfully run `hub browse` 84 Then "open https://github.com/jashkenas/coffee-script" should be run 85 86 Scenario: Current branch with special chars 87 Given I am in "git://github.com/mislav/dotfiles.git" git repo 88 And I am on the "fix-bug-#123" branch with upstream "origin/fix-bug-#123" 89 When I successfully run `hub browse` 90 Then "open https://github.com/mislav/dotfiles/tree/fix-bug-%23123" should be run 91 92 Scenario: Commits on current branch 93 Given I am in "git://github.com/mislav/dotfiles.git" git repo 94 And git "push.default" is set to "upstream" 95 And I am on the "feature" branch with upstream "origin/experimental" 96 When I successfully run `hub browse -- commits` 97 Then "open https://github.com/mislav/dotfiles/commits/experimental" should be run 98 99 Scenario: Issues subpage ignores tracking configuration 100 Given I am in "git://github.com/jashkenas/coffee-script.git" git repo 101 And the "mislav" remote has url "git@github.com:mislav/coffee-script.git" 102 And git "push.default" is set to "upstream" 103 And I am on the "feature" branch with upstream "mislav/experimental" 104 When I successfully run `hub browse -- issues` 105 Then "open https://github.com/jashkenas/coffee-script/issues" should be run 106 107 Scenario: Issues subpage ignores current branch 108 Given I am in "git://github.com/jashkenas/coffee-script.git" git repo 109 And the "mislav" remote has url "git@github.com:mislav/coffee-script.git" 110 And I am on the "feature" branch pushed to "mislav/feature" 111 When I successfully run `hub browse -- issues` 112 Then there should be no output 113 Then "open https://github.com/jashkenas/coffee-script/issues" should be run 114 115 Scenario: Forward Slash Delimited branch 116 Given I am in "git://github.com/mislav/dotfiles.git" git repo 117 And git "push.default" is set to "upstream" 118 And I am on the "foo/bar" branch with upstream "origin/baz/qux/moo" 119 When I successfully run `hub browse` 120 Then "open https://github.com/mislav/dotfiles/tree/baz/qux/moo" should be run 121 122 Scenario: No branch 123 Given I am in "git://github.com/mislav/dotfiles.git" git repo 124 And I am in detached HEAD 125 When I successfully run `hub browse` 126 Then "open https://github.com/mislav/dotfiles" should be run 127 128 Scenario: No branch to pulls 129 Given I am in "git://github.com/mislav/dotfiles.git" git repo 130 And I am in detached HEAD 131 When I successfully run `hub browse -- pulls` 132 Then "open https://github.com/mislav/dotfiles/pulls" should be run 133 134 Scenario: Dot Delimited branch 135 Given I am in "git://github.com/mislav/dotfiles.git" git repo 136 And git "push.default" is set to "upstream" 137 And I am on the "fix-glob-for.js" branch with upstream "origin/fix-glob-for.js" 138 When I successfully run `hub browse` 139 Then "open https://github.com/mislav/dotfiles/tree/fix-glob-for.js" should be run 140 141 Scenario: Wiki repo 142 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo 143 When I successfully run `hub browse` 144 Then "open https://github.com/defunkt/hub/wiki" should be run 145 146 Scenario: Wiki commits 147 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo 148 When I successfully run `hub browse -- commits` 149 Then "open https://github.com/defunkt/hub/wiki/_history" should be run 150 151 Scenario: Wiki pages 152 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo 153 When I successfully run `hub browse -- pages` 154 Then "open https://github.com/defunkt/hub/wiki/_pages" should be run 155 156 Scenario: Repo with remote with local path 157 Given I am in "git://github.com/mislav/dotfiles.git" git repo 158 And the "upstream" remote has url "../path/to/another/repo.git" 159 When I successfully run `hub browse` 160 Then "open https://github.com/mislav/dotfiles" should be run 161 162 Scenario: Enterprise repo 163 Given I am in "git://git.my.org/mislav/dotfiles.git" git repo 164 And I am "mislav" on git.my.org with OAuth token "FITOKEN" 165 And "git.my.org" is a whitelisted Enterprise host 166 When I successfully run `hub browse` 167 Then "open https://git.my.org/mislav/dotfiles" should be run 168 169 Scenario: Enterprise repo over HTTP 170 Given I am in "git://git.my.org/mislav/dotfiles.git" git repo 171 And I am "mislav" on http://git.my.org with OAuth token "FITOKEN" 172 And "git.my.org" is a whitelisted Enterprise host 173 When I successfully run `hub browse` 174 Then "open http://git.my.org/mislav/dotfiles" should be run 175 176 Scenario: SSH alias 177 Given the SSH config: 178 """ 179 Host gh 180 User git 181 HostName github.com 182 """ 183 Given I am in "gh:singingwolfboy/sekrit.git" git repo 184 When I successfully run `hub browse` 185 Then "open https://github.com/singingwolfboy/sekrit" should be run 186 187 Scenario: SSH GitHub alias 188 Given the SSH config: 189 """ 190 Host github.com 191 HostName ssh.github.com 192 """ 193 Given I am in "git@github.com:suan/git-sanity.git" git repo 194 When I successfully run `hub browse` 195 Then "open https://github.com/suan/git-sanity" should be run