@targets @usefixtures(workbook)
Feature: Targets

    Scenario: Table
        When I visit "/targets/"
        And I wait for the table to fully load

        When I fill in "q" with "sapiens"
        Then I should see an element with the css selector "tr:not([hidden]) a[href='/targets/ADNP-human/']" within 1 seconds
        And I should see an element with the css selector "tr[hidden] a[href='/targets/H3K4me3-mouse/']"
        And I should see exactly one element with the css selector ".table-count" containing the text "13"

    Scenario: Detail page
        When I visit "/targets/ADNP-human/"
        And I should see an element with the css selector ".view-item.type-target"

        When I click the link to "http://www.uniprot.org/uniprot/Q9H2P0"
        Then the browser's URL should contain "www.uniprot.org"
        Then I should see "Q9H2P0 (ADNP_HUMAN)"

        When I go back
        Then the browser's URL should contain "/targets/"
        And I should see an element with the css selector ".view-item.type-target"

@targets @usefixtures(workbook)
Feature: Targets

    Scenario: Table
        When I visit "/targets/"
        And I wait for the table to fully load

        When I fill in "q" with "sapiens"
        Then I should see an element with the css selector "tr:not([hidden]) a[href='/targets/ADNP-human/']" within 1 seconds
        And I should see an element with the css selector "tr[hidden] a[href='/targets/H3K4me3-mouse/']"
        And I should see exactly one element with the css selector ".table-count" containing the text "13"

    Scenario: Detail page
        When I visit "/targets/ADNP-human/"
        And I should see an element with the css selector ".view-item.type-target"

        When I click the link to "http://www.uniprot.org/uniprot/Q9H2P0"
        Then the browser's URL should contain "www.uniprot.org"
        Then I should see "Q9H2P0 - ADNP_HUMAN"

        When I go back
        Then the browser's URL should contain "/targets/"
        And I should see an element with the css selector ".view-item.type-target"

Fix target.features test for Uniprot change

The UniProt website changed, causing the target.features test for the string “Q9H2P0 (ADNP_HUMAN)“ to fail. Changed the string to “Q9H2P0 - ADNP_HUMAN”


@completion
Feature: fish tab-completion

  Background:
    Given my shell is fish

  Scenario: "pu" matches multiple commands including "pull-request"
    When I type "git pu" and press <Tab>
    Then the command should not expand
    When I press <Tab> again
    Then the completion menu should offer "pull push pull-request"

  Scenario: "ci-" expands to "ci-status"
    When I type "git ci-" and press <Tab>
    Then the command should expand to "git ci-status"

  Scenario: Offers pull-request flags
    When I type "git pull-request -" and press <Tab>
    When I press <Tab> again
    Then the completion menu should offer "-F -b -f -h -m -a -M -l -o --browse -p --help" unsorted

  Scenario: Browse to issues
    When I type "git browse -- i" and press <Tab>
    Then the command should expand to "git browse -- issues"

@completion
Feature: fish tab-completion

  Background:
    Given my shell is fish

  Scenario: "pu" matches multiple commands including "pull-request"
    When I type "git pu" and press <Tab>
    Then the command should not expand
    When I press <Tab> again
    Then the completion menu should offer "pull push pull-request" unsorted

  Scenario: "ci-" expands to "ci-status"
    When I type "git ci-" and press <Tab>
    Then the command should expand to "git ci-status"

  Scenario: Offers pull-request flags
    When I type "git pull-request -" and press <Tab>
    When I press <Tab> again
    Then the completion menu should offer "-F -b -f -h -m -a -M -l -o --browse -p --help" unsorted

  Scenario: Browse to issues
    When I type "git browse -- i" and press <Tab>
    Then the command should expand to "git browse -- issues"

Allow the unsorted expansion for the fish shell

Before this change, the `pu` would sometimes expand to `pull
pull-request push` if the order isn't important, we should take this
fix.

However, if the order is important, we should probably switch the
expectation such that the options are presented alphabetically as
observed.


#Author: dallas.fraser.waterloo@gmail.com
#Keywords Summary : Test the fields and rules

Feature: The fields and rules
    Background:
        Given I navigate to the "fieldsrules" page

    Scenario: Checking the two different pages
        When I click on "Rules" tab
        Then I see a paragraph containing "official MLSB Rules"
        When I click on "Fields" tab
        Then I see a paragraph containing "games take place"

#Author: dallas.fraser.waterloo@gmail.com
#Keywords Summary : Test the fields and rules

Feature: The fields and rules
    Background:
        Given I navigate to the "fieldsrules" page

    Scenario: Checking the rules tab
        When I click on "Rules" tab
        Then I see a paragraph containing "official MLSB Rules"

    Scenario: Check the fields tab
        When I click on "Fields" tab
        Then I see a paragraph containing "games take place"

Split out tests into two

Split out tests into two


Feature: Getting started

  To get started, just open a command prompt in an empty directory and run
  `cucumber`. You'll be prompted for what to do next.

  @spawn
  Scenario: Run Cucumber in an empty directory
    Given a directory without standard Cucumber project directory structure
    When I run `cucumber`
    Then it should fail with regexp:
      """
      No such file or directory.*Please create a features directory to get started.
      """

  Scenario: Accidentally run Cucumber in a folder with Ruby files in it.
    Given a directory without standard Cucumber project directory structure
    And a file named "should_not_load.rb" with:
      """
      puts 'this will not be shown'
      """
    When I run `cucumber`
    Then the exit status should be 1
    And the output should not contain:
      """
      this will not be shown

      """

Feature: Getting started

  To get started, just open a command prompt in an empty directory and run
  `cucumber`. You'll be prompted for what to do next.

  @spawn
  Scenario: Run Cucumber in an empty directory
    Given a directory without standard Cucumber project directory structure
    When I run `cucumber`
    Then it should fail with:
      """
      No such file or directory - features. Please create a features directory to get started.
      """

  Scenario: Accidentally run Cucumber in a folder with Ruby files in it.
    Given a directory without standard Cucumber project directory structure
    And a file named "should_not_load.rb" with:
      """
      puts 'this will not be shown'
      """
    When I run `cucumber`
    Then the exit status should be 1
    And the output should not contain:
      """
      this will not be shown

      """

Revert "Match less explicitly to avoid Ruby 2.1.0+ bug"

This reverts commit d987b49a93389a44ba00d0bc30c54fbcc7f6a3d3.


Feature: Upgrade Vim plugins
  As a lazy Vim user
  I want to upgrade Vim plugins
  without pain

  Background:
    Given a temporary directory called 'tmp'
    And a home directory called 'home' in '$tmp/home'
    And a repository 'foo' with versions '1.0.0 1.0.1 1.0.2'

  Scenario: Upgrade with lockfile
    Given flavorfile
      """
      flavor '$foo_uri'
      """
    And lockfile
      """
      $foo_uri (1.0.0)
      """
    When I run vim-flavor with 'upgrade'
    Then I get lockfile
      """
      $foo_uri (1.0.2)
      """
    And I get a bootstrap script in '$home'
    And I get flavor 'foo' with '1.0.2' in '$home'

Feature: Upgrade Vim plugins
  As a lazy Vim user
  I want to upgrade Vim plugins
  without pain

  Background:
    Given a temporary directory called 'tmp'
    And a home directory called 'home' in '$tmp/home'
    And a repository 'foo' with versions '1.0.0 1.0.1 1.0.2'

  Scenario: Upgrade with lockfile
    Given flavorfile
      """
      flavor '$foo_uri'
      """
    And lockfile
      """
      $foo_uri (1.0.0)
      """
    When I run vim-flavor with 'upgrade'
    Then I get lockfile
      """
      $foo_uri (1.0.2)
      """
    And I get a bootstrap script in '$home/.vim'
    And I get flavor 'foo' with '1.0.2' in '$home/.vim'

Fix steps to verify vimfiles content

Fix steps to verify vimfiles content


@api @mailhog
Feature: notifications-content

  Background:
    Given user "Alice" has been created with default attributes and without skeleton files
    And using OCS API version "2"

  Scenario: Create notification
    When user "Alice" sets the email notification option to "always" using the API
    And user "Alice" is sent a notification with
      | app         | notificationsacceptancetesting                                            |
      | timestamp   | 144958517                                                                 |
      | subject     | Acceptance Testing                                                        |
      | link        | https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ |
      | message     | About Activities and Notifications in ownCloud                            |
      | object_type | blog                                                                      |
      | object_id   | 9483                                                                      |
    Then the email address "alice@example.org" should have received an email with the body containing
      """
      Hello,
      About Activities and Notifications in ownCloud

      See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information
      """
    And the email address "alice@example.org" should have received an email with the body containing
      """
      See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information
      """

@api @email
Feature: notifications-content

  Background:
    Given user "Alice" has been created with default attributes and without skeleton files
    And using OCS API version "2"

  Scenario: Create notification
    When user "Alice" sets the email notification option to "always" using the API
    And user "Alice" is sent a notification with
      | app         | notificationsacceptancetesting                                            |
      | timestamp   | 144958517                                                                 |
      | subject     | Acceptance Testing                                                        |
      | link        | https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ |
      | message     | About Activities and Notifications in ownCloud                            |
      | object_type | blog                                                                      |
      | object_id   | 9483                                                                      |
    Then the email address "alice@example.org" should have received an email with the body containing
      """
      Hello,
      About Activities and Notifications in ownCloud

      See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information
      """
    And the email address "alice@example.org" should have received an email with the body containing
      """
      See https://owncloud.org/blog/about-activities-and-notifications-in-owncloud/ on ownCloud for more information
      """

Change mailhog test tag to email

Change mailhog test tag to email


@javascript
Feature: All the Javascript specs run correctly

  Scenario: Running the datetime specs
    When I run the datetime javascript specs
    Then I should see all specs passing

  Scenario: Running the tasks specs
    When I run the tasks javascript specs
    Then I should see all specs passing

@javascript
Feature: All the Javascript specs run correctly

  Scenario: Running the datetime specs
    # When I run the datetime javascript specs
    # Then I should see all specs passing

  Scenario: Running the tasks specs
    # When I run the tasks javascript specs
    # Then I should see all specs passing

Comment javascript spec feature until we have a better way to test javascript


Feature: Manage comment custom fields

  Scenario: Comment meta CRUD
    Given a WP install

    When I run `wp comment-meta add 1 foo 'bar'`
    Then STDOUT should not be empty

    When I run `wp comment-meta get 1 foo`
    Then STDOUT should be:
      """
      bar
      """

    When I run `wp comment-meta set 1 foo '[ "1", "2" ]' --format=json`
    Then STDOUT should not be empty

    When I run `wp comment-meta get 1 foo --format=json`
    Then STDOUT should be:
      """
      ["1","2"]
      """

    When I run `wp comment-meta delete 1 foo`
    Then STDOUT should not be empty

    When I try `wp comment-meta get 1 foo`
    Then the return code should be 1

Feature: Manage comment custom fields

  Scenario: Comment meta CRUD
    Given a WP install

    When I run `wp comment-meta add 1 foo 'bar'`
    Then STDOUT should not be empty

    When I run `wp comment-meta get 1 foo`
    Then STDOUT should be:
      """
      bar
      """

    When I try `wp comment meta get 999999 foo`
    Then STDERR should be:
      """
      Error: Invalid comment ID.
      """

    When I run `wp comment-meta set 1 foo '[ "1", "2" ]' --format=json`
    Then STDOUT should not be empty

    When I run `wp comment-meta get 1 foo --format=json`
    Then STDOUT should be:
      """
      ["1","2"]
      """

    When I run `wp comment-meta delete 1 foo`
    Then STDOUT should not be empty

    When I try `wp comment-meta get 1 foo`
    Then the return code should be 1

Test comment validation for comment meta


Feature: Generate simple API specs

  Scenario: Single resource route
    Given a file named "foo.raml" with:
      """
      #%RAML 0.8
      ---
      title: e-BookMobile API
      baseUri: http://api.e-bookmobile.com/{version}
      version: v1

      /authors:
        get:
          description: Retrieve a list of authors
          responses:
            200:
              body:
                application/json:
                  example: |
                    {
                      "data": [
                        {
                          "id": 1,
                          "first_name": "Hermann",
                          "last_name": "Hesse"
                        },
                        {
                          "id": 2,
                          "first_name": "Charles",
                          "last_name": "Dickens"
                        }
                      ],
                      "success": true,
                      "status": 200
                    }
      """
    When I run `rambo foo.raml`
    Then the file "spec/contract/foo_spec.rb" should contain:
      """
      require "spec_helper"

      describe "e-BookMobile API" do
        include Rack::Test::Methods

        describe "/authors" do
          let(:route) { "/authors" }

          describe "GET" do
            let(:response_body) do
              {
                "data" => [
                  {
                    "id" => 1,
                    "first_name" => "Hermann",
                    "last_name" => "Hesse"
                  },
                  {
                    "id" => 2,
                    "first_name" => "Charles",
                    "last_name" => "Dickens"
                  }
                ],
                "success" => true,
                "status" => 200
              }.to_json
            end

            it "retrieve a list of authors" do
              get route
              expect(last_response.body).to eql response_body
            end

            it "returns status 200" do
              get route
              expect(last_response.status).to eql 200
            end
          end
        end
      end
      """

Feature: Generate simple API specs

  Scenario: Single resource route
    Given a file named "foo.raml" like "basic_raml.raml"
    When I run `rambo foo.raml`
    Then the file "spec/contract/foo_spec.rb" should be like "simple_spec_file.rb.ex"

Make all the cukes green, bitchez!!!

Make all the cukes green, bitchez!!!


@mink:selenium2 @reset-schema @alice(Page) @alice(Redirection)
Feature: Create new redirection

  Background:
    Given I maximize the window
    When I am on "/fr"
    And I open the redirection menu
    And I wait 1 second

  Scenario: I can view the new error
    And the list "redirections-list-container" should contain 3 elements
    When I click the ".vic-btn-default" element
    And I wait 1 second
    And I fill in "seo_bundle_redirection[url]" with "http://test"
    And I select "url" from "seo_bundle_redirection[link][linkType]"
    And I wait 1 second
    Then I fill in "seo_bundle_redirection[link][url]" with "http://localhost:8000/app_ci.php/fr/"
    And I click the ".vic-btn-default" element
    # TODO : fix below lines, intercooler does not run correctly for this test
    # And I wait 1 second
    # Then I should see text matching "Redirection successfully created!"
    # And the list "redirections-list-container" should contain 4 elements

@mink:selenium2 @reset-schema @alice(Page) @alice(Redirection)
Feature: Create new redirection

  Background:
    Given I maximize the window
    When I am on "/fr"
    And I open the redirection menu
    And I wait 1 second

  Scenario: I can view the new error
    And the list "redirections-list-container" should contain 3 elements
    Then I should not see "http://localhost:8000/app_ci.php/fr/"
    When I press the "New redirection" button
    And I wait 1 second
    And I fill in "seo_bundle_redirection[url]" with "http://test"
    And I select "url" from "seo_bundle_redirection[link][linkType]"
    And I wait 1 second
    Then I fill in "seo_bundle_redirection[link][url]" with "http://localhost:8000/app_ci.php/fr/"
    And I press the "Create" button
    And I wait 1 second
    Then I should see text matching "Redirection successfully created!"
    # TODO: there is 5 elements instead of 4 due to a bug with Javascript
    And the list "redirections-list-container" should contain 5 elements
    And I should see "http://localhost:8000/app_ci.php/fr/"

Fix “I can view the new error” scenario

Fix “I can view the new error” scenario


@docstrings
Feature: Handling scenarios with Doc Strings

  Similar to Tables, Doc Strings are a type of Multiline argument that can be
  used to show largers pieces of text or code in a scenario step.

  Previously Crudecumber would crash when DocStrings were used, but now they are
  handled well enough to be workable.

Scenario: Display and overwrite Doc Strings
  Given I have scenario that contains a Doc String like:
    """
    What are Doc Strings?
    =====================
    Doc Strings are handy for passing a larger piece of text to a step
    definition. The syntax is inspired from Python's Docstring syntax.

    The text should be offset by delimiters consisting of three double-quote
    marks on lines of their own.
    """
  When I run 'crudecumber'
  Then I should be able to step through this scenario manually

@docstrings
Feature: Handling scenarios with Doc Strings

  Similar to Tables, Doc Strings are a type of Multiline argument that can be
  used to show largers pieces of text or code in a scenario step.

  Previously Crudecumber would crash when DocStrings were used, but now they are
  handled well enough to be workable.

Scenario: Display and overwrite Doc Strings
  Given I have a scenario that contains a Doc String like:
    """
    What are Doc Strings?
    =====================
    Doc Strings are handy for passing a larger piece of text to a step
    definition. The syntax is inspired from Python's Docstring syntax.

    The text should be offset by delimiters consisting of three double-quote
    marks on lines of their own.
    """
  When I run 'crudecumber'
  Then I should be able to step through this scenario manually

Scenario: Skip Doc String step
  Given I have a scenario that contains a Doc String
  When I skip this step and it is marked as Pending by Crudecumber
  Then this should be skipped and the following should appear correctly:
    """ruby
    STDOUT.sync = true
    arguments = ARGV
    cmd = "cucumber #{arguments.join(' ')} -x -e features/step_definitions "\
          "-r #{steps} -r #{support_files} "\
          '-f Crudecumber::Formatter -f Crudecumber::Report '\
          '-o crudecumber_results.html'
    log cmd
    exit_code = system(cmd)
    """

Scenario: Mark Doc String step as Pending
  Given I have a scenario that contains a Doc String
  When I press 'S' to mark this Doc String step as Pending:
    """ruby
    STDOUT.sync = true
    arguments = ARGV
    cmd = "cucumber #{arguments.join(' ')} -x -e features/step_definitions "\
          "-r #{steps} -r #{support_files} "\
          '-f Crudecumber::Formatter -f Crudecumber::Report '\
          '-o crudecumber_results.html'
    log cmd
    exit_code = system(cmd)
    """
  Then this step should be shown as skipped and everything appear correctly

Scenario: Fail Doc String step
  Given I have a scenario that contains a Doc String
  When I fail the step containing this Doc String:
    """
    What are Doc Strings?
    =====================
    Doc Strings are handy for passing a larger piece of text to a step
    definition. The syntax is inspired from Python's Docstring syntax.

    The text should be offset by delimiters consisting of three double-quote
    marks on lines of their own.
    """
  Then this step should be shown as skipped and everything appear correctly

Add failing scenarios for handling Doc Strings


@US5503
Feature: cron job scheduler for bulk-extracts

Scenario: Configure bulk extract scheduler
  Given I configurate the bulk extract scheduler script
  And I clean up the cron extraction zone
  When I run the bulk extract scheduler script
  Then I am willing to wait up to 90 seconds for the bulk extract scheduler cron job to start and complete
  And I clean up the scheduler jobs

@US5503
Feature: cron job scheduler for bulk-extracts

# TODO: Do something with this piece of junk that will not run in CI
#Scenario: Configure bulk extract scheduler
#  Given I configurate the bulk extract scheduler script
#  And I clean up the cron extraction zone
#  When I run the bulk extract scheduler script
#  Then I am willing to wait up to 90 seconds for the bulk extract scheduler cron job to start and complete
#  And I clean up the scheduler jobs

Comment out bulk extract scheduler test

Comment out bulk extract scheduler test


Feature: Detecting compiled files
  When a file is compiled but not git ignored, let the user know.

  Background:
    Given a file named "git_cleanser.yml" with:
      """
      ---
      compiled_files_command: echo "object.o"
      """
    And an empty file named "object.o"

  Scenario:
    Given a file named ".gitignore" with:
      """
      *.o
      """
    When I run `git_cleanser`
    Then its output for "generated_but_not_ignored" should not contain "object.o"

  Scenario:
    Given an empty file named ".gitignore"
    When I run `git_cleanser`
    Then its output for "generated_but_not_ignored" should contain "object.o"

Feature: Detecting compiled files
  When a file is compiled but not git ignored, let the user know.

  Scenario:
    Given a file named "git_cleanser.yml" with:
      """
      ---
      compiled_files_command: echo ignored.o committed.o
      """
    And a file named ".gitignore" with:
      """
      ignored.o
      """
    And an empty file named "ignored.o"
    And an empty file named "committed.o"
    When I run `git_cleanser`
    Then its output for "generated_but_not_ignored" should contain "committed.o"
    Then its output for "generated_but_not_ignored" should not contain "ignored.o"

Rework detecting compiled files feature to reduce scenario count


Feature: Attributes management for nodes
    I should be able to see, edit and delete node attributes

    @nodes
    @javascript
    Scenario: Set runlist for node "test-node-1"
      Given I am on homepage
      When I follow "Nodes"
      When I follow "test-node-1"
      When I drag "test-cookbook" into the run_list
      When I press "Save node"
      Then I should be on "/nodes/test-node-1"

    Scenario: Run chef-client to create attributes
      # Given I run chef-client
      When I reload the page
      Then the "#attributes-default span.attribute-name" element should contain "test-cookbook"

    @javascript
    Scenario: Open the attribute tree
      When I open the tree leaf "1" of the "default" panel
      Then the "test-cookbook[attribute1]" field should contain "value-attribute1"

Feature: Attributes management for nodes
    I should be able to see, edit and delete node attributes

    @nodes
    @javascript
    Scenario: Set runlist for node "test-node-1"
      Given I am on homepage
      When I follow "Nodes"
      When I follow "test-node-1"
      When I drag "test-cookbook" into the run_list
      When I press "Save node"
      Then I should be on "/nodes/test-node-1"

    @javascript
    Scenario: Run chef-client to create attributes
      Given I run chef-client
      When I reload the page
      Then the "#attributes-default span.attribute-name" element should contain "test-cookbook"

    @javascript
    Scenario: Open the attribute tree
      When I open the tree leaf "1" of the "default" panel
      Then the "test-cookbook[attribute1]" field should contain "value-attribute1"

    @javascript
    Scenario: Edit "attribute1"
      When I fill in "test-cookbook[attribute1]" with "new attribute1 value"
      When I press "Save node"
      When I open the tree leaf "1" of the "normal" panel
      Then the "test-cookbook[attribute1]" field should contain "new attribute1 value"

Test for edit of default attribute and fix goutte tests... all attributes are js tests.

I need to try to make selenium2 run on travis. Should be possible in theory. I could probably make them ru non codeship too via the chromedriver preinstalled... but i'm tired of spending all my time on
this stuff. Need to add missing features and then worry about this stuff.


Feature: Donating

  Scenario: New User
    Given A pitch exists
    And I view the current pitch page
    And I follow "Donate 20"
    And I follow "Make sure you register first!"
    And I fill in "Your First Name" with "My First Name"
    And I fill in "Your Last Name" with "My Last Name"
    And I fill in "Password" with "password"
    And I fill in "Confirm Password" with "password"
    And I fill in "Your E-mail Address" with "me@example.com"
    And I choose "Community Member"
    And I check "user_terms_of_service"
    And I press "Register"
    And I should see "Click the link in the email we just sent to you to finish creating your account!"
    When I activate my account with email "me@example.com"
    Then I should be on the edit myspot::donation_amounts page
    And I should see "20.00" inside a text field

Feature: Donating

  Scenario: New User
    Given A pitch exists
    And I view the current pitch page
    And I follow "Donate 20"
    And I follow "REGISTER HERE"
    And I fill in "Your First Name" with "My First Name"
    And I fill in "Your Last Name" with "My Last Name"
    And I fill in "Password" with "password"
    And I fill in "Confirm Password" with "password"
    And I fill in "Your E-mail Address" with "me@example.com"
    And I choose "Community Member"
    And I check "user_terms_of_service"
    And I press "Register"
    And I should see "Click the link in the email we just sent to you to finish creating your account!"
    When I activate my account with email "me@example.com"
    Then I should be on the edit myspot::donation_amounts page
    And I should see "20.00" inside a text field

Update cucumber test for David's text changes


Feature: Stack Analysis Backbone API

  Scenario: Check the Backbone API /api/v1/stack_aggregator response
    Given backbone service is running
    When I acquire the authorization token
    Then I should get the proper authorization token
    When I post backbone_input.json to Backbone API api/v1/stack_aggregator
    Then I should get 200 status code
     And I should receive a valid stack_aggregator json response
     And I should find a valid stack_aggregator database entry

  Scenario: Check the Backbone API /api/v1/recommender response
    Given backbone service is running
    When I post backbone_input.json to Backbone API api/v1/recommender
    Then I should get 200 status code
     And I should receive a valid recommendation json response
     And I should find a valid recommendation database entry

Feature: Stack Analysis Backbone API

  Scenario: Check the Backbone API /api/v1/stack_aggregator response
    Given backbone service is running
    When I acquire the authorization token
    Then I should get the proper authorization token
    When I post backbone_input.json to Backbone API api/v1/stack_aggregator
    Then I should get 200 status code
     And I should receive a valid stack_aggregator json response
     And I should find a valid stack_aggregator database entry

  Scenario: Check the Backbone API /api/v1/recommender response
    Given backbone service is running
    When I acquire the authorization token
    Then I should get the proper authorization token
    When I post backbone_input.json to Backbone API api/v1/recommender
    Then I should get 200 status code
     And I should receive a valid recommendation json response
     And I should find a valid recommendation database entry

Fix issue in API backbone test

Fix issue in API backbone test


# encoding: UTF-8
# language: no

@wip
Egenskap: Reservering av bok
  Som låner
  For å få tak i en bestemt bok
  Ønsker jeg å reservere boka

Bakgrunn:
  Gitt at det finnes en låner
  Og at det finnes en bok

  @wip
  Scenario:
    Gitt at låner er pålogget som låner
    Og at låneren har funnet en bok
    Og at boka er tilgjengelig
  	Når låneren reserverer boka
    Så viser systemet at boka er reservert av låneren

  @wip
  Scenario:
    Gitt at bok er reservert av låner
    Og at boka er utlånt
    Når boka registreres innlevert
    Så viser systemet at boka holdes av til låneren

Add scenario where reserved book is returned


# encoding: UTF-8
# language: no

@wip
Egenskap: Se verk
  Som bruker av bibliotekets nettsider
  Siden jeg er interessert et bestemt verk
  Ønsker se opplysninger om verket

  Bakgrunn:
    Gitt at jeg vet at det finnes en side for verket

  @wip
  Scenario: Se på verksopplysninger på verkssiden
    Når jeg er på sida til verket
    Så ser jeg på sida ser jeg informasjon som identifiserer verkets tittel, forfatter, utgivelsesår og en liste over eksemplarer i en menneskelesbar format

# encoding: UTF-8
# language: no

@wip
Egenskap: Se verk
  Som bruker av bibliotekets nettsider
  Siden jeg er interessert et bestemt verk
  Ønsker se opplysninger om verket

  Bakgrunn:
    Gitt at jeg vet at det finnes en side for verket

  @wip
  Scenario: Se på verksopplysninger på verkssiden
    Når jeg er på sida til verket
    Så ser jeg informasjon som identifiserer verkets tittel, forfatter, utgivelsesår og en liste over eksemplarer i en menneskelesbar format

  @wip
  Scenario: Se på eksemplarer knyttet til verk
    Når jeg er på sida til verket
    Så ser jeg en liste over eksemplarer knyttet til verket

Add listing of items scenario and tidy text


Feature: Sign up
  In order to get access to personal part of the site
  A user
  Should be able to sign up

  Background:
    Given we have branch "Sisyphus"

  Scenario: User sign up
    When I go to the sign up page
    And I fill in "Email" with "email@example.com"
    And I fill in "user_password" with "password"
    And I fill in "user_password_confirmation" with "password"
    And I press "Sign up"
    Then I should see "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
    And "email@example.com" should receive an email
    When I open the email
    Then I should see "Confirm my account" in the email body
    When I follow "Confirm my account" in the email
    And I should see "Your account was successfully confirmed. You are now signed in."
    And I should see "Welcome, email@example.com!"

Feature: Sign up
  In order to get access to personal part of the site
  A user
  Should be able to sign up

  Background:
    Given we have branch "Sisyphus"

  Scenario: User sign up
    When I go to the sign up page
    And I fill in "Email" with "email@example.com"
    And I fill in "user_password" with "password"
    And I fill in "user_password_confirmation" with "password"
    And I press "Sign up"
    Then I should see "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
    And "email@example.com" should receive an email
    When I open the email
    Then I should see "Confirm my account" in the email body
    When I follow "Confirm my account" in the email
    And I should see "Your account was successfully confirmed."

Fix cucumber sign up feature

Fix cucumber sign up feature


@wip
Feature: Treating a peritonitis episode

  Background:
    Given Clyde is a clinician
    And Patty is a patient

  @web @javascript
  Scenario: A clinician treated a peritonitis episode
    When Clyde records a peritonitis episode for Patty
    And records the organism for the episode
    And records the medication for the episode
    Then a peritonitis episode is recorded for Patty

  @web @javascript
  Scenario: A clinician revised a peritonitis episode
    Given Patty is being treated for a peritonitis episode
    Then Clyde can revise the peritonitis episode

  @web @javascript
  Scenario: A clinician terminated an organism for a peritonitis episode
    Given Clyde recorded a peritonitis episode for Patty
    And recorded the organism for the episode
    Then Clyde can terminate the organism for the episode

  @web @javascript
  Scenario: A clinician terminated a medication for a peritonitis episode
    Given Clyde recorded a peritonitis episode for Patty
    And recorded the medication for the episode
    Then Clyde can terminate the medication for the episode

Add scenario for terminating a medication associated with an episode


Feature: web-system-app
 Scenario: Crosswalk IndexDB restart
  When launch "indexdb"
    And I fill in "txtName" with "123"
    And I fill in "txtEmail" with "Intel"
    And I click view "description=Add"
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"
    And I fill in "txtID" with "123"
    And I click view "description=Delete"
   Then I should see view "className=android.view.View^^^description=No Record"
    And I click view "description=Add"
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"
    And switch to "indexdb"
    And I wait 2 seconds
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"

Feature: web-system-app
 Scenario: Crosswalk IndexDB restart
  When launch "indexdb"
    And I fill in "txtName" with "123"
    And I fill in "txtEmail" with "Intel"
    And I click view "description=Add"
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"
    And I fill in "txtID" with "123"
    And I click view "description=Delete"
   Then I should see view "className=android.view.View^^^description=No Record"
    And I click view "description=Add"
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"
    And I press "home" hardware key
    And I press "recent" hardware key
    And I save relative view "className=android.widget.ImageView" on the "right" side of view "text=IndexDB" to object "indexdb_app"
    And I swipe saved object "indexdb_app" to "left"
    And I click app icon "text=IndexDB" in all apps
    And I wait 2 seconds
   Then I should see view "className=android.view.View^^^description=123"
   Then I should see view "className=android.view.View^^^description=Intel"

[misc] Improve bdd steps for webmanu-system-android-tests

Memo Pad8:
Impacted TCs num(approved): New 0, Update 1, Delete 0
Unit test Platform: Crosswalk Project for Android 19.48.487.0
Unit test result summary: Pass 1, Fail 0, Blocked 0

https://crosswalk-project.org/jira/browse/XWALK-6386


Feature: Donating

  Scenario: New User
    Given A pitch exists
    And I view the current pitch page
    And I follow "Donate 20"
    And I follow "REGISTER HERE"
    And I fill in "Your First Name" with "My First Name"
    And I fill in "Your Last Name" with "My Last Name"
    And I fill in "Password" with "password"
    And I fill in "Confirm Password" with "password"
    And I fill in "Your E-mail Address" with "me@example.com"
    And I choose "Community Member"
    And I check "user_terms_of_service"
    And I press "Register"
    And I should see "Click the link in the email we just sent to you to finish creating your account!"
    When I activate my account with email "me@example.com"
    Then I should be on the edit myspot::donation_amounts page
    And I should see "20.00" inside a text field

Feature: Donating

  Scenario: New User Donating 20
    Given A pitch exists
    And I view the current pitch page
    And I follow "Donate 20"
    And I follow "New users: REGISTER HERE"
    And I fill in "Your First Name" with "My First Name"
    And I fill in "Your Last Name" with "My Last Name"
    And I fill in "Password" with "password"
    And I fill in "Confirm Password" with "password"
    And I fill in "Your E-mail Address" with "me@example.com"
    And I choose "Community Member"
    And I check "user_terms_of_service"
    And I press "Register"
    And I should see "Click the link in the email we just sent to you to finish creating your account!"
    When I activate my account with email "me@example.com"
    Then I should be on the edit myspot::donation_amounts page
    And I should see "20.00" inside a text field

# TODO: write this test in culerity if that ever is setup for this project
#  Scenario: New User Donating Variable Amount
#    Given A pitch exists
#    And I view the current pitch page
#    And I follow "Donate another amount"
#    And I follow "REGISTER HERE"
#    And I fill in "Your First Name" with "My First Name"
#    And I fill in "Your Last Name" with "My Last Name"
#    And I fill in "Password" with "password"
#    And I fill in "Confirm Password" with "password"
#    And I fill in "Your E-mail Address" with "me@example.com"
#    And I choose "Community Member"
#    And I check "user_terms_of_service"
#    And I press "Register"
#    And I should see "Click the link in the email we just sent to you to finish creating your account!"
#    When I activate my account with email "me@example.com"
#    Then I should be on the edit myspot::donation_amounts page
#    And I should see "200.00" inside a text field
#

Remove cucumber test as it requires javascript testing, which isn't setup yet


Feature: Checks for the license analysis service

  @smoketest @production
  Scenario: Basic check if the license analysis service is running
    Given System is running
     When I access the license analysis service
     # TODO: this is actually a bug - needs to be resolved later in the service
     Then I should get 200 status code
      And I should receive JSON response with the status key set to ok
     When I acquire the authorization token
     Then I should get the proper authorization token
     When I access the license analysis service with authorization token
     Then I should get 200 status code
      And I should receive JSON response with the status key set to ok

  Scenario Outline: Smoketest if all JSON files with package+license info can be processes by license analysis
    Given System is running
     When I acquire the authorization token
     Then I should get the proper authorization token
     When I send the file <filename> to the license analysis service
     Then I should get 200 status code

     Examples: filenames
     |filename|
     |maven_five_different_packages.json|
     |maven_one_package.json|
     |maven_three_wildfly_packages.json|

Set of smoketests for the license analysis service


Feature: As an bulk extract user, I want to be able to get the state public entities

Scenario: As an bulk extract user, I want to initialize my database with test data.
    Given I am using local data store
    And I am using preconfigured Ingestion Landing Zone for "Midgar-Daybreak"
    And I post "SEAFullDataset.zip" file as the payload of the ingestion job
    And all collections are empty
    When zip file is scp to ingestion landing zone
    And a batch job for file "SEAFullDataset.zip" is completed in database
    And a batch job log has been created
    Then I should see following map of entry counts in the corresponding collections:
      | collectionName                           |              count|
      | calendarDate                             |                821|
      | course                                   |                  6|
      | courseOffering                           |                  6|
      | educationOrganization                    |                  5|
      | gradingPeriod                            |                  6|
      | graduationPlan                           |                  5|
      | session                                  |                  4|

Feature: As an bulk extract user, I want to be able to get the state public entities

Scenario: As an bulk extract user, I want to initialize my database with test data.
    Given I am using local data store
    And I am using preconfigured Ingestion Landing Zone for "Midgar-Daybreak"
    And I post "SEAFullDataset.zip" file as the payload of the ingestion job
    And all collections are empty
    When zip file is scp to ingestion landing zone
    And a batch job for file "SEAFullDataset.zip" is completed in database
    And a batch job log has been created
    Then I should see following map of entry counts in the corresponding collections:
      | collectionName                           |              count|
      | calendarDate                             |                556|
      | course                                   |                  6|
      | courseOffering                           |                  6|
      | educationOrganization                    |                  5|
      | gradingPeriod                            |                  6|
      | graduationPlan                           |                  5|
      | session                                  |                  4|

Use correct count for calendarDate

Use correct count for calendarDate


Feature: Aruba Console

  Background:
    Given a mocked home directory

  Scenario: Start console
    Given I run `aruba console` interactively
    When I close the stdin stream
    Then the output should contain:
    """
    aruba:001:0>
    """

  Scenario: Show help
    Given I run `aruba console` interactively
    And I type "aruba_help"
    When I close the stdin stream
    Then the output should contain:
    """
    Version:
    """
    And the output should contain:
    """
    Issue Tracker:
    """
    And the output should contain:
    """
    Documentation:
    """

  Scenario: Show methods
    Given I run `aruba console` interactively
    And I type "aruba_methods"
    When I close the stdin stream
    Then the output should contain:
    """
    Methods:
    """
    And the output should contain:
    """
    * setup_aruba
    """

  Scenario: Has history
    Given I run `aruba console` interactively
    And I type "aruba_methods"
    And I type "exit"
    When I close the stdin stream
    Then the file "~/.aruba_history" should exist

Feature: Aruba Console

  Background:
    Given a mocked home directory

  Scenario: Start console
    Given I run `aruba console` interactively
    When I close the stdin stream
    Then the output should contain:
    """
    aruba:001:0>
    """

  Scenario: Show help
    Given I run `aruba console` interactively
    And I type "aruba_help"
    When I close the stdin stream
    Then the output should contain:
    """
    Version:
    """
    And the output should contain:
    """
    Issue Tracker:
    """
    And the output should contain:
    """
    Documentation:
    """

  Scenario: Show methods
    Given I run `aruba console` interactively
    And I type "aruba_methods"
    When I close the stdin stream
    Then the output should contain:
    """
    Methods:
    """
    And the output should contain:
    """
    * setup_aruba
    """

  Scenario: Has its own history file
    Given I run `aruba console` interactively
    And I type "IRB.conf[:HISTORY_FILE]"
    And I type "exit"
    When I close the stdin stream
    Then the output should contain:
    """
    ~/.aruba_history
    """

Update scenario to pass on Ruby 2.7

Update scenario to pass on Ruby 2.7

When running under childprocess, IRB does not activate readline. This
means history is not collected and the history file is empty if saved.
In Ruby 2.7, the file is not even written to. This means saving the
history file cannot properly be tested on Ruby 2.7 using Aruba. Instead,
we check that the correct file is configured in IRB, and just assume IRB
will do the right thing with it.


Feature: User can

As a user of the site
So that I provide my event details and start planning for my catering event
I should be able to submit a form with basic information about my event

Scenario:
	Given I am on the Event Inquiry page
	And I fill in "Event Type" with "Wedding"
	And I select "$10pp" from "Budget"
	And I press "Submit"
	Then I should be on the Customize Order page
	And I should see "Mac and Cheese"
	And I should not see "Steak"

Feature: User can

As a user of the site
So that I provide my event details and start planning for my catering event
I should be able to submit a form with basic information about my event

Scenario:
	Given I am on the New Event page
	And I fill in "Name" with "Wedding"
	And I select "10" from "Budget Per Person"
	And I press "Create Event"
	Then I should be on the Customize Order page

Update event planning form cucumber story


Feature: xhtml5
 Scenario: page switching
  When launch "html5-extra-app"
   And I go to "xhtml5/area_noref-manual.xhtml"
   And I click coords 60 and 60 of "src_img"
  Then The current URL should be "xhtml5/area_noref-manual.xhtml"
   And I click coords 10 and 10 of "src_img"
  Then The current URL should be "xhtml5/test-area.xhtml"

Feature: xhtml5
 Scenario: page switching
  When launch "html5-extra-app"
   And I go to "xhtml5/area_noref-manual.xhtml"
   And I click coords 60 and 60 of "src_img"
   And I wait 2 seconds
  Then The current URL should be "xhtml5/area_noref-manual.xhtml"
   And I click coords 10 and 10 of "src_img"
   And I wait 2 seconds
  Then The current URL should be "xhtml5/test-area.xhtml"

[webapi] Add more waiting time for bdd steps in HTML5 Extra

Impacted tests(approved): new 0, update 1, delete 0
Unit test platform: Crosswalk Project for Android 15.44.376.0
Unit test result summary: pass 1, fail 0, block 0

BUG=https://crosswalk-project.org/jira/browse/XWALK-4442


@all_adapters
Feature: Publishing A Message
  Background:
    Given the following broker configuration:
    """ruby
    MessageDriver::Broker.define do |b|
      b.destination :my_queue, "my_queue"
    end
    """

  Scenario: Running within a with_message_transaction block
    When I execute the following code:
    """ruby
    publish(:my_queue, "Test Message")
    """

    Then I expect to find 1 message on :my_queue with:
      | body         |
      | Test Message |

@all_adapters
Feature: Publishing A Message
  Background:
    Given the following broker configuration:
    """ruby
    MessageDriver::Broker.define do |b|
      b.destination :my_queue, "my_queue"
    end
    """

  Scenario: Publishing a message
    When I execute the following code:
    """ruby
    publish(:my_queue, "Test Message")
    """

    Then I expect to find 1 message on :my_queue with:
      | body         |
      | Test Message |

Fix a typo in a feature description

Fix a typo in a feature description


Feature: flapjack-worker
  To be alerted to problems
  A user
  Needs checks executed
  On a regular schedule
  And the results of those checks
  Need to be reported

  Scenario: Start a worker
    Given beanstalkd is running
    When I background run "flapjack-worker"
    Then I should see "flapjack-worker" running
    Then I should see "Waiting for check" in the "flapjack-worker" output

  Scenario: Start a worker without beanstalk running
    Given beanstalkd is not running
    When I background run "flapjack-worker"
    Then I should see "flapjack-worker" running
    Then I should not see "Shutting down" in the "flapjack-worker" output

  Scenario: Beanstalk disappears while worker running
    Given beanstalkd is running
    When I background run "flapjack-worker"
    And beanstalkd is killed
    Then I should see "flapjack-worker" running
    Then I should not see "Shutting down" in the "flapjack-worker" output
    Then I should see "went away" in the "flapjack-worker" output

Test that suitable debug text appears when the beanstalk disappears


Feature: Generator spec

    RSpec spec are normally generated alongside other application components.
    For instance, `rails generate model` will also generate an RSpec spec file
    for the model but you can also use your own generator. See
    [customizing your workflow](https://guides.rubyonrails.org/generators.html#customizing-your-workflow)

    Scenario: Use custom generator without '--generator-specs' arg
        When I run `bundle exec rails generate generator my_generator`
        Then the features should pass
        Then the output should contain:
          """
                create  lib/generators/my_generator
                create  lib/generators/my_generator/my_generator_generator.rb
                create  lib/generators/my_generator/USAGE
                create  lib/generators/my_generator/templates
                invoke  rspec
          """

    Scenario: Use custom generator with '--generator-specs' arg
        When I run `bundle exec rails generate generator my_generator --generator-specs`
        Then the features should pass
        Then the output should contain:
          """
                create  lib/generators/my_generator
                create  lib/generators/my_generator/my_generator_generator.rb
                create  lib/generators/my_generator/USAGE
                create  lib/generators/my_generator/templates
                invoke  rspec
                create    spec/generator/my_generators_generator_spec.rb
          """

Feature: Generator spec

    RSpec spec(s) can be generated when generating application components. For instance, `rails generate model` will also generate an RSpec spec file for the model but you can also write your own generator. See [customizing your workflow](https://guides.rubyonrails.org/generators.html#customizing-your-workflow)

    Scenario: Use custom generator without '--generator-specs' arg
        When I run `bundle exec rails generate generator my_generator`
        Then the features should pass
        Then the output should contain:
          """
                create  lib/generators/my_generator
                create  lib/generators/my_generator/my_generator_generator.rb
                create  lib/generators/my_generator/USAGE
                create  lib/generators/my_generator/templates
                invoke  rspec
          """

    Scenario: Use custom generator with '--generator-specs' arg
        When I run `bundle exec rails generate generator my_generator --generator-specs`
        Then the features should pass
        Then the output should contain:
          """
                create  lib/generators/my_generator
                create  lib/generators/my_generator/my_generator_generator.rb
                create  lib/generators/my_generator/USAGE
                create  lib/generators/my_generator/templates
                invoke  rspec
                create    spec/generator/my_generators_generator_spec.rb
          """

Rephrase few sentences of feature spec

Rephrase few sentences of feature spec


Feature: Developer has defined a supporting class and should not see a silent error
  As a Developer
  I want to see if my supporting class is properly defined
  So that I can better trace where my changes caused a fatal error

  @isolated
  Scenario: Spec attempts to run a class with an undeclared interface, outputs to stdout
    Given the spec file "spec/SomethingSpec.php" contains:
      """
      <?php
        namespace spec;

        use PhpSpec\ObjectBehavior;
        use Prophecy\Argument;

        class SomethingSpec extends ObjectBehavior
        {
            function it_is_initializable()
            {
                $this->shouldHaveType('Something');
            }
        }

        class ExampleClass implements NotDefinedInterface
        {
        }

      """
    And the class file "src/Something.php" contains:
      """
      <?php
      namespace spec;

      class Something
      {
          public function __construct($param)
          {
              if ($param == 'throw') {
                  throw new \Exception();
              }
          }
      }

      """
    When I run phpspec
    Then I should see "Fatal error happened while executing the following"

Add linebreak for PSR standards to feature


Feature: Email signup for documents

  Background:
    Given I am a GDS editor
    And email alert api exists
    And a list of publications exists

  Scenario: Signing up to unfiltered publications alerts
    When I visit the list of publications
    And I sign up for emails
    Then I should be signed up for the all publications mailing list

  Scenario: Signing up to filtered publications alerts
    When I filter the publications list by "Correspondence"
    And I sign up for emails
    Then I should be signed up to the correspondence publications mailing list

  Scenario: Signing up to unfiltered announcement alerts
    When I visit the list of announcements
    And I sign up for emails
    Then I should be signed up for the all announcements mailing list

  Scenario: Signing up to filtered announcement alerts
    When I filter the announcements list by "News stories"
    And I sign up for emails
    Then I should be signed up for the news stories mailing list

Feature: Email signup for documents

  Background:
    Given I am a GDS editor
    And email alert api exists
    And a list of publications exists

  @not-quite-as-fake-search
  Scenario: Signing up to unfiltered publications alerts
    When I visit the list of publications
    And I sign up for emails
    Then I should be signed up for the all publications mailing list

  @not-quite-as-fake-search
  Scenario: Signing up to filtered publications alerts
    When I filter the publications list by "Correspondence"
    And I sign up for emails
    Then I should be signed up to the correspondence publications mailing list

  Scenario: Signing up to unfiltered announcement alerts
    When I visit the list of announcements
    And I sign up for emails
    Then I should be signed up for the all announcements mailing list

  Scenario: Signing up to filtered announcement alerts
    When I filter the announcements list by "News stories"
    And I sign up for emails
    Then I should be signed up for the news stories mailing list

Update email sign up tests

Update email sign up tests


@routing @car @names
Feature: Car - Street names in instructions

    Background:
        Given the profile "car"

    Scenario: Car - A named street
        Given the node map
            | a | b |
            |   | c |

        And the ways
            | nodes | name     |
            | ab    | My Way   |
            | bc    | Your Way |

        When I route I should get
            | from | to | route           |
            | a    | c  | My Way,Your Way |

    @todo
    Scenario: Car - Use way type to describe unnamed ways
        Given the node map
            | a | b | c | d |

        And the ways
            | nodes | highway     | name |
            | ab    | tertiary    |      |
            | bcd   | residential |      |

        When I route I should get
            | from | to | route                |
            | a    | c  | tertiary,residential |

@routing @car @names
Feature: Car - Street names in instructions

    Background:
        Given the profile "car"

    Scenario: Car - A named street
        Given the node map
            | a | b |
            |   | c |

        And the ways
            | nodes | name     | ref |
            | ab    | My Way   |     |
            | bc    | Your Way | A1  |

        When I route I should get
            | from | to | route                |
            | a    | c  | My Way,Your Way (A1) |

    @todo
    Scenario: Car - Use way type to describe unnamed ways
        Given the node map
            | a | b | c | d |

        And the ways
            | nodes | highway     | name |
            | ab    | tertiary    |      |
            | bcd   | residential |      |

        When I route I should get
            | from | to | route                |
            | a    | c  | tertiary,residential |

Add test to check new way naming convention


Feature: Stack analysis v2 API

  Scenario: Check that the API entry point
    Given System is running
    When I access /api/stack-analyses-v2
    Then I should get 404 status code

  Scenario: Check that the API entry point accepts manifest
    Given System is running
    When I wait 20 seconds
    When I send Python package manifest requirements.txt to stack analysis version 2
    Then I should get 200 status code

  Scenario: Check that the stack analysis response
    Given System is running
    When I send Python package manifest requirements.txt to stack analysis version 2
    Then I should get 200 status code
    Then I should receive JSON response containing the status key
    Then I should receive JSON response containing the id key
    Then I should receive JSON response containing the submitted_at key
    Then I should receive JSON response with the status key set to success
    Then I should receive JSON response with the correct id
    Then I should receive JSON response with the correct timestamp in attribute submitted_at

  Scenario: Check if the stack analysis is finished
    Given System is running
    When I send Python package manifest requirements.txt to stack analysis version 2
    Then I should get 200 status code
    When I wait for stack analysis version 2 to finish
    Then I should get 200 status code

Use the new test step

Use the new test step


Feature: NuBit change is not reported as a transaction

  Scenario: Sending NuBits generates a single transaction
    Given a network with nodes "Alice", "Bob" and "Custodian" able to mint
    When node "Custodian" generates a "NuBit" address "cust"
    And node "Alice" votes an amount of "1,000,000" for custodian "cust"
    And node "Alice" finds blocks until custodian "cust" is elected
    And node "Bob" generates a "NuBit" address "bob"
    And all nodes reach the same height
    And some time pass
    And node "Custodian" sends "1000" NuBits to "bob"
    Then node "Custodian" should have 2 NuBit transactions
    And the 2nd transaction sould be a send of "1000" to "bob"
    And node "Bob" should reach an unconfirmed balance of "1000" NuBits
    And node "Bob" should have 1 NuBit transactions
    And the 1st transaction sould be a receive of "1000" to "bob"

Feature: NuBit change is not reported as a transaction

  Scenario: Sending NuBits generates a single transaction
    Given a network with nodes "Alice", "Bob" and "Custodian" able to mint
    When node "Custodian" generates a "NuBit" address "cust"
    And node "Alice" votes an amount of "1,000,000" for custodian "cust"
    And node "Alice" finds blocks until custodian "cust" is elected
    And node "Bob" generates a "NuBit" address "bob"
    And all nodes reach the same height
    And some time pass
    And node "Custodian" sends "1000" NuBits to "bob"
    Then node "Custodian" should have 2 NuBit transactions
    And the 2nd transaction sould be a send of "1000" to "bob"
    And node "Custodian" should have a balance of "998,999.99" NuBits
    And node "Bob" should reach an unconfirmed balance of "1000" NuBits
    And node "Bob" should have 1 NuBit transactions
    And the 1st transaction sould be a receive of "1000" to "bob"
    And all nodes should have 1 transaction in memory pool

    When node "Alice" finds a block
    And all nodes reach the same height
    Then node "Custodian" should have a balance of "998,999.99" NuBits
    And node "Bob" should have a balance of "1000" NuBits

Check sending nubits get confirmed

Check sending nubits get confirmed


Feature: Caching of annotation information
  In order to increase the performance of the system and allow opcode caching
  As a systems administrator
  I want to be able cache the resource class metadata on my production server

  Scenario: Load a resource and execute a method via preloaded resource metadata
    Given the request URI of "/cache"
    And I set the request option "resources" to:
      """
      {
        "Cache": {
          "uri": "|^/cache$|",
          "method": {
            "method1": {
              "method": "GET"
            }
          }
        }
      }
      """
    When I create a request object
    And a the class definition:
      """
      class Cache extends Tonic\Resource {
        function method1() {
          return 'cache';
        }
      }
      """
    And load the resource
    And execute the resource
    Then the loaded resource should have a class of "Cache"
    And response should be "cache"

Feature: Caching of annotation information
  In order to increase the performance of the system and allow opcode caching
  As a systems administrator
  I want to be able cache the resource class metadata on my production server

  Scenario: Load a resource and execute a method via preloaded resource metadata
    Given the request URI of "/cache"
    And I set the request option "resources" to:
      """
      {
        "Cache": {
          "uri": "|^/cache$|",
          "methods": {
            "method1": {
              "method": "GET"
            }
          }
        }
      }
      """
    When I create a request object
    And a the class definition:
      """
      class Cache extends Tonic\Resource {
        function method1() {
          return 'cache';
        }
      }
      """
    And load the resource
    And execute the resource
    Then the loaded resource should have a class of "Cache"
    And response should be "cache"

Fix cache test after renaming resource metadata "method" to "methods" to make it clearer that it contains the metadata of the resources methods


Feature: Creating a new genomer project
  In order to build a genome
  A user can create a new genomer project
  So that they can use the genomer commands and organise their data

  Scenario: Creating a new project
    When I run the genomer command with the arguments "init project"
    Then the exit status should be 0
    And a directory named "project" should exist
    And a directory named "project/assembly" should exist

  Scenario: Creating a new project where the directory already exists
    Given a directory named "project"
    When I run the genomer command with the arguments "init project"
    Then the exit status should be 1
    And the stderr should contain:
    """
    Error. Directory 'project' already exists.
    """

Feature: Creating a new genomer project
  In order to build a genome
  A user can create a new genomer project
  So that they can use the genomer commands and organise their data

  Scenario: Creating a new project
    When I run the genomer command with the arguments "init project"
    Then the exit status should be 0
    And a directory named "project" should exist
    And a directory named "project/assembly" should exist
    And a file named "project/assembly/scaffold.yml" should exist
    And a file named "project/assembly/sequence.fna" should exist
    And a file named "project/assembly/annotations.gff" should exist

  Scenario: Creating a new project where the directory already exists
    Given a directory named "project"
    When I run the genomer command with the arguments "init project"
    Then the exit status should be 1
    And the stderr should contain:
    """
    Error. Directory 'project' already exists.
    """

Add features for assembly files

Add features for assembly files


Feature: Teacher can see project specific links

  As a teacher
  I should see project specific links
  In order to access custom information per project

  Background:
  Given The default settings and jnlp resources exist using factories
    And the database has been seeded
    And the default project links exist using factories
    And I am logged in with the username teacher

  @javascript
  Scenario: Teacher not in project visits homepage
    When I am on getting started page
    Then I should not see a project link labeled "Foo Project Link"
      And I should not see a project link labeled "Bar Project Link"

  Scenario: Teacher in project visits homepage
    Given the "teacher" user is added to the default project
    When I am on getting started page
    Then I should see a project link labeled "Foo Project Link" linking to "http://foo.com"
      And I should see a project link labeled "Bar Project Link" linking to "http://bar.com"

Feature: Teacher can see project specific links

  As a teacher
  I should see project specific links
  In order to access custom information per project

  Background:
  Given The default settings and jnlp resources exist using factories
    And the database has been seeded
    And the default project links exist using factories
    And I am logged in with the username teacher

  @javascript
  Scenario: Teacher not in project visits homepage
    When I am on getting started page
    Then I should not see a project link labeled "Foo Project Link"
      And I should not see a project link labeled "Bar Project Link"

  @javascript
  Scenario: Teacher in project visits homepage
    Given the "teacher" user is added to the default project
    When I am on getting started page
    Then I should see a project link labeled "Foo Project Link" linking to "http://foo.com/"
      And I should see a project link labeled "Bar Project Link" linking to "http://bar.com/"

Fix:  Make navigation feature require javascript.

[#158595244]
https://www.pivotaltracker.com/story/show/158595244

Configure Travis CI to test agains't different versions of portal pages


@companies-omis-collection @collection
Feature: View collection of orders for a company

  @companies-omis-collection--view
  Scenario: View companies OMIS collection
    When I navigate to the `companies.orders` page using `company` `Lambda plc` fixture
    And the results summary for a order collection is present

  @companies-omis-collection--view--da
  Scenario: View companies OMIS collection as DA
    When I navigate to the `companies.orders` page using `company` `Lambda plc` fixture
    And the results summary for a order collection is present

  @companies-omis-collection--filter # TODO

  @companies-omis-collection--sort # TODO

  @companies-omis-collection--lep @lep
  Scenario: Navigate to OMIS as LEP
    When I navigate to the `companies.orders` page using `company` `Lambda plc` fixture
    Then I see the 403 error page

@companies-omis-collection @collection
Feature: View collection of orders for a company

  @companies-omis-collection--view--da
  Scenario: View companies OMIS collection as DA
    When I navigate to the `companies.orders` page using `company` `Lambda plc` fixture
    And the results summary for a order collection is present

  @companies-omis-collection--lep @lep
  Scenario: Navigate to OMIS as LEP
    When I navigate to the `companies.orders` page using `company` `Lambda plc` fixture
    Then I see the 403 error page

Remove migrated tests from feature file to cypress


# Copyright (c) 2016 SUSE LLC
# Licensed under the terms of the MIT license.

Feature: Test the remote commands via salt for redhat minion
  In Order to test the remote commands via salt
  As an authorized user
  I want to verify that the remote commands function works for centos minion

  Scenario: Run a remote command on centos
    Given I am authorized as "testing" with password "testing"
    And I follow "Salt"
    And I follow "Remote Commands"
    And I should see a "Remote Commands" text
    Then I enter command "cat /etc/os-release"
    And I click on preview
    Then I should see "ceos-minion" hostname
    And I click on run
    Then I wait for "3" seconds
    And I expand the results for "ceos-minion"
    And I should see a "rhel fedora" text
    Then I should see a "REDHAT_SUPPORT_PRODUCT" text

# Copyright (c) 2016 SUSE LLC
# Licensed under the terms of the MIT license.

Feature: Test the remote commands via salt for redhat minion
  In Order to test the remote commands via salt
  As an authorized user
  I want to verify that the remote commands function works for centos minion

  Scenario: Run a remote command on centos
    Given I am authorized as "testing" with password "testing"
    And I follow "Salt"
    And I follow "Remote Commands"
    And I should see a "Remote Commands" text
    Then I enter command "cat /etc/os-release"
    And I click on preview
    Then I wait for "5" seconds
    And I click on run
    Then I should see "ceos-minion" hostname
    Then I wait for "15" seconds
    And I expand the results for "ceos-minion"
    And I should see a "rhel fedora" text
    Then I should see a "REDHAT_SUPPORT_PRODUCT" text

Increase timeout for avoiding racing condition


Feature: Update bundle with approximate versions
  As a developer
  In order to avoid updating fixed versions very often
  I want to have approximate versions

  Background: A project with approximate dependency versions
    Given a Gemfile specifying:
      """
      gem 'foo', '~> 1.0.0'
      """
    And a gem named "foo" at version 1.0.0
    When I run `bundle install`
    Then the output should contain:
      """
      Using foo 1.0.0
      """
    When I run `git init`
    And I run `git add .`
    And I run `git ci -am 'Initial'`

  Scenario: Updating to a version that matches the current spec
    Given a gem named "foo" at version 1.0.1
    When I run `keep_up --test-command true`
    Then the output should contain:
      """
      Updating foo to 1.0.1
      """
    And the file "Gemfile" should contain:
      """
      path 'libs'

      gem 'foo', '~> 1.0.0'
      """
    And the file "Gemfile.lock" should contain:
      """
      foo (1.0.1)
      """

  Scenario: Updating to a version that exceeds the current spec
    Given a gem named "foo" at version 1.1.2
    When I run `keep_up --test-command true`
    Then the output should contain:
      """
      Updating foo to 1.1.2
      """
    And the file "Gemfile" should contain:
      """
      path 'libs'

      gem 'foo', '~> 1.1.2'
      """
    And the file "Gemfile.lock" should contain:
      """
      foo (1.1.2)
      """

Feature: Update bundle with approximate versions
  As a developer
  In order to avoid updating fixed versions very often
  I want to have approximate versions

  Background: A project with approximate dependency versions
    Given a Gemfile specifying:
      """
      gem 'foo', '~> 1.0.0'
      """
    And a gem named "foo" at version 1.0.0
    And the initial bundle install committed

  Scenario: Updating to a version that matches the current spec
    Given a gem named "foo" at version 1.0.1
    When I run `keep_up --test-command true`
    Then the output should contain:
      """
      Updating foo to 1.0.1
      """
    And the file "Gemfile" should contain:
      """
      path 'libs'

      gem 'foo', '~> 1.0.0'
      """
    And the file "Gemfile.lock" should contain:
      """
      foo (1.0.1)
      """

  Scenario: Updating to a version that exceeds the current spec
    Given a gem named "foo" at version 1.1.2
    When I run `keep_up --test-command true`
    Then the output should contain:
      """
      Updating foo to 1.1.2
      """
    And the file "Gemfile" should contain:
      """
      path 'libs'

      gem 'foo', '~> 1.1.2'
      """
    And the file "Gemfile.lock" should contain:
      """
      foo (1.1.2)
      """

Simplify scenario setup using custom step, again


Feature: SMPTE-related attribute constraints
  Scenario: Valid SMPTE head attributes
    Given an xml file <xml_file>
    And it has frameRate <frame_rate>
    And it has timeBase <time_base>
    Then document is valid

    Examples:
    | xml_file   | frame_rate | time_base |
    | smpte.xml  | 25         | smpte     |
    | smpte.xml  | 20         | smpte     |

  # These tests are not all passing because the missing semantic validation piece
  @skip
  Scenario: Invalid SMPTE head attributes
    Given an xml file <xml_file>
    And it has frameRate <frame_rate>
    And it has timeBase <time_base>
    Then document is invalid

    Examples:
    | xml_file   | frame_rate | time_base |
    | smpte.xml  |            | smpte     |
    | smpte.xml  | 25         | clock     |

Feature: SMPTE-related attribute constraints
  Scenario: Valid SMPTE head attributes
    Given an xml file <xml_file>
    And it has frameRate <frame_rate>
    And it has timeBase <time_base>
    Then document is valid

    Examples:
    | xml_file   | frame_rate | time_base |
    | smpte.xml  | 25         | smpte     |
    | smpte.xml  | 20         | smpte     |

  # These tests are not all passing because of the missing semantic validation piece
  @skip
  Scenario: Invalid SMPTE head attributes
    Given an xml file <xml_file>
    And it has frameRate <frame_rate>
    And it has timeBase <time_base>
    Then document is invalid

    Examples:
    | xml_file   | frame_rate | time_base |
    | smpte.xml  |            | smpte     |
    | smpte.xml  | 25         | clock     |

Fix small typo in comment

Fix small typo in comment


@javascript
Feature: Manage Posts
  As a User
  I want to be able to manage Posts (CRUD)

  Background:
    Given the Test User exists
      And I have a Test Post
      And I am signed in as Test User
#      And I am on the posts page

  Scenario: New Post
    Given I am on the New Post page
    When I write a Post
    Then I should see my New Post

  Scenario: Edit Post
    Given I am on the Edit Post page
    When I edit the Test Post
    Then I should see the Test Post changed

  Scenario: Delete Posts
    When I delete the Test Post
    Then I should not see the Test Post

  Scenario: Navigate to New Post
    When I navigate to New Post
    Then I should see the New Post page

  Scenario: Navigate to Edit Post
    When I navigate to Edit Post
    Then I should see the Edit Post page

@javascript
Feature: Manage Posts
  As a User
  I want to be able to manage Posts (CRUD)

  Background:
    Given the Test User exists
      And I have a Test Post
      And I am signed in as Test User

  Scenario: New Post
    Given I am on the New Post page
    When I write a Post
    Then I should see my New Post

  Scenario: Edit Post
    Given I am on the Edit Post page
    When I edit the Test Post
    Then I should see the Test Post changed

  Scenario: Delete Posts
    When I delete the Test Post
    Then I should not see the Test Post

  Scenario: Navigate to New Post
    When I navigate to New Post
    Then I should see the New Post page

  Scenario: Navigate to Edit Post
    When I navigate to Edit Post
    Then I should see the Edit Post page

Remove commented step in Manage Posts cucumber


Feature: Landing on squares
  As a user
  I should see outcomes when landing on squares

  Background:
    Given I have a user
    And there is another user
    And I am in a game

  Scenario: Landing on Income Tax
    Given It is my turn
    When I land on Income Tax
    # This only tests the -$200, not the -15%
    And I should lose $200

  Scenario: Landing on Super Tax
    Given It is my turn
    When I land on Super Tax
    Then I should lose $100

  Scenario: Passing Go
    Given It is my turn
    When I pass Go
    Then I should gain go money

  Scenario: Landing on Go
    Given It is my turn
    When I land on Go
    Then I should gain go money

Feature: Landing on squares
  As a user
  I should see outcomes when landing on squares

  Background:
    Given I have a user
    And there is another user
    And I am in a game

  Scenario: Landing on Income Tax
    Given It is my turn
    When I land on Income Tax
    # This only tests the -$200, not the -15%
    Then I should lose $200

  Scenario: Landing on Super Tax
    Given It is my turn
    When I land on Super Tax
    Then I should lose $100

  Scenario: Passing Go
    Given It is my turn
    When I pass Go
    Then I should gain go money

  Scenario: Landing on Go
    Given It is my turn
    When I land on Go
    Then I should gain go money

Fix language in a cuke feature

Fix language in a cuke feature


Feature: Test Case Starting Event

  This event is fired just before each scenario or scenario outline example row
  (generally named a Test Case) starts to be executed. This event is read-only.

  See [the API documentation](http://www.rubydoc.info/github/cucumber/cucumber-ruby/Cucumber/Events/TestCaseStarting) for more information about the data available on this event and the result object.

  Background:
    Given the standard step definitions
    And a file named "features/test.feature" with:
      """
      Feature: A feature

        Scenario: A passing scenario
          Given this is a step
      """
    And a file named "features/support/events.rb" with:
      """
      stdout = nil
      AfterConfiguration do |config|
        stdout = config.out_stream # make sure all the `puts` calls can write to the same output
        config.on_event :test_case_starting do |event|
          stdout.puts "before"
        end
        config.on_event :test_case_finished do |event|
          stdout.puts "after"
        end
      end

      Given(/this is a step/) do
      end

      """

  Scenario: Run the test case
    When I run `cucumber -q`
    Then it should pass with:
      """
      before
      Feature: A feature

        Scenario: A passing scenario
          Given this is a step
      after
      """

@wip
Feature: Test Case Starting Event

  This event is fired just before each scenario or scenario outline example row
  (generally named a Test Case) starts to be executed. This event is read-only.

  See [the API documentation](http://www.rubydoc.info/github/cucumber/cucumber-ruby/Cucumber/Events/TestCaseStarting) for more information about the data available on this event and the result object.

  Background:
    Given the standard step definitions
    And a file named "features/test.feature" with:
      """
      @feature
      Feature: A feature

        @scenario
        Scenario: A passing scenario
          Given this is a step
      """
    And a file named "features/support/events.rb" with:
      """
      stdout = nil
      AfterConfiguration do |config|
        stdout = config.out_stream # make sure all the `puts` calls can write to the same output
        config.on_event :test_case_starting do |event|
          stdout.puts "before"
          stdout.puts event.test_case.tags.map(&:name)
        end
        config.on_event :test_case_finished do |event|
          stdout.puts "after"
        end
      end

      Given(/this is a step/) do
      end

      """

  Scenario: Run the test case
    When I run `cucumber -q`
    Then it should pass with:
      """
      before
      @feature
      @scenario
      @feature
      Feature: A feature

        @scenario
        Scenario: A passing scenario
          Given this is a step
      after
      """

Test that tags are available in the before_test_case event


Feature: Modify spec helper
  Background:
    Given a file named "foo.raml" like "basic_raml.raml"

  Scenario: JSON and rack/test are required
    Given a spec_helper.rb file that requires both JSON and rack/test
    When I run `rambo foo.raml`
    Then the file "spec/spec_helper.rb" should be like "good_spec_helper.rb.ex"

  Scenario: Only JSON is required
    Given a spec_helper.rb file that requires JSON but not rack/test
    When I run `rambo foo.raml`
    Then the file "spec/spec_helper.rb" should be like "spec_helper_rack_test_added.rb.ex"

  Scenario: Only rack/test is required
    Given a spec_helper.rb file that requires rack/test but not JSON
    When I run `rambo foo.raml`
    Then the file "spec/spec_helper.rb" should be like "spec_helper_json_added.rb.ex"

Add whitespace to make consistent w/other feature files


Feature: Node search

Background:
  Given a Chef server populated with following data:
    """json
      {
        "nodes": {
          "some-node-name": {
            "automatic": {
              "fqdn": "some-node-name.example.com",
              "ipaddress": "1.2.3.4",
              "tags": ["test", "db"],
              "environment": "production"
            }
          },
          "another-node-name": {
            "automatic": {
              "fqdn": "another-node-name.example.com",
              "ipaddress": "1.2.3.5",
              "tags": ["test"],
              "environment": "production"
            }
          }
        }
      }
    """

Scenario: Search results
  When I visit "/nodes"
  And I search for "name:some"
  Then I am at "/nodes"
  And I can see "Search results (1)"

Scenario: No search results found
  When I visit "/nodes"
  And I search for "ipaddress:5.6.7.8"
  Then I am at "/nodes"
  And I can see "No matching results found"

Scenario: Search similar nodes
  When I visit "/node/some-node-name"
  And I click on "db"
  Then I am at "/nodes"
  And I can see "Search results (1)"
  And I can see "some-node-name"

Scenario: make sure search box quotes properly
  When I visit "/nodes"
  And I search for "name:so"></html>""
  Then I am at "/nodes"
  And I can see "No matching results found"
  # This means that we have failed to inject the closing tag.

Add test case to ensure we quote query string right in value="" parameter.


Feature: User login
  In order to login
  As a user
  I need to be able to provide a username and password

  Rules:
  - Username and password are both required
  - The user is only allowed through if the username and password are both correct

  Scenario: Failing to provide a username
    Given I provide a password
    But I do not provide a username
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Failing to provide a password
    Given I provide a username
    But I do not provide a password
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Providing an incorrect username-password combination
    Given the following users exist in the database:
        | username | password |
        | Bob      | MrTomato |
    And I provide a username of "Bob"
    But I provide a password of "MrsAsparagus"
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Providing a correct username-password combination
    Given the following users exist in the database:
        | username | password |
        | Bob      | MrTomato |
    And I provide a username of "Bob"
    And I provide a password of "MrTomato"
    When I try to login
    Then I should not see an error message
    And I should be allowed through

Feature: User login
  In order to login
  As a user
  I need to be able to provide a username and password

  Rules:
  - Username and password are both required
  - The user is only allowed through if the username and password are both correct

  Scenario: Failing to provide a username
    Given I provide a password
    But I do not provide a username
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Failing to provide a password
    Given I provide a username
    But I do not provide a password
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Providing an incorrect username-password combination
    Given the following users exist in the database:
        | username | password | login_attempts |
        | Bob      | MrTomato | 0              |
    And I provide a username of "Bob"
    But I provide a password of "MrsAsparagus"
    When I try to login
    Then I should see an error message
    And I should not be allowed through

  Scenario: Providing a correct username-password combination
    Given the following users exist in the database:
        | username | password | login_attempts |
        | Bob      | MrTomato | 0              |
    And I provide a username of "Bob"
    And I provide a password of "MrTomato"
    When I try to login
    Then I should not see an error message
    And I should be allowed through

  Scenario: Providing too many incorrect username-password combinations
    Given the following users exist in the database:
        | username | password | login_attempts |
        | Bob      | MrTomato | 0              |
    When I try to login using "Bob" and "MrsAsparagus" too many times
    Then I should see an error message with "wait" in it
    And that user account should be blocked for awhile
    And I should not be allowed through

Update feature to describe desired rate limiting.


Feature: Help Me I've Got Versionitis

  Scenario: get help for the main script

    When I get help for "git-semaphore"
    Then the exit status should be 0
     And the banner should be present
     And the banner should include the version
     And the banner should document that this app takes options
     And the following options should be documented:
       |--version, -v:|
       |--help, -h:|
       |--check-auth, -a:|
       |--check-project, -p:|

  Scenario: get the version of the main script

    When I get the version of "git-semaphore"
    Then the exit status should be 0
     And the output should include the version
     And the output should include the app name
     And the output should include a copyright notice

Feature: Help Me I've Got Versionitis

  Scenario: get help for the main script

    When I get help for "git-semaphore"
    Then the exit status should be 0
     And the banner should be present
     And the banner should include the version
     And the banner should document that this app takes options
     And the following options should be documented:
       |--version, -v:|
       |--help, -h:|
       |--check-auth, -a:|
       |--check-project, -p:|
       |--print-config, -c:|

  Scenario: get the version of the main script

    When I get the version of "git-semaphore"
    Then the exit status should be 0
     And the output should include the version
     And the output should include the app name
     And the output should include a copyright notice

Add missing option to the feature

Add missing option to the feature


Feature: Berp Grammar

Scenario: The Berp grammar parser can parse itself
	Given the input source from 'BerpGrammarParserForTest\BerpGrammar.berp'
	When the input source is parsed with the BerpGrammarParserForTest parser
	Then the parsing should be successful

Scenario: Lookahead with no skip tokens
	Given the input source
		"""
		[
			Tokens -> #A,#B,#C
		]

		Grammar := (B | C)+
		B [->#B]:= (#A | #B)
		C := (#A | #C)
		"""
	When the input source is compiled with the BerpGrammarParserForTest parser
	Then the parsing should be successful

Feature: Berp Grammar

Scenario: The Berp grammar parser can parse itself
	Given the input source from 'BerpGrammarParserForTest\BerpGrammar.berp'
	When the input source is parsed with the BerpGrammarParserForTest parser
	Then the parsing should be successful

Scenario Outline: Lookahead with no skip tokens
	Given the input source
		"""
		[
			Tokens -> #A,#B1,#B2,#C
		]

		Grammar := (B | C)+
		B [-><expected>]:= (#A | #B1 | #B2)
		C := (#A | #C)
		"""
	When the input source is compiled with the BerpGrammarParserForTest parser
	Then the parsing should be successful
Examples:
	| description       | expected   |
	| single expected   | #B1        |
	| multiple expected | #B1 \| #B2 |

Add test for multiple expected token for lookahead


Feature: command/update

  Background:
    Given user "participant1" exists

  Scenario: Create a public room with message expiration time and update removing the expiration time
    Given invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --message-expiration=3"
    And the command output contains the text "Room successfully updated"
    And the command was successful
    And user "participant1" is participant of the following rooms (v4)
      | name  | messageExpiration |
      | room1 | 3                 |

Feature: command/update

  Background:
    Given user "participant1" exists

  Scenario: Create a public room with message expiration time and update removing the expiration time
    Given invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --message-expiration=3"
    And user "participant1" is participant of the following rooms (v4)
      | name  | messageExpiration |
      | room1 | 3                 |
    And the command output contains the text "Room successfully created"
    And the command was successful
    And invoking occ with "talk:room:update room-name:room1 --message-expiration=0"
    And the command output contains the text "Room successfully updated"
    And the command was successful
    And user "participant1" is participant of the following rooms (v4)
      | name  | messageExpiration |
      | room1 | 0                 |
    And invoking occ with "talk:room:update room-name:room1 --message-expiration=4"
    And the command output contains the text "Room successfully updated"
    And the command was successful
    And user "participant1" is participant of the following rooms (v4)
      | name  | messageExpiration |
      | room1 | 4                 |

Update more times to check if really worked

Signed-off-by: Vitor Mattos <ddd80347cc894536655615ccf7805ebc23683866@php.rio>


@RALLY_US4835
@rc
Feature:  RC Integration CleanUp Tests

Background:
  Given I have an open web browser

Scenario:  LEA deletes realm
  When I navigate to the Portal home page
  When I selected the realm "inBloom"
  And I was redirected to the "Simple" IDP Login page
  When I submit the credentials "<SECONDARY_EMAIL>" "<SECONDARY_EMAIL_PASS>" for the "Simple" login page
  Then I should be on Portal home page
  Then I should see Admin link
  And I click on Admin
  Then I should be on the admin page
  And under System Tools, I click on "Manage Realm"
  And I switch to the iframe
  Then I see the realms for "IL-DAYBREAK"
  When I click the "Daybreak Test Realm" delete button and confirm deletion
  And I switch to the iframe
  And I should receive a notice that the realm was successfully "deleted"
  Then I see the realms for "IL-DAYBREAK"
  And I exit out of the iframe
  And I click on log out

Scenario: slcoperator deletes SEA,LEA
  When I navigate to the user account management page
  And I see the realm selector I authenticate to "inBloom"
  Then I am redirected to "Simple" login page
  When I submit the credentials "slcoperator" "slcoperator1234" for the "Simple" login page
  Then I delete the user "RCTestSeaAdminFN RCTestSeaAdminLN"
  Then I delete the user "RCTestLeaAdminFN RCTestLeaAdminLN"

@RALLY_US4835
@rc
Feature:  RC Integration CleanUp Tests

Background:
  Given I have an open web browser

Scenario:  LEA deletes realm
  When I navigate to the Portal home page
  When I selected the realm "inBloom"
  And I was redirected to the "Simple" IDP Login page
  When I submit the credentials "<SECONDARY_EMAIL>" "<SECONDARY_EMAIL_PASS>" for the "Simple" login page
  Then I should be on Portal home page
  Then I should see Admin link
  And I click on Admin
  Then I should be on the admin page
  And under System Tools, I click on "Manage Realm"
  And I switch to the iframe
  Then I see the realms for "IL-DAYBREAK"
  When I click the "Daybreak Test Realm" delete button and confirm deletion
  And I switch to the iframe
  Then I see the realms for "IL-DAYBREAK"
  And I exit out of the iframe
  And I click on log out

Scenario: slcoperator deletes SEA,LEA
  When I navigate to the user account management page
  And I see the realm selector I authenticate to "inBloom"
  Then I am redirected to "Simple" login page
  When I submit the credentials "slcoperator" "slcoperator1234" for the "Simple" login page
  Then I delete the user "RCTestSeaAdminFN RCTestSeaAdminLN"
  Then I delete the user "RCTestLeaAdminFN RCTestLeaAdminLN"

Fix e2e test cleanup expectations, part deux


Feature: Check for no issues_url

  In order to be able to upload my cookbook
  As a developer
  I want to be notified when my cookbook metadata does not specify the issues_url

  Scenario: Metadata without a issues_url
    Given a cookbook with metadata that does not include a issues_url keyword
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be shown against the metadata file

  Scenario: Metadata with a issues_url
    Given a cookbook with metadata that includes a issues_url keyword
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be not shown against the metadata file

  Scenario: Metadata with a issues_url that is an expression
    Given a cookbook with metadata that includes a issues_url expression
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be not shown against the metadata file

  Scenario: Cookbook without metadata file
    Given a cookbook that does not have defined metadata
    When I check the cookbook
    Then the metadata missing issues_url warning 064 should be not shown against the metadata file

Feature: Check for no issues_url

  In order to be able to share my cookbook on the Supermarket
  As a developer
  I want to be notified when my cookbook metadata does not specify the issues_url

  Scenario: Metadata without a issues_url
    Given a cookbook with metadata that does not include a issues_url keyword
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be shown against the metadata file

  Scenario: Metadata with a issues_url
    Given a cookbook with metadata that includes a issues_url keyword
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be not shown against the metadata file

  Scenario: Metadata with a issues_url that is an expression
    Given a cookbook with metadata that includes a issues_url expression
     When I check the cookbook
     Then the metadata missing issues_url warning 064 should be not shown against the metadata file

  Scenario: Cookbook without metadata file
    Given a cookbook that does not have defined metadata
    When I check the cookbook
    Then the metadata missing issues_url warning 064 should be not shown against the metadata file

Clarify the motivation for rule 064

Clarify the motivation for rule 064

This is for people who want to share thier cookbooks on the Supermarket


Feature: Creating a git commit from a Pivotal Tracker story
  Background:
    Given a file named "tmp/global_settings.yml" with "pivotal_tracker_api_key: my_api_key"

  Scenario: If there are no stories, the command fails
    Given there are no stories

    When I run `geordi commit`
    Then the output should contain "No stories to offer."

  Scenario: Extra arguments are forwarded to "git commit"
    Given I have staged changes

    When I run `geordi commit --extra-option` interactively
      # No optional message
      And I type ""
    Then the output should contain "Util.run! git, commit, --allow-empty, -m, [#12] Test Story, --extra-option"

  Scenario: With no staged changes, a warning is printed
    When I run `geordi commit --allow-empty` interactively
      # No optional message
      And I type ""
    Then the output should contain "> No staged changes. Will create an empty commit."

  Scenario: Without a global config file, the user is prompted for their PT API key
    Given I remove the file "tmp/global_settings.yml"
    When I run `geordi commit` interactively
      And I type "my_api_key"
      And I type "optional message"
    Then the file "tmp/global_settings.yml" should contain "pivotal_tracker_api_key: my_api_key"

Feature: Creating a git commit from a Pivotal Tracker story
  Background:
    Given a file named "tmp/global_settings.yml" with "pivotal_tracker_api_key: my_api_key"

  Scenario: If there are no stories, the command fails
    Given there are no stories

    When I run `geordi commit`
    Then the output should contain "No stories to offer."

  Scenario: Extra arguments are forwarded to "git commit"
    Given I have staged changes

    When I run `geordi commit --extra-option` interactively
      # No optional message
      And I type ""
    Then the output should contain "Util.run! git, commit, --allow-empty, -m, [#12] Test Story, --extra-option"

  Scenario: With no staged changes, a warning is printed
    When I run `geordi commit --allow-empty` interactively
      And I type "optional message"
    Then the output should contain "> No staged changes. Will create an empty commit."

  Scenario: Without a global config file, the user is prompted for their PT API key
    Given I remove the file "tmp/global_settings.yml"
    When I run `geordi commit` interactively
      And I type "my_api_key"
      And I type "optional message"
    Then the file "tmp/global_settings.yml" should contain "pivotal_tracker_api_key: my_api_key"

  Scenario: It does not crash on an empty config file
    Given a file named "tmp/local_settings.yml" with ""

    When I run `geordi commit` interactively
      And I type "optional message"
    Then the output should contain "Util.run! git, commit, --allow-empty, -m, [#12] Test Story - optional message"

Check that Geordi does not crash on an empty config file

This was a bug report, but apparently the current version of Geordi is not
affected.