Cucumber Ltd / cucumber-pro

Choose versionfeatures/publish_and_read/choose_version.feature

Release Dasher II (patch 1) (2018-12-13)

Romain Gérard

Currently viewing

Feature: Choose version

Cucumber Pro allows you to use Git branches and Git tags to maintain multiple concurrent versions of your software documentation. This can be used to show the current, released software documentation as well as documentation for new capabilities under active development.

Rules

  • We use the first pushed branch as default (the one we show when you first visit the project)
  • If multiple branches or tags exist, you can choose which one to view
  • We will remember your version choice as you browse around the project and search
  • We won't remember you version choice from one visit to the next
  • If a document is open when you switch version:
    • If it exists on the version you switch to, the document contents for that version will be displayed.
    • If it doesn't exist on that version you'll see a 404 page.

Later

  • Ability to change / set the default version
  • Creating favourite versions or "views" of a project

Questions

  • What if we have hundreds of branches, or a branch with a really long name?

Background:

  • Given Dave has created test-project
  • And Dave has uploaded his public key

Scenario: Two branches, one of them master

  • Given Dave is watching test-project's documentation outline
  • When Dave adds features/hello.feature to test-project:
    Feature: Hello
  • And Dave adds features/world.feature to test-project on git branch develop:
    Feature: World
  • Then Dave should see the documentation outline:
    features/hello.feature
  • And Dave should be able to read features/hello.feature:
    Feature: Hello
  • But Dave should not be able to read features/world.feature

Scenario: Two branches, switch from one to the other

  • Given Dave is watching test-project's documentation outline
  • And Dave has added features/hello.feature to test-project:
    Feature: Hello
  • And Dave has added features/world.feature to test-project on git branch develop:
    Feature: World
  • When Dave switches version to git branch develop
  • Then Dave should see the documentation outline:
    features/hello.feature
    features/world.feature
  • And Dave should be able to read features/hello.feature:
    Feature: Hello
  • And Dave should be able to read features/world.feature:
    Feature: World

Scenario: Updates to a branch

  • Given Dave has added features/hello.feature to test-project:
    Feature: Hello
  • And Dave is watching test-project's documentation outline
  • When Dave adds features/world.feature to test-project:
    Feature: World
  • Then Dave should see the documentation outline:
    features/hello.feature
    features/world.feature
  • And Dave should be able to read features/hello.feature:
    Feature: Hello
  • And Dave should be able to read features/world.feature:
    Feature: World

Scenario: See updated document outline on a non-default branch

The first branch that is pushed to is considered the default branch

  • Given Dave is watching test-project's documentation outline
  • When Dave adds features/hello.feature to test-project on git branch develop:
    Feature: Hello
  • Then Dave should see the documentation outline:
    features/hello.feature

Scenario: Switch branch, open file doesn't exist there

  • And Dave is watching test-project's documentation outline
  • And Dave has added features/hello.feature to test-project:
    Feature: Hello
  • And Dave has added features/world.feature to test-project on git branch develop:
    Feature: World
  • And Dave is reading features/world.feature on git branch develop
  • When Dave switches version to git branch master
  • Then Dave should see an explanation that they have switched to a branch where the file doesn't exist

Scenario: Go back and see an older tagged version

  • Given Dave is watching test-project's documentation outline
  • And Dave has added features/readme.md to test-project:
    # Release 1
  • And Dave has tagged the master branch of test-project with git tag releases/v1
  • And Dave has modified features/readme.md in test-project to:
    # Release 2
  • When Dave switches version to git tag releases/v1
  • Then Dave should be able to read features/readme.md:
    # Release 1