/StoryToJasmine

SublimeTex plugins for BDD based on Story using Pivotaltracker and convert that story on jasmine specs

Primary LanguagePythonMIT LicenseMIT

StoryToJasmine

SublimeText plugin for BDD that retrieves a Story from Pivotaltracker and inserts it to the current document as a jasmine spec.

New FEATURES!!!!!!

  • Can select project from list after set the Pivotaltracker Id (Ctrl+Shift+P Story to Jasmine: Select project from list)

    Project list on sublime SJ Project from list

    Pivotaltracker project list Pivotaltracker project list

  • After select the project now can you use "search operator" to select stories (Ctrl+Shift+P Story to Jasmine: Search story). It use the same sintax that Pivotaltracker site.

    Search story by type:feature SJ Project from list

    Search on sublime SJ Project from list

    Pivotaltracker search result Pivotaltracker project list

    Pivotaltracker sintax

    Pivotaltracker project list

Installation

The shorter way of doing this is (Not yet):

  • Ctrl+Shift+P or ⌘+Shift+P in Linux/Windows/OS X
  • type install, select Package Control: Install Package
  • type and select StorytoJasmine

Manually

Make sure you use the right Sublime Text folder. For example, on OS X, packages for version 2 are in ~/Library/Application\ Support/Sublime\ Text\ 2, while version 3 is labeled ~/Library/Application\ Support/Sublime\ Text\ 3.

These are for Sublime Text 3:

Mac

git clone https://github.com/gallegogt/StoryToJasmine.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/StoryToJasmine

Linux

git clone https://github.com/gallegogt/StoryToJasmine.git ~/.config/sublime-text-3/Packages/StoryToJasmine

Windows

git clone https://github.com/gallegogt/StoryToJasmine.git "%APPDATA%/Sublime Text 3/Packages/StoryToJasmine"

Usage

Tools -> Command Palette (Ctrl+Shift+P or ⌘+Shift+P) and type Story to Jasmine`.

Plugin options

-- or --

Right click in the current buffer and select Story to Jasmine -> one of next options:

Menu

Pivotaltracker Story sample

PT Story

  1. Set Pivotaltracker Api Token (Api Token for access to the service)

ApiToken

2.- Set Project Id

Project id on pivotaltracker site

Project id on Pivotaltracker site

Set project id on sublime Set project id on sublime

3.- Get Story ID (This options is only for javascript files)

Story id on pivotaltracker site StoryID

Set this story id on ST plugin StoryID

The result of last option is:

Jasmine Code

Jasmine Code

Settings

Tools -> Story to Jasmine -> Set Plugin Options

{
  // default current project
  "current_project": "",

  // default PivotalTracker Api Token
  "pivotaltracker_api_token": "",

  // story keywords (change the keywords values for other languages)
  "word_Given": "Dado ",
  "word_And": "Y ",
  "word_When": "Cuando ",
  "word_Then": "Entonces ",

  // jasmine simple template
  "describe_template": "describe('{0}', function() {{{1}}});",
  "it_template": "it('{0} [ID:#{1}]', function() {2});\n\n"
}

Operating Systems

This package works on Windows, OSX, and Linux