@api @data_kitten
Feature: Rerun autogenerated certificates

  Background:
    Given I am signed in as the API user
    And I want to create a certificate via the API
    And I apply a campaign "brian"
    And the field "publisherUrl" is missing from my metadata
    And my URL autocompletes via DataKitten

  Scenario: Rerun an autogenerated certificate with new data
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "0 certificates published"
    When I add the field "publisherUrl" with the value "http://example.com" to my metadata
    And my URL autocompletes via DataKitten
    And I click "regenerate"
    Then I should see "1 certificate published"

  Scenario: User can be added on regenerate
    Given I request that the API creates a user
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "api@example.com"
    When my metadata has the email "brian@example.com" associated
    And I click "regenerate"
    Then I should see "brian@example.com"

  Scenario: User doesn't get changed on regenerate
    Given my metadata has the email "brian@example.com" associated
    And I request that the API creates a user
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "brian@example.com"
    When I click "regenerate"
    Then I should see "brian@example.com"

@api @data_kitten
Feature: Rerun autogenerated certificates

  Background:
    Given I am signed in as the API user
    And I want to create a certificate via the API
    And I apply a campaign "brian"
    And the field "publisherUrl" is missing from my metadata
    And my URL autocompletes via DataKitten

  Scenario: Rerun an autogenerated certificate with new data
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "0 certificates published"
    When I add the field "publisherUrl" with the value "http://example.com" to my metadata
    And my URL autocompletes via DataKitten
    And I click "Rerun certification"
    Then I should see "1 certificate published"

  Scenario: User can be added on regenerate
    Given I request that the API creates a user
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "api@example.com"
    When my metadata has the email "brian@example.com" associated
    And I click "Rerun certification"
    Then I should see "brian@example.com"

  Scenario: User doesn't get changed on regenerate
    Given my metadata has the email "brian@example.com" associated
    And I request that the API creates a user
    When I request a certificate via the API
    And the certificate is created
    And I visit the campaign page for "brian"
    Then I should see "brian@example.com"
    When I click "Rerun certification"
    Then I should see "brian@example.com"

Use renamed button in features

Use renamed button in features


Feature: config
  In order to easily load DigitalOcean config
  As a user
  I should be able to load tugboat config from a .tugboat in the current directory

  Scenario: Read config from current directory
    Given a file named ".tugboat" with:
      """
---
authentication:
  client_key: FOO
  api_key: BAR
ssh:
  ssh_user: janedoe
  ssh_key_path: "/Users/janedoe/.ssh/id_rsa"
  ssh_port: '22'
defaults:
  region: '8'
  image: '9801950'
  size: '66'
  ssh_key: ''
  private_networking: 'false'
  backups_enabled: 'false'
      """
    When I run `tugboat config`
    Then the exit status should not be 1
    And the output should contain "ssh_user: janedoe"

Feature: config
  In order to easily load DigitalOcean config
  As a user
  I should be able to load tugboat config from a .tugboat in the current directory

  Scenario: Read config from current directory
    Given a '.tugboat' config with data:
"""
---
authentication:
  access_token: FOO
ssh:
  ssh_user: janedoe
  ssh_key_path: "/Users/janedoe/.ssh/id_rsa"
  ssh_port: '22'
defaults:
  region: nyc2
  image: ubuntu-14-04-x64
  size: 512mb
  ssh_key: ['1234','5678']
  private_networking: 'false'
  backups_enabled: 'false'
  ip6: 'false'
"""
    When I run `tugboat config`
    Then the exit status should not be 1
    And the output should contain "ssh_user: janedoe"
    And the output should contain "'1234'"
    And the output should contain "'5678'"

Update reading config from current directory steps


Feature: Configuration

  Scenario Outline: Initial configuration
    Given I don't have a configuration file
    When I run "<command>"
    Then I see text like "Installing initial configuration" on stderr

    Examples:
      | command      |
      | copy foo/bar |
      | databases    |
      | dump         |
      | edit-all     |
      | list         |
      | new category=mycategory identifier=myidentifier --no-password |
      | print        |

Feature: Configuration

  Scenario Outline: Initial configuration
    Given I don't have a configuration file
    When I run "<command>"
    Then I see text like "Installing initial configuration" on stderr

    Examples:
      | command      |
      | copy foo/bar |
      | databases    |
      | dump         |
      | edit-all     |
      | list         |
      | new mycategory/myidentifier --no-password |
      | print        |

Use shortened new syntax in feature

Use shortened new syntax in feature


Feature: The path to the configuration can be changed, removing the need to
  follow Ruby/Rails conventions

  Background:
    Given a test app with the default configuration
    And servers with the roles app and web

  Scenario: Deploying with configuration in default location
    When I run "cap test"
    Then the task is successful

  Scenario: Deploying with configuration in a custom location
    But the configuration is in a custom location
    When I run "cap test"
    Then the task is successful

  Scenario: Show install task with configuration in default location
    When I run "cap -T"
    Then the task is successful
    And contains "install" in the output

  Scenario: Show install task with configuration in a custom location
    And config stage file has line "desc 'Special Task'"
    And config stage file has line "task :special_stage_task"
    But the configuration is in a custom location
    When I run "cap -T"
    Then the task is successful
    And contains "special_stage_task" in the output

Feature: The path to the configuration can be changed, removing the need to
  follow Ruby/Rails conventions

  Background:
    Given a test app with the default configuration
    And servers with the roles app and web

  Scenario: Deploying with configuration in default location
    When I run "cap test"
    Then the task is successful

  Scenario: Deploying with configuration in a custom location
    But the configuration is in a custom location
    When I run "cap test"
    Then the task is successful

  Scenario: Show install task with configuration in default location
    When I run "cap -T"
    Then the task is successful
    And contains "install" in the output

  # Feature disabled because this is not how it works, we don't load
  # tasks from stage files, as we expect them to be defined in ./lib/tasks
  # Scenario: Show install task with configuration in a custom location
  #   And config stage file has line "desc 'Special Task'"
  #   And config stage file has line "task :special_stage_task"
  #   But the configuration is in a custom location
  #   When I run "cap -T"
  #   Then the task is successful
  #   And contains "special_stage_task" in the output

Comment out cucumber feature which is misleading, keep for reference


@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

Add scenario for revising an episode

Add scenario for revising an episode


Feature: Authenticating users

  In order to use the website
  As a user
  I should be able to sign up & sign in

  Scenario: Signing up
    Given I am on the homepage
    When I follow "Sign up"
    And I fill in "Email" with "john@doe.com"
    And I fill in "Password" with "password"
    And I fill in "Password confirmation" with "password"
    And I press "Sign up"
    Then I should see "You have signed up successfully."

  Scenario: Signing in & Signing out
    Given I am registered
    And I am on the homepage
    When I follow "Sign in"
    And I fill in "Email" with "john@doe.com"
    And I fill in "Password" with "password"
    And I press "Sign in"
    Then I should see "Signed in successfully."
    Given I am on the homepage
    When I follow "Sign out"
    Then I should see "Signed out successfully."

@omniauth_test
  Scenario: Sign in thru Facebook
    Given I am on the homepage
    And I follow "Sign in with Facebook"
    Then I should see "Successfully authorized from Facebook account."

  Scenario: User forgot password
    Given I am registered
    And I am on the homepage
    And I follow "Sign in"
    And I follow "Forgot your password?"
    When I fill in "Email" with "john@doe.com"
    And I press "Send me reset password instructions"
    Then "john@doe.com" should receive an email

Add Scenario: User forgot password.

Add Scenario: User forgot password.


Feature: Overriding unhandled state

Scenario: Non-fatal error overridden to unhandled
    When I run "HandledOverrideJsErrorScenario"
    Then I wait to receive an error
    And I wait to receive a session

    Then the exception "message" equals "HandledOverrideJsErrorScenario"
    And the event "unhandled" is true
    And the event "severity" equals "warning"
    And the event "severityReason.type" equals "handledException"
    And the event "severityReason.unhandledOverridden" is true
    And the event "session.events.handled" equals 0
    And the event "session.events.unhandled" equals 1

Scenario: Fatal error overridden to handled
    When I run "UnhandledOverrideJsErrorScenario" and relaunch the crashed app
    And I configure Bugsnag for "UnhandledOverrideJsErrorScenario"
    Then I wait to receive an error
    And I wait to receive a session

    Then the exception "message" equals "UnhandledOverrideJsErrorScenario"
    And the event "unhandled" is false
    And the event "severity" equals "error"
    And the event "severityReason.type" equals "unhandledPromiseRejection"
    And the event "severityReason.unhandledOverridden" is true
    And the event "session.events.handled" equals 1
    And the event "session.events.unhandled" equals 0

Feature: Overriding unhandled state

Scenario: Non-fatal error overridden to unhandled
    When I run "HandledOverrideJsErrorScenario"
    Then I wait to receive an error
    And the exception "message" equals "HandledOverrideJsErrorScenario"
    And the event "unhandled" is true
    And the event "severity" equals "warning"
    And the event "severityReason.type" equals "handledException"
    And the event "severityReason.unhandledOverridden" is true
    And the event "session.events.handled" equals 0
    And the event "session.events.unhandled" equals 1

Scenario: Fatal error overridden to handled
    When I run "UnhandledOverrideJsErrorScenario" and relaunch the crashed app
    And I configure Bugsnag for "UnhandledOverrideJsErrorScenario"
    Then I wait to receive an error
    And the exception "message" equals "UnhandledOverrideJsErrorScenario"
    And the event "unhandled" is false
    And the event "severity" equals "error"
    And the event "severityReason.type" equals "unhandledPromiseRejection"
    And the event "severityReason.unhandledOverridden" is true
    And the event "session.events.handled" equals 1
    And the event "session.events.unhandled" equals 0

Remove unnecessary steps for receiving sessions


Feature: Restrictions around signin
  Scenario: Locking accounts after many failed signin attempts
    Given a user exists with email "email@example.com" and passphrase "some passphrase with various $ymb0l$"
    When I try to sign in 7 times with email "email@example.com" and passphrase "not really"
#    Then I should see "Too many failed login attempts. Please wait an hour and try again or contact an admin."
    Then I should see "Your account is locked."

  Scenario: Admin users can unlock accounts
    Given a user exists with email "email@example.com" and passphrase "some passphrase with various $ymb0l$"
      And they have been locked out
      And a signed-in admin user
    When I go to the list of users
    Then I should see a button to unlock account

    When I press the unlock button
    Then "email@example.com" should be unlocked

Feature: Restrictions around signin
#  Disabled for now so we can upgrade Devise - it's behaviour has been changed in this situation
#  https://www.pivotaltracker.com/story/show/43324959
#  https://github.com/plataformatec/devise/commit/00a01c2bc494ce17269036fadd62ff14a76833ca
#  Scenario: Locking accounts after many failed signin attempts
#    Given a user exists with email "email@example.com" and passphrase "some passphrase with various $ymb0l$"
#    When I try to sign in 7 times with email "email@example.com" and passphrase "not really"
#    Then I should see "Your account is locked."

  Scenario: Admin users can unlock accounts
    Given a user exists with email "email@example.com" and passphrase "some passphrase with various $ymb0l$"
      And they have been locked out
      And a signed-in admin user
    When I go to the list of users
    Then I should see a button to unlock account

    When I press the unlock button
    Then "email@example.com" should be unlocked

Disable test that depends on old Devise behaviour

We will revisit after we've released the security upgrade and see if we want to
reinstate the behaviour.


Feature: Stack analysis v2 API Minimal

  Scenario: Read outlier probability threshold value
    When I download and parse outlier probability threshold value
    Then I should have outlier probability threshold value between 0.0 and 1.0

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

  Scenario: Check that the API entry point requires authorization token
    Given System is running
    When I wait 10 seconds
    When I send Python package manifest requirements.txt to stack analysis version 2 without authorization token
    Then I should get 401 status code

  Scenario: Check that the stack-analyses-v2 returns a valid response
    Given System is running
    When I acquire the authorization token
    Then I should get the proper authorization token
    When I wait 10 seconds
    When I send Python package manifest requirements.txt to stack analysis version 2 with authorization token
    Then I should get 200 status code
    Then I should receive JSON response with the correct id
    When I wait for stack analysis version 2 to finish with authorization token
    Then I should get 200 status code
    Then I should get a valid request ID
    Then I should find the attribute request_id equals to id returned by stack analysis request
    Then I should find the proper sentiment values in the stack analysis response
    Then I should find that none analyzed package can be found in companion packages as well
    Then I should find that total 2 outliers are reported
    Then I should find that valid outliers are reported
    Then I should get license_analysis field in stack report
    Then I should find that alternate components replace user components
    Then I should find the security node for all dependencies
    Then I should find the security node for all alternate components

Check for security nodes content

Check for security nodes content


Feature: Playing a game
  As a user
  I want to play a game of monopoly

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

  Scenario:
    Given I go to the game
    When I roll the dice
    Then I should see a dice roll

Feature: Playing a game
  As a user
  I want to play a game of monopoly

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

  Scenario: Rolling a dice
    Given It is my turn
    When I roll the dice
    Then I should see a dice roll

  Scenario: Moving along the board
    Given It is my turn
    When I roll two dice
    Then I should move along the board

  Scenario: Changing turns
    Given It is my turn
    When I roll two dice (not doubles)
    Then It should not be my turn

  Scenario: Rolling a double
    Given It is my turn
    When I roll a double
    Then It should be my turn

  Scenario: Rolling three doubles
    Given It is my turn
    When I roll 3 doubles
    Then I should be in jail

Add more features to playing a game

Add more features to playing a game

To do with doubles, and turn switching, and movement


@use_admin_client
Feature: Homepage

  Scenario: Visit the home page
    When I go to "/"
    Then I should get back a status of "200"

  Scenario: Visit the /_user resource
    When I go to "/_user"
    Then I should get back a status of "301"

Check that we're issuing the correct redirect


Feature: Statuses API

  Background:
    Given I have "Github::Repos::Statuses" instance

  Scenario: List

    Given I want to list resources with the following params:
      | user         | repo   | sha                                      |
      | peter-murach | github | cbdc6a5b133bf460d9c18292dda8fc54adf7e1b1 |
    When I make request within a cassette named "repos/statuses/list"
    Then the response status should be 200
      And the response type should be JSON
      And the response should not be empty

  Scenario: Create

    Given I want to create resource with the following params:
      | user  | repo            | sha                                      |
      | murek | github_api_test | 0106b45311ab15bf837c2830391b01cd17b33b61 |
      And I pass the following request options:
      | state   | target_url                         | description        |
      | success | http://ci.example.com/peter-murach | Test by github_api |
    When I make request within a cassette named "repos/statuses/create"
    Then the response status should be 201
      And the response type should be JSON
      And the response should not be empty

Feature: Statuses API

  Background:
    Given I have "Github::Repos::Statuses" instance

  Scenario: List

    Given I want to list resources with the following params:
      | user         | repo   | sha                                      |
      | peter-murach | github | cbdc6a5b133bf460d9c18292dda8fc54adf7e1b1 |
    When I make request within a cassette named "repos/statuses/list"
    Then the response status should be 200
      And the response type should be JSON
      And the response should not be empty

#   Scenario: Create
#
#     Given I want to create resource with the following params:
#       | user  | repo            | sha                                      |
#       | murek | github_api_test | 0106b45311ab15bf837c2830391b01cd17b33b61 |
#       And I pass the following request options:
#       | state   | target_url                         | description        |
#       | success | http://ci.example.com/peter-murach | Test by github_api |
#     When I make request within a cassette named "repos/statuses/create"
#     Then the response status should be 201
#       And the response type should be JSON
#       And the response should not be empty

Comment out failing test due to dummy auth token.


Feature: simd
 Scenario: simd checking
  When launch "simd"
   # need wait sometimes to trigger the home page
   And I wait 8 seconds
   Then I should see "Start"
   Then I should see "Stop"
   Then I should see "Turn On SIMD"
   Then I should see "SIMD:Off WW:1"
   And I should see "FPS: 0.0"

   And I press "Start"
   And I wait 5 seconds
   Then I check "fps" is 1.5 times after click "simd" for 10 seconds
   And I press "Stop"

Feature: simd
 Scenario: simd checking
  When launch "simd"
   # need wait sometimes to trigger the home page
   And I wait 8 seconds
   Then I should see "Start"
   Then I should see "Stop"
   Then I should see "Turn On SIMD"
   Then I should see "SIMD:Off WW:1"
   And I should see "FPS: 0.0"
   And I press "Start"
   And I wait 10 seconds
   Then I check "fps" is 1.5 times after click "simd" for 10 seconds
   And I press "Stop"

[misc] Increase timeout to make ftp stable in SIMD

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

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


Feature: Create a page
  As an author
  I want to create a page in the CMS
  So that I can grow my website

  @javascript
  Scenario: I can create a page from the pages section
    Given I am logged in with "ADMIN" permissions
    And I go to "/admin/pages"
    And I should see a "Add new" button in CMS Content Toolbar
    When I press the "Add new" button
    And I select the "Page" radio button
    And I press the "Create" button
    Then I should see an edit page form

Feature: Create a page
  As an author
  I want to create a page in the CMS
  So that I can grow my website

  Background:
    Given a "page" "MyPage"
    Given I am logged in with "ADMIN" permissions
    And I go to "/admin/pages"
    Then I should see "MyPage" in the tree
    And I should see a "Add new" button in CMS Content Toolbar

  @javascript
  Scenario: I can create a page from the pages section
    Given I go to "/admin/pages"
    When I press the "Add new" button
    And I select the "Page" radio button
    And I press the "Create" button
    Then I should see an edit page form

  @javascript
  Scenario: I can create a page under another page
    Given I go to "/admin/pages"
    When I press the "Add new" button
    And I select the "Under another page" radio button
    And I select "MyPage" in the "#Form_AddForm_ParentID_Holder" tree dropdown
    And I select the "Page" radio button
    And I press the "Create" button
    Then I should see an edit page form

Add test to make sure you can create a page under another page


Feature: Morbidity event, viewing core field help text

  To better enable a user to fill in an event form
  An investigator should see help text on core fields

  @flush_core_fields_cache
  Scenario: Viewing morbidity event help text
    Given I am logged in as a super user
    And all core field configs for a morbidity event have help text
    And a basic morbidity event exists

    When I am on the morbidity event edit page
    Then I should see help text for all morbidity event core fields in edit mode

    When I fill in enough morbidity event data to enable all core fields to show up in show mode
    And I save the event
    Then I should see help text for all morbidity event core fields in show mode

Feature: Morbidity event, viewing core field help text

  To better enable a user to fill in an event form
  An investigator should see help text on core fields

  @flush_core_fields_cache
  Scenario: Viewing morbidity event help text
    Given I am logged in as a super user
    And all core field configs for a morbidity event have help text
    And a basic morbidity event exists
    And a lab named "Labby"

    When I am on the morbidity event edit page
    Then I should see help text for all morbidity event core fields in edit mode

    When I fill in enough morbidity event data to enable all core fields to show up in show mode
    And I save the event
    Then I should see help text for all morbidity event core fields in show mode

Add setup allowing feature to run in isolation


Feature: Viewing archived pathology results for a patient

  A doctor views the archived pathology results for a patient to determine
  trends in physiological parameters over time.

  @wip
  Scenario: Multiple observation results recorded
    Given Patty is a patient
    And the following observations were recorded
      | code | result | observed_at         |
      | WBC  | 6.09   | 2009-11-11 20:26:00 |
      | RBC  | 4.00   | 2009-11-11 20:26:00 |
      | WBC  | 5.09   | 2009-11-12 10:26:00 |
      | RBC  | 3.00   | 2009-11-12 10:26:00 |
    Then the doctor views the following archived pathology result report:
      | observed_on | WBC  | HB  | RBC  |
      | 12-11-2009  | 5.09 |     | 3.00 |
      | 11-11-2009  | 6.09 |     | 4.00 |

Feature: Viewing archived pathology results for a patient

  A doctor views the archived pathology results for a patient to determine
  trends in physiological parameters over time.

  @wip
  Scenario: Multiple observation results recorded
    Given Patty is a patient
    And the following observations were recorded
      | code | result | observed_at         |
      | WBC  | 6.09   | 2009-11-11 20:26:00 |
      | RBC  | 4.00   | 2009-11-11 20:26:00 |
      | WBC  | 5.09   | 2009-11-12 10:26:00 |
      | RBC  | 3.00   | 2009-11-12 10:26:00 |
      | HB   | 2.00   | 2009-11-13 11:26:00 |
    Then the doctor views the following archived pathology result report:
      | observed_on | WBC  | HB   | RBC  |
      | 13-11-2009  |      | 2.00 |      |
      | 12-11-2009  | 5.09 |      | 3.00 |
      | 11-11-2009  | 6.09 |      | 4.00 |

Verify missing values for other days

Verify missing values for other days


Feature: Generating template files

  Background:
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'

      # Simulate Mysql2 being present. Should really just describe how to build
      # a template provider here instead.
      module Mysql2; end
      """

  Scenario: Generate standard template files
    # That the directory needs to exist is a bug!
    Given a directory named "config"
    When I run `rake config:generate_all`
    Then a file named "config/database.yml.dice" should exist

Feature: Generating template files

  Background:
    # That the directory needs to exist is a bug!
    Given a directory named "config"

  Scenario: Generate standard template files
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'

      # Simulate Mysql2 being present.
      module Mysql2; end
      """
    When I run `rake config:generate_all`
    Then a file named "config/database.yml.dice" should exist

  Scenario: Creating your own template provider
    Given a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'
      require './my_templates/my_template'
      """
    And a file named "my_templates/my_template.rb" with:
      """
      class MyTemplateProvider < DiceBag::AvailableTemplates
        def templates
          # You can return an array with multiple templates here but in
          # this example we're returning just one.
          [File.join(File.dirname(__FILE__), 'my_template.yml.dice')]
        end
      end
      """
    And a file named "my_templates/my_template.yml.dice" with:
      """
      <%= 'My template!' %>
      """
    When I run `rake config:generate_all`
    Then the file "config/my_template.yml.dice" should contain:
      """
      <%= 'My template!' %>
      """

  Scenario: Providing templates for a directory other than 'config'
    Given a directory named "config/initializers"
    And a file named "Rakefile" with:
      """
      require 'dice_bag/tasks'
      require './my_templates/my_template'
      """
    And a file named "my_templates/my_template.rb" with:
      """
      class MyTemplateProvider < DiceBag::AvailableTemplates
        def templates
          [File.join(File.dirname(__FILE__), 'my_initializer.rb.dice')]
        end
        def templates_location
          File.join('config', 'initializers')
        end
      end
      """
    And an empty file named "my_templates/my_initializer.rb.dice"
    When I run `rake config:generate_all`
    Then a file named "config/initializers/my_initializer.rb.dice" should exist

Add scenarios covering custom template providers


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

Feature: Register a client
  In Order register a client to the spacewalk server
  As the root user
  I want to call rhnreg_ks

  Scenario: Register a client
    Given I am root
    When I register using an activation key
    Then I should see this client in spacewalk

  @pxe_env
  Scenario: trigger the creation of a cobbler system record
    Given I am authorized
    When I follow "Systems"
    And I follow this client link
    And I follow "Provisioning"
    And I click on "Create PXE installation configuration"
    And I click on "Continue"
    Then file "/srv/tftpboot/pxelinux.cfg/01-*" contains "ks="

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

Feature: Register a client
  In Order register a client to the spacewalk server
  As the root user
  I want to call rhnreg_ks

  Scenario: Register a client
    When I register using an activation key
    Then I should see this client in spacewalk

  Scenario: trigger the creation of a cobbler system record
    Given I am authorized
    And I follow "Home" in the left menu
    And I follow "Systems"
    And I follow "Overview" in the left menu
    And I follow this client link
    And I follow "Provisioning"
    And I click on "Create PXE installation configuration"
    And I click on "Continue"
    Then file "/srv/tftpboot/pxelinux.cfg/01-*" contains "ks="

Fix register client, due to new web-ui

Fix register client, due to new web-ui


Feature: Port

  As a client
  I want to reserve file system space
  So that my put will succeed

  Background:
    Given the test server is started

  Scenario: With count
    Given a successful login
    When the client successfully sends "ALLO 1024"
    Then the server returns a not necessary reply

  Scenario: With count and record size
    Given a successful login
    When the client successfully sends "ALLO 1024 R 128"
    Then the server returns a not necessary reply

  Scenario: Not logged in
    Given a successful connection
    When the client sends "ALLO 1024"
    Then the server returns a not logged in error

  Scenario: Missing argument
    Given a successful login
    When the client sends "ALLO"
    Then the server returns a syntax error

  Scenario: Invalid argument
    Given a successful login
    When the client sends "ALLO XYZ"
    Then the server returns a syntax error

Feature: ALLO

  As a client
  I want to reserve file system space
  So that my put will succeed

  Background:
    Given the test server is started

  Scenario: With count
    Given a successful login
    When the client successfully sends "ALLO 1024"
    Then the server returns a not necessary reply

  Scenario: With count and record size
    Given a successful login
    When the client successfully sends "ALLO 1024 R 128"
    Then the server returns a not necessary reply

  Scenario: Not logged in
    Given a successful connection
    When the client sends "ALLO 1024"
    Then the server returns a not logged in error

  Scenario: Missing argument
    Given a successful login
    When the client sends "ALLO"
    Then the server returns a syntax error

  Scenario: Invalid argument
    Given a successful login
    When the client sends "ALLO XYZ"
    Then the server returns a syntax error

Correct title of ALLO feature

Correct title of ALLO feature


Feature: Amending draft organisation settings
  In order to make sure the constitution fits our needs
  As a founder
  I want to amend the draft organisation's settings

  Background:
    Given the application is set up
    And I have created an organisation

  Scenario: Amending draft organisation settings
    When I go to the amendments page
    And I fill in "organisation_name" with "Tea Club Mark II"
    And I fill in "organisation_objectives" with "REALLY enjoying tea"
    And I choose "Absolute majority" for general decisions
    And I choose "Unanimous" for membership decisions
    And I choose "Simple majority" for constitution decisions
    And I choose "5 minutes"
    And I press "Save changes"
    Then I should be on the constitution page
    And I should see "Constitutional changes were made"
    And I should see "Tea Club Mark II"
    And I should see "REALLY enjoying tea"
    And I should see "5 minutes"
    And I should see "A Decision is made if a Proposal receives Supporting Votes from more than half of Members during the Voting Period. "
    And I should see "The Constitution may only be amended by a Decision where Supporting Votes from more than half of the Members are received during the Voting Period; or when more Supporting Votes than Opposing Votes have been received for the Proposal at the end of the Voting Period."
    And I should see "New Members may be appointed (and existing Members ejected) only by a Decision Supporting Votes are received from all Members during the Voting Period."

Feature: Amending draft organisation settings
  In order to make sure the constitution fits our needs
  As a founder
  I want to amend the draft organisation's settings

  Background:
    Given the application is set up
    And I have created an organisation

  Scenario: Amending draft organisation settings
    When I go to the amendments page
    And I fill in "organisation_name" with "Tea Club Mark II"
    And I fill in "organisation_objectives" with "REALLY enjoying tea"
    And I choose "Absolute majority" for general decisions
    And I choose "Unanimous" for membership decisions
    And I choose "Simple majority" for constitution decisions
    And I choose "5 minutes"
    And I press "Save changes"
    Then I should be on the constitution page
    And I should see "Constitutional changes were made"
    And I should see "Tea Club Mark II"
    And I should see "REALLY enjoying tea"
    And I should see "5 minutes"
    And I should see "A Decision is made if a Proposal receives Supporting Votes from more than half of Members during the Voting Period. "
    And I should see "The Constitution may only be amended by a Decision where Supporting Votes from more than half of the Members are received during the Voting Period; or when more Supporting Votes than Opposing Votes have been received for the Proposal at the end of the Voting Period."
    And I should see "New Members may be appointed (and existing Members ejected) only by a Decision where Supporting Votes are received from all Members during the Voting Period."

Fix scenario broken by fix in 84c0bef07401999407b.


Feature: A Doctor records a patient event

Background:
  Given there are edta causes of death in the database
    And Patty is a patient
    And Clyde is a clinician
    And Clyde is logged in
    And Clyde is on Patty's event index

Scenario: Clyde records an event for Patty
  When Clyde chooses to add an event
    And records Patty's event
  Then Clyde should see Patty's new event on the clinical summary
    And see Patty's new event in her event index

Feature: A Doctor records a patient event

Background:
  Given there are edta causes of death in the database
    And Patty is a patient
    And Clyde is a clinician
    And Clyde is logged in

Scenario: Clyde records an event for Patty
  Given Clyde is on Patty's event index
  When Clyde chooses to add an event
    And records Patty's event
  Then Clyde should see Patty's new event on the clinical summary
    And see Patty's new event in her event index

Move step into main scenario

Move step into main scenario

Always nice to start off with a Given


Feature: Create friends-only post
  As a user
  In order to keep certain posts private
  I want to create a post that only my friends can see

  Background:
    Given a user named "bill"
    And "bill" has a friend named "joe"

  Scenario: User has ability to make a friends only post
    Given I am logged in as "bill"
    When I go to the homepage
    Then I should see a dropdown menu within the new squeek form
    And I should see the 'Friends only' option in the dropdown menu

  Scenario: User creates a friends-only squeek
    Given I am logged in as "bill"
    When I go to the homepage
    And I fill in 'Squeek here' with 'This is for friends only.'
    And I select 'Friends only' from the dropdown menu in the squeek form
    And I press 'Squawk'
    Then I should see: "Your squeek has been posted"

Feature: Create friends-only post
  As a user
  In order to keep certain posts private
  I want to create a post that only my friends can see

  Background:
    Given a user named "bill"

  Scenario: User has ability to make a friends only post
    Given I am logged in as "bill"
    When I go to the homepage
    Then I should see a dropdown menu within the new squeek form
    And I should see the 'Friends only' option in the dropdown menu

  Scenario: User creates a friends-only squeek
    Given I am logged in as "bill"
    When I go to the homepage
    And I fill in 'Squeek here' with 'This is for friends only.'
    And I select 'Friends only' from the dropdown menu in the squeek form
    And I press 'Squawk'
    Then I should see: "Your squeek has been posted"

Change to friends only post feature

Change to friends only post feature


Feature: Resigning from a an organisation
  In order to leave an organisation formally
  As a member
  I want to be able to resign from my positions inside it.

  Background:
    Given the application is set up
    And an organisation is active
    And I am a member of the organisation
    And the subdomain is the organisation's subdomain
    And I have logged in

  @wip
  Scenario: Proposing ejection of a member
    Given there is a member "bob@example.com"
    When I go to my member page
    And I click on the resign link, and confirm my leaving
    Then I should be logged out, with a message telling me I have resigned.
    And a message has been sent to the members
    And added to the timeline

Feature: Resigning from a an organisation
  In order to leave an organisation formally
  As a member
  I want to be able to resign from my positions inside it.

  Background:
    Given the application is set up
    And an organisation is active
    And I am a member of the organisation
    And the subdomain is the organisation's subdomain
    And I have logged in

  @wip
  Scenario: Resigning
    Given there is a member "bob@example.com"
    When I go to my member page
    And I click on the resign link, and confirm my leaving
    Then I should be logged out, with a message telling me I have resigned.

  @wip
  Scenario: Being notified of another member's resignation
    Given another member has resigned
    Then I should receive an email saying that member has resigned

  @wip
  Scenario: Seeing a resignation in the timeline
    Given another member has resigned
    When I go to the dashboard
    Then I should see the resignation in the timeline

Move notification of resignation into separate scenarios.


Feature: Todo

  Scenario: Create Todo
    Given there is already 1 todo
    When I add "get milk"
    Then the text of the 2nd todo should be "get milk"

  Scenario: Mark Todo Done
  Scenario: Mark Todo Undone
  Scenario: Delete Todo

Feature: Todo

  Scenario: Create Todo
    Given there is already 1 todo
    When I add "get milk"
    Then the text of the 2nd todo should be "get milk"

  Scenario: Mark Todo Done
    # Given there are already 2 todos
    # When I mark the 2nd todo as done
    # Then the 2nd todo should be marked as done

  Scenario: Mark Todo Undone
  Scenario: Delete Todo

Add commented out scenario for exercise

Add commented out scenario for exercise


Feature: w3c-webstorage
 Scenario: storage insurance on trip
   When launch "css3-color-app"
     And I go to "csswg/t31-color-currentColor-b.htm"
     And I save the page to "css3_colors_tests_entry1"
    Then pic "css3_colors_tests_entry1" of baseline and result should be "100" similar if have results

Feature: css3-color
 Scenario: t31 color currentColor b
   When launch "css3-color-app"
     And I go to "csswg/t31-color-currentColor-b.htm"
     And I save the page to "t31-color-currentColor-b"
    Then pic "t31-color-currentColor-b" of baseline and result should be "100" similar if have results

Use the html file name as picture name

[webapi] Use the html file name as picture name

Impacted tests(approved):new 0,update 1,delete 0
Unit test platform:[Android]
Unit test result summary:pass 1,fail 0,block 0


@RALLY_US2191
Feature: Negative XXE Injection Testing

Background: I have a landing zone route configured
    Given I am using local data store
  And I am using preconfigured Ingestion Landing Zone

Scenario: Post a zip file with an external entity that attempts to access a local file
  Given I post "XXETest.zip" file as the payload of the ingestion job
  When zip file is scp to ingestion landing zone
  And I am willing to wait upto 30 seconds for ingestion to complete
  And a batch job for file "XXETest.zip" is completed in database
  And a batch job log has been created
  And I should see "InterchangeEducationOrganization.xml records considered: 1" in the resulting batch job file
  And I should see "InterchangeEducationOrganization.xml records ingested successfully: 0" in the resulting batch job file
  And I should see "InterchangeEducationOrganization.xml records failed: 1" in the resulting batch job file
  And I should see "Not all records were processed completely due to errors." in the resulting batch job file
  And I should see "Processed 1 records." in the resulting batch job file

  And I should see "CORE_0006" in the resulting error log file
  And I should not see a warning log file created

Fix data to remove xsd warnings

Fix data to remove xsd warnings


Feature: In order to provide base information
	As a client application using SLI
	I want to know what links are available to a user based on their user type.
	This means all associations should be returned as links when accessing the HOME URI.

Background: Logged in as a super-user and using the small data set
	Given I am logged in using "demo" "demo1234"

Scenario: MOCK Home URI returns a valid response
	Given format "application/json"
		And mock student ID <mock ID>
	When I navigate to GET <home URI>
	Then I should receive a return code of 200
		And I should receive a link where rel is "self" and href ends with "/students/" and appropriate ID
		And I should receive a link where rel is "getStudentEnrollments" and href ends with "/student-school-associations/" and appropriate ID

Scenario: Previous functionality which is now shared logic continues to work as expected
	Given format "application/json"
		And mock student ID <mock ID>
	When I navigate to GET <student by ID>
	Then I should receive a return code of 200
		And I should receive a link where rel is "self" and href ends with "/students/" and appropriate ID
		And I should receive a link where rel is "getStudentEnrollments" and href ends with "/student-school-associations/" and appropriate ID

#this is a test

Feature: In order to provide base information
	As a client application using SLI
	I want to know what links are available to a user based on their user type.
	This means all associations should be returned as links when accessing the HOME URI.

Background: Logged in as a super-user and using the small data set
	Given I am logged in using "demo" "demo1234"

Scenario: MOCK Home URI returns a valid response
	Given format "application/json"
		And mock student ID <mock ID>
	When I navigate to GET <home URI>
	Then I should receive a return code of 200
		And I should receive a link where rel is "self" and href ends with "/students/" and appropriate ID
		And I should receive a link where rel is "getStudentSchoolAssociations" and href ends with "/student-school-associations/" and appropriate ID

Scenario: Previous functionality which is now shared logic continues to work as expected
	Given format "application/json"
		And mock student ID <mock ID>
	When I navigate to GET <student by ID>
	Then I should receive a return code of 200
		And I should receive a link where rel is "self" and href ends with "/students/" and appropriate ID
		And I should receive a link where rel is "getStudentSchoolAssociations" and href ends with "/student-school-associations/" and appropriate ID

#this is a test

UPdate home uri feature file to reflect new naming of SSA links (not getStudentEnrollments anymore)


@checkout
Feature: Checking out as guest with a registered email
    In order to make the checkout process less cumbersome
    As a Guest
    I want to be able to checkout with my email although I have a registered account

    Background:
        Given the store operates on a single channel in "United States"
        And the store has a product "PHP T-Shirt" priced at "$19.99"
        And the store ships everywhere for free
        And the store allows paying offline
        And there is a customer account "john@example.com"

    @ui
    Scenario: Successfully placing an order
        Given I have product "PHP T-Shirt" in the cart
        When I complete addressing step with email "john@example.com" and "United States" based shipping address
        And I select "Free" shipping method
        And I complete the shipping step
        And I choose "Offline" payment method
        And I confirm my order
        Then I should see the thank you page

@checkout
Feature: Checking out as guest with a registered email
    In order to make the checkout process less cumbersome
    As a Visitor
    I want to be able to checkout with my email although I have a registered account

    Background:
        Given the store operates on a single channel in "United States"
        And the store has a product "PHP T-Shirt" priced at "$19.99"
        And the store ships everywhere for free
        And the store allows paying offline
        And there is a customer account "john@example.com"

    @ui
    Scenario: Successfully placing an order
        Given I have product "PHP T-Shirt" in the cart
        When I complete addressing step with email "john@example.com" and "United States" based shipping address
        And I select "Free" shipping method
        And I complete the shipping step
        And I choose "Offline" payment method
        And I confirm my order
        Then I should see the thank you page

Correct the stakeholder in the feature to comply with other features


#
# Copyright (c) 2015-2017 Steven Soloff
#
# This is free software: you can redistribute it and/or modify it under the
# terms of the MIT License (https://opensource.org/licenses/MIT).
# This software comes with ABSOLUTELY NO WARRANTY.
#

Feature: Correlating requests and responses
  In order to know which request triggered a specific response
  As a tool developer
  I want the response to specify the originating request ID as its correlation ID

Scenario: Correlating requests and responses
  Given a request with the ID "aaaa-bbbb-cccc"
    And a request with the expression "5"
  When the evaluate expression service is invoked
  Then the response should contain the correlation ID "aaaa-bbbb-cccc"

#
# Copyright (c) 2015-2017 Steven Soloff
#
# This is free software: you can redistribute it and/or modify it under the
# terms of the MIT License (https://opensource.org/licenses/MIT).
# This software comes with ABSOLUTELY NO WARRANTY.
#

Feature: Correlating requests and responses
  In order to know which request triggered a specific response
  As a tool developer
  I want the response to specify the originating request ID as its correlation ID

Scenario: Correlating requests and responses
  Given a request with the ID "aaaaabbbbbcccccddddd"
    And a request with the expression "5"
  When the evaluate expression service is invoked
  Then the response should contain the correlation ID "aaaaabbbbbcccccddddd"

Change request ID used in acceptance tests

Running the "Correlating requests and responses" feature against Heroku
will fail if the request ID does not follow their rules.  Otherwise,
Heroku will ignore the request ID and inject their own.

We were violating the minimum length rule (20 characters).  The tests
have been updated to use a request ID that exceeds this minimum length.


Feature: Minimal Mockingjay Instance
  As a user of Mockingjays
  I want to be able to start a mockingjay instance with minial options
  So that I can quickly start testing my application with the default options

  Scenario: Serving without Require Options
    Given I want to create a Mockingjay instance with no options
    When I serve
    Then I see an error asking me to specify missing options

  Scenario: Serving without Base Server URL
    Given I want to create a Mockingjay instance with the following options
      | OPTION   | VALUE   |
      | cacheDir | ./temp/ |
    When I serve
    Then I see an error asking me to specify missing options

  Scenario: Serving with Required Options
    Given I want to create a Mockingjay instance with the following options
      | OPTION        | VALUE           |
      | cacheDir      | ./temp/         |
      | serverBaseUrl | http://swapi.co |
    When I serve
    Then I see no error

Feature: Minimal Mockingjay Instance
  As a user of Mockingjays
  I want to be able to start a mockingjay instance with minial options
  So that I can quickly start testing my application with the default options

  Scenario: Serving without Require Options
    Given I want to create a Mockingjay instance with no options
    When I serve
    Then I see an error asking me to specify missing options

  Scenario: Serving without Base Server URL
    Given I want to create a Mockingjay instance with the following options
      | OPTION   | VALUE   |
      | cacheDir | ./temp/ |
    When I serve
    Then I see an error asking me to specify missing options

  Scenario: Serving without a cache directory URL
    Given I want to create a Mockingjay instance with the following options
      | OPTION        | VALUE           |
      | serverBaseUrl | http://swapi.co |
    When I serve
    Then I see an error asking me to specify missing options

  Scenario: Serving with Required Options
    Given I want to create a Mockingjay instance with the following options
      | OPTION        | VALUE           |
      | cacheDir      | ./temp/         |
      | serverBaseUrl | http://swapi.co |
    When I serve
    Then I see no error

Add New Test for Missing Required Option


Feature: Modulus 11 Checking

  Background:
    Given I create a new checker

  Scenario: 2) Pass modulus 11 check
    Given I have a sort code 107999
    And I have an account number 88837491

    Then the modulus is MOD11
    And the combination is valid

  Scenario: 30) Fail modulus 11 check
    Given I have a sort code 107999
    And I have an account number 88837493

    Then the modulus is MOD11
    And the combination is invalid

Update test to check that invalid combinations are detected


# language: en
@lambda @client
Feature: Amazon Lambda

  Scenario: Making a basic request
    When I call the "ListEventSourceMappings" API
    Then the response should contain a list of "EventSourceMappings"

  Scenario: Error handling
    When I attempt to call the "GetEventSourceMapping" API with:
    | UUID | fake-uuid |
    Then I expect the response error code to be "ValidationException"
    And I expect the response error message to include:
    """
    does not exist
    """

# language: en
@lambda @client
Feature: Amazon Lambda

  Scenario: Making a basic request
    When I call the "ListEventSourceMappings" API
    Then the response should contain a list of "EventSourceMappings"

  Scenario: Error handling
    When I attempt to call the "GetEventSourceMapping" API with:
    | UUID |  deadbeef-e025-4d45-9da3-23813f5e7b65 |
    Then I expect the response error code to be "ResourceNotFoundException"
    And I expect the response error message to include:
    """
    does not exist
    """

Fix failing lambda integration test

Fix failing lambda integration test


Feature: Check file content

  Background:
    Given I use a fixture named "cli-app"

  Scenario: Existing file having content
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        Hello World
        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        Hello World
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Existing file having content with special characters
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        UUUUU

        1 scenario (1 undefined)
        5 steps (5 undefined)

        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        UUUUU

        1 scenario (1 undefined)
        5 steps (5 undefined)

        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Trailing white space is ignored
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        UUUUU

        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        UUUUU
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

Feature: Check file content

  Background:
    Given I use a fixture named "cli-app"

  Scenario: Existing file having content
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        Hello World
        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        Hello World
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Existing file having content with special characters
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        UUUUU

        1 scenario (1 undefined)
        5 steps (5 undefined)

        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        UUUUU

        1 scenario (1 undefined)
        5 steps (5 undefined)

        \"\"\"
    """
    When I run `cucumber --format progress`
    Then the features should all pass

  Scenario: Trailing white space is ignored
    Given a file named "features/file_content.feature" with:
    """
    Feature: File content
      Scenario: file content
        Given a file named "test.txt" with:
        \"\"\"
        UUUUU

        \"\"\"
        Then the file named "test.txt" should contain:
        \"\"\"
        UUUUU
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

Make sure not content is put to stderr/stdout which will cause a failure


Feature: Rails
  Background:
    Given a new Rails app
    And I add figaro as a dependency
    And I bundle
    And I create "lib/tasks/hello.rake" with:
      """
      task :hello => :environment do
        puts ["Hello", ENV["HELLO"]].compact.join(", ") << "!"
      end
      """

  Scenario: Has no application.yml
    When I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Has application.yml without requested key
    When I create "config/application.yml" with:
      """
      GOODBYE: Ruby Tuesday
      """
    And I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Has application.yml with requested key
    When I create "config/application.yml" with:
      """
      HELLO: world
      """
    And I run "bundle exec rake hello"
    Then the output should be "Hello, world!"

  Scenario: Generator creates and ignores application.yml file
    When I run "bundle exec rails generate figaro:install"
    Then "config/application.yml" should exist
    And ".gitignore" should contain "/config/application.yml"
    When I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Generator only creates application.yml if not using Git
    Given I run "rm .gitignore"
    When I run "bundle exec rails generate figaro:install"
    Then "config/application.yml" should exist
    But ".gitignore" should not exist

Feature: Rails
  Background:
    Given a new Rails app
    And I add figaro as a dependency
    And I bundle
    And I create "lib/tasks/hello.rake" with:
      """
      task :hello => :environment do
        puts ["Hello", ENV["HELLO"]].compact.join(", ") << "!"
      end
      """

  Scenario: Has no application.yml
    When I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Has application.yml without requested key
    When I create "config/application.yml" with:
      """
      GOODBYE: Ruby Tuesday
      """
    And I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Has blank application.yml
    When I create "config/application.yml" with:
      """
      """
    And I run "bundle exec rake hello"
    Then the output should be "Hello!"

  Scenario: Has application.yml with requested key
    When I create "config/application.yml" with:
      """
      HELLO: world
      """
    And I run "bundle exec rake hello"
    Then the output should be "Hello, world!"

  Scenario: Generator creates and ignores application.yml file
    When I run "bundle exec rails generate figaro:install"
    Then "config/application.yml" should exist
    And ".gitignore" should contain "/config/application.yml"

  Scenario: Generator only creates application.yml if not using Git
    Given I run "rm .gitignore"
    When I run "bundle exec rails generate figaro:install"
    Then "config/application.yml" should exist
    But ".gitignore" should not exist

Split the blank configuration file assertion into to its own scenario


@login
Feature: Ernest login

  Background:
    Given I setup ernest with target "https://ernest.local"

  Scenario: Login as admin user
    When I'm logged in as "ci_admin" / "secret123"
    Then The output should contain "Welcome back ci_admin"

  Scenario: Login as plain user
    When I'm logged in as "usr" / "secret123"
    Then The output should contain "Welcome back usr"

  Scenario: Login with non existing user
    When I'm logged in as "unexisting" / "secret123"
    Then The output should contain "Authentication failed"

  Scenario: Login with no username
    When I'm logged in as "" / "invalid123"
    Then The output should contain "Username cannot be empty"

  Scenario: Login with no password
    When I'm logged in as "usr" / ""
    Then The output should contain "Password cannot be empty"

  Scenario: Login with invalid characters in username
    When I'm logged in as "usr^" / "secret123"
    Then The output should contain "Username can only contain the following characters: a-z 0-9 @._-"

  Scenario: Login with invalid characters in password
    When I'm logged in as "usr" / "secret^123"
    Then The output should contain "Password can only contain the following characters: a-z 0-9 @._-"

  Scenario: Login as a federated user
    When I'm logged in as "user-federation" / "secret123"
    Then The output should contain "Welcome back user-federation"

  Scenario: Login as a federated admin user
    When I'm logged in as "admin-federation" / "secret123"
    Then The output should contain "Welcome back admin-federation"

Add integration tests for Federation service


Feature: Initialisation

  Background:
    Given the internet is reachable

  Scenario: Use gvm for the first time
    When I enter "gvm"
    Then the gvm work folder is created

  Scenario: Use gvm after initialisation
    Given an initialised system
    When I enter "gvm"
    Then I see "Usage: gvm <command> <candidate> [version]"
    Then the gvm work folder is created

  Scenario: gvm is initialised for the first time
    Given an initialised shell
    When I enter "echo $GVM_INIT"
    Then I see "true"
    When I enter "echo $PATH"
    Then I see a single occurrence of "groovy"

  Scenario: gvm is initialised a subsequent time
    Given an initialised shell
    When I reinitialise the shell
    And I enter "echo $PATH"
    Then I see a single occurrence of "groovy"

Feature: Initialisation

  Background:
    Given the internet is reachable

  Scenario: Use gvm for the first time
    When I enter "gvm"
    Then the gvm work folder is created

  Scenario: Use gvm after initialisation
    Given an initialised system
    When I enter "gvm"
    Then I see "Usage: gvm <command> <candidate> [version]"
    Then the gvm work folder is created

  Scenario: gvm is initialised for the first time
    Given an initialised shell
    When I enter "echo $GVM_INIT"
    Then I see "true"
    When I enter "echo $PATH"
    Then I see a single occurrence of "grails"

  Scenario: gvm is initialised a subsequent time
    Given an initialised shell
    When I reinitialise the shell
    And I enter "echo $PATH"
    Then I see a single occurrence of "grails"

Fix breakage caused by multiple occurences of groovy in the path after adding groovyserv.


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 $200

  Scenario: Landing on go to jail
    Given It is my turn
    When I land on Go To Jail
    Then I should be in jail
    And It should not be my turn

  Scenario: Landing on a property
    Given It is my turn
    And Whitechapel Road is not owned
    When I land on Whitechapel Road
    And I click on "Buy property"
    Then I should own Whitechapel Road
    And I should lose $60
    And It should not be my turn

Add cuke to test for turn change after property purchase


Feature: Use python imports and requirements
  In order to use python
  As a user
  I want to import packages

  Scenario: Import python packages by name
    Given I have the package name <package_name>
    When I import the package
    Then I get the package with name <package_name>

  Examples:
    | package_name
    | requests
    | boto
    | jinja2
    | lxml
    | bs4
    | fom
    | elife-api-prototype
    | elife-poa-xml-generation
    | git
    | arrow
    | elementtree
    | PyPDF2
    | wsgiref

Update test to include more python module requirements.


Feature: Venues
    In order to inform attendees where a LAN is taking place
    As an admin
    I need to be able to create, edit and delete venues

    Background:
        Given an admin with username "Lord Nikon" exists
        Given I am logged in as "Lord Nikon"

    Scenario: Creating a new venue for all to see
        When I go to "venues/create"
        And I fill in "Name" with "Cyberdelia"
        And I fill in "Street Address" with "Clifden Road, Brentford, Greater London"
        And I fill in "Description" with "The ultimate cyberpunk club lounge"
        And I press "Submit"
        And I log out

        Then I go to "venues"
        And I should see "Cyberdelia"

    Scenario: Editing an existing venue's name
        When I go to "venues"
        And I follow "Edit"
        And I fill in "Name" with "Ellingson Mineral Corporation HQ"
        And I fill in "Street Address" with "Lloyd's building, Lime Street, London, EC3M 7AW"
        And I fill in "Description" with "Together, Anything is Possible"
        And I press "Submit"
        And I log out

        Then I go to "venues"
        And I should see "Ellingson Mineral Corporation HQ"
        And I should see "Lloyd's building, Lime Street, London, EC3M 7AW"

Add test for editing a venue

Add test for editing a venue


@javascript
Feature: Hovercards
  In order to not having to leave the page to view a persons profile
  As a user
  I want to use hovercards

  Background:
    Given a user named "Bob Jones" with email "bob@bob.bob"
    And "bob@bob.bob" has a public post with text "public stuff"
    And a user named "Alice" with email "alice@alice.alice"
    And "alice@alice.alice" has a public post with text "alice public stuff"
    And the post with text "public stuff" is reshared by "alice@alice.alice"
    And the post with text "alice public stuff" is reshared by "bob@bob.bob"
    And I sign in as "alice@alice.alice"

  Scenario: Hovercards on the main stream
    Given I am on "bob@bob.bob"'s page
    Then I should see "public stuff" within ".stream_element"
    When I activate the first hovercard
    Then I should see a hovercard
    When I deactivate the first hovercard
    Then I should not see a hovercard

  Scenario: Hovercards on the main stream in reshares
    Given I am on "bob@bob.bob"'s page
    Then I should see "public stuff" within ".stream_element"
    When I hover "Alice" within ".reshare"
    Then I should not see a hovercard
    When I am on "alice@alice.alice"'s page
    Then I should see "public stuff" within ".stream_element"
    When I hover "Bob Jones" within ".reshare"
    Then I should see a hovercard

@javascript
Feature: Hovercards
  In order to not having to leave the page to view a persons profile
  As a user
  I want to use hovercards

  Background:
    Given a user named "Bob Jones" with email "bob@bob.bob"
    And "bob@bob.bob" has a public post with text "public stuff"
    And a user named "Alice" with email "alice@alice.alice"
    And "alice@alice.alice" has a public post with text "alice public stuff"
    And the post with text "public stuff" is reshared by "alice@alice.alice"
    And the post with text "alice public stuff" is reshared by "bob@bob.bob"
    And I sign in as "alice@alice.alice"

  Scenario: Hovercards on the main stream
    Given I am on "bob@bob.bob"'s page
    Then I should see "public stuff" within ".stream_element"
    When I activate the first hovercard
    Then I should see a hovercard
    When I deactivate the first hovercard
    Then I should not see a hovercard

  Scenario: Hovercards on the main stream in reshares
    Given I am on "bob@bob.bob"'s page
    Then I should see "Alice" within ".stream_element"
    When I hover "Alice" within ".reshare"
    Then I should not see a hovercard
    When I am on "alice@alice.alice"'s page
    Then I should see "Bob Jones" within ".stream_element"
    When I hover "Bob Jones" within ".reshare"
    Then I should see a hovercard

Check user name presence instead

Check user name presence instead

It seems that loading of stream is not completed before trying to activate hovercard.
I do not want to add explicit pause to the scenarion. Let's check link presence before activating hovercard.


Feature: Integrate with xmpfilter

  Scenario: Passing xmpfilter
    Given the file "Readme.mountain_berry_fields.md"
    """
    # Whatever

        <% test 'basic addition', strategy: :xmpfilter do %>
        1 + 1 # => 2
        <% end %>

    More shit here
    """
    When I run "mountain_berry_fields Readme.mountain_berry_fields.md"
    Then it exits with a status of 0
    Then I see the file "Readme.md"
    """
    # Whatever

        1 + 1 # => 2

    More shit here
    """

  Scenario: Failing xmpfilter
    Given the file "Readme.mountain_berry_fields.md"
    """
    # Whatever

        <% test 'basic addition', strategy: :xmpfilter do %>
        1 + 2 # => 2
        <% end %>

    More shit here
    """
    When I run "mountain_berry_fields Readme.mountain_berry_fields.md"
    Then it exits with a status of 1, and a stderr of
    """
    FAILURE: basic addition
    Expected: 1 + 2 # => 2
    Actual:   1 + 2 # => 3
    """
    And I do not see the file "Readme.md"

Feature: Integrate with xmpfilter

  Scenario: Passing xmpfilter
    Given the file "Readme.mountain_berry_fields.md"
    """
    # Whatever

        <% test 'basic addition', strategy: :xmpfilter do %>
        1 + 1 # => 2
        <% end %>

    More shit here
    """
    When I run "mountain_berry_fields Readme.mountain_berry_fields.md"
    Then it exits with a status of 0
    And I see the file "Readme.md"
    """
    # Whatever

        1 + 1 # => 2

    More shit here
    """

  Scenario: Failing xmpfilter
    Given the file "Readme.mountain_berry_fields.md"
    """
    # Whatever

        <% test 'basic addition', strategy: :xmpfilter do %>
        1 + 2 # => 12
        <% end %>

    More shit here
    """
    When I run "mountain_berry_fields Readme.mountain_berry_fields.md"
    Then it exits with a status of 1, and a stderr of
    """
    FAILURE: basic addition
    Expected: 1 + 2 # => 12
    Actual:   1 + 2 # => 3
    """
    And I do not see the file "Readme.md"

Make the xmpfilter story read better

Make the xmpfilter story read better


Feature: Site Command

  Scenario: ee throws error when run without root
    Given 'bin/ee' is installed
    When I run 'bin/ee'
    Then STDERR should return exactly
    """
    Error: Please run `ee` with root privileges.
    """

  Scenario: ee executable is command working correctly
    Given 'bin/ee' is installed
    When I run 'sudo bin/ee'
    Then STDOUT should return something like
    """
    NAME

      ee
    """

  Scenario: Check site command is present
    When I run 'sudo bin/ee site'
    Then STDOUT should return something like
    """
    usage: ee site
    """

  Scenario: Create site successfully
    When I run 'sudo bin/ee site create hello.test --wp'
    Then The site 'hello.test' should have webroot
    And The site 'hello.test' should have WordPress
    And Request on 'hello.test' should contain following headers:
    | header           |
    | HTTP/1.1 200 OK  |

  Scenario: List the sites
    When I run 'sudo bin/ee site list --format=text'
    Then STDOUT should return exactly
    """
    hello.test
    """

  Scenario: Delete the sites
    When I run 'sudo bin/ee site delete hello.test'
    Then STDOUT should return something like
    """
    Site hello.test deleted.
    """
    And STDERR should return exactly
    """
    """
    And The 'hello.test' db entry should be removed
    And The 'hello.test' webroot should be removed
    And Following containers of site 'hello.test' should be removed:
      | container  |
      | nginx      |
      | php        |
      | db         |
      | redis      |
      | phpmyadmin |

Feature: Site Command

  Scenario: ee throws error when run without root
    Given 'bin/ee' is installed
    When I run 'bin/ee'
    Then STDERR should return exactly
    """
    Error: Please run `ee` with root privileges.
    """

  Scenario: ee executable is command working correctly
    Given 'bin/ee' is installed
    When I run 'sudo bin/ee'
    Then STDOUT should return something like
    """
    NAME

      ee
    """

  Scenario: Check site command is present
    When I run 'sudo bin/ee site'
    Then STDOUT should return something like
    """
    usage: ee site
    """

  Scenario: Create site successfully
    When I run 'sudo bin/ee site create hello.test --wp'
    Then The site 'hello.test' should have webroot
    And The site 'hello.test' should have WordPress
    And Request on 'hello.test' should contain following headers:
    | header           |
    | HTTP/1.1 200 OK  |

  Scenario: List the sites
    When I run 'sudo bin/ee site list --format=text'
    Then STDOUT should return exactly
    """
    hello.test
    """

  Scenario: Delete the sites
    When I run 'sudo bin/ee site delete hello.test --yes'
    Then STDOUT should return something like
    """
    Site hello.test deleted.
    """
    And STDERR should return exactly
    """
    """
    And The 'hello.test' db entry should be removed
    And The 'hello.test' webroot should be removed
    And Following containers of site 'hello.test' should be removed:
      | container  |
      | nginx      |
      | php        |
      | db         |
      | redis      |
      | phpmyadmin |

Update delete acc to new changes

Update delete acc to new changes


@SearchCourse
Feature: Search any course
  Search any course that successfully and unsuccessfully

  @SmokeTest
  Scenario: Search any course when a user don't login.
    Given I navigate to Main Page
    When I search a course as "JavaScript"
    Then obtain a "JavaScript" list course.

  @SmokeTest
  Scenario: Search any course but that don't is present in the list.
    Given I navigate to Main Page
    When I search a course as "Qwerty"
    Then do not obtain "Qwerty" none course.

  Scenario: Enroll for a course.
    Given I navigate to Main Page
    And I login like "Jhasmany.Quiroz@fundacion-jala.org" with password "1c7hu57&7"
    And I search a course like "Algorithms, Part II"

    When I wish to enroll in the course "Algorithms, Part II"

    Then go to the course enrolled.
    #And the user receive the e-mail of course.

  Scenario: Unenroll for a course
    Given I navigate to Main Page
      And I login like "Jhasmany.Quiroz@fundacion-jala.org" with password "1c7hu57&7"
      And I search a course like "Algorithms, Part II"
      And I wish to enroll in the course "Algorithms, Part II"
      And go to the course enrolled.
    When I navigate to Home Page
      And I selected the course to unenroll "Algorithms, Part II"
    Then the registered course "Algorithms, Part II" should not be present.

Add the feature Unenroll for a course

Add the feature Unenroll for a course


@api
Feature: Users
  Through the api:
    Logged in users access there own account information
    Logged in users access other peoples public account information
    Logged in users cannot access other peoples non-public account information
    Logged in users access other team members non-public team information
    Not logged in users can access other peoples public account information
    Not logged in users can not access other peoples non-public account information

  Scenario: Get current user
    Given that the user @testpublic is logged in
    When I visit "/user/current"
    Then I should receive a valid user object
    And the user.username should equal testpublic

  Scenario: Get specific user
    Given that the user @testpublic is logged in
    When I visit "/user/@testprivate"
    Then I should receive a valid user object
    And the user.username should equal testprivate

  Scenario: Get non-existing user
    Given that the user @testpublic is logged in
    When I visit "/user/@nothere"
    Then I should receive the json "{\n  \"error\": \"Not found\"\n}"

  Scenario: Get user without having privileges
    Given that the user @testpublic is logged in
    When I visit "/user/@testprivate"
    Then I should receive the json "{\n  \"error\": \"Forbidden\"\n}"

@api
Feature: Users
  Through the api:
    Logged in users access there own account information
    Logged in users access other peoples public account information
    Logged in users cannot access other peoples non-public account information
    Logged in users access other team members non-public team information
    Not logged in users can access other peoples public account information
    Not logged in users can not access other peoples non-public account information

  Scenario: Get current user
    Given that the user @testpublic is logged in
    When I visit "/user/current"
    Then I should receive a valid user object
    And the user.username should equal testpublic

  Scenario: Get specific user
    Given that the user @testpublic is logged in
    When I visit "/user/@testprivate"
    Then I should receive a valid user object
    And the user.username should equal testprivate

  Scenario: Get non-existing user
    Given that the user @testpublic is logged in
    When I visit "/user/@nothere"
    Then I should a json error with "Not found" as the body

  Scenario: Get user without having privileges
    Given that the user @testpublic is logged in
    When I visit "/user/@testprivate"
    Then I should a json error with "Forbidden" as the body

Change how user features detect errors

Change how user features detect errors


@password_change
Feature: Password change

Background:
  Given I have a supplier user
  And that supplier is logged in
  And I am on the /suppliers page

Scenario: Supplier user can change their password
  When I click 'Change your password'
  Then I am on the 'Change your password' page
  When I enter that user.password in the 'Old password' field
  And I enter that user.password in the 'New password' field
  And I enter that user.password in the 'Confirm new password' field
  And I click 'Save changes' button
  Then I see a success banner message containing 'You have successfully changed your password.'
  And I am on the /suppliers page

@password_change
Feature: Password change
Background:

Scenario Outline: Logged in user can change their password
  Given I am logged in as a <role> user
  And I am on the <dashboard_url> page
  When I click 'Change your password'
  Then I am on the 'Change your password' page
  When I enter that user.password in the 'Old password' field
  And I enter that user.password in the 'New password' field
  And I enter that user.password in the 'Confirm new password' field
  And I click 'Save changes' button
  Then I see a success banner message containing 'You have successfully changed your password.'
  And I am on the <dashboard_url> page

  Examples:
    | role     |  dashboard_url |
    | buyer    |  /buyers       |
    | supplier |  /suppliers    |

Add buyer password change example

Add buyer password change example


@contact-create
Feature: Create New Contact
  As an existing user
  I would like to create a new contact for a company

  Scenario: Verify Add new Contact option
    Given I am an authenticated user on Data Hub website
    When I navigate to Contacts page of any company
    Then I verify an option to add a new contact

  Scenario: Add a new Primary Contact
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  Scenario: Add a new Primary Contact with new Company address
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact with a new company address
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  Scenario: Add a new non Primary Contact
    Given I am an authenticated user on Data Hub website
    When I add a new non Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  Scenario: Verify newly added contact under search landing page
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact under search landing page

@contact-create
Feature: Create New Contact
  As an existing user
  I would like to create a new contact for a company

  @contact-create-option
  Scenario: Verify Add new Contact option
    Given I am an authenticated user on Data Hub website
    When I navigate to Contacts page of any company
    Then I verify an option to add a new contact

  @contact-create-primary
  Scenario: Add a new Primary Contact
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  @contact-create-primary-new-company-address
  Scenario: Add a new Primary Contact with new Company address
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact with a new company address
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  @contact-create-non-primary
  Scenario: Add a new non-Primary Contact
    Given I am an authenticated user on Data Hub website
    When I add a new non Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact in company profile

  @contact-create-verify
  Scenario: Verify newly added contact under search landing page
    Given I am an authenticated user on Data Hub website
    When I add a new Primary Contact
    Then I see the contact creation confirmation message
    And I verify my newly added contact under search landing page

E2E: Add tags to interaction and contact scenarios


Feature: Extract booking data
  In order to know how many bookings Pension Wise have made
  The booking manager will need booking data extracted from the booking system

  @wip
  Scenario: Data is extracted from the booking system api
    Given the booking system contains booking data
    When a list of bookings is requested from the booking api
    Then a list of bookings is extracted from the booking api

  @wip
  Scenario: Data is written to disk before any restructuring takes place
    When booking data is extracted from the booking api
    Then the extracted booking data is persisted to disk

  @wip
  Scenario: Isolating the changed data to allow selective processing
    When the booking data is a mix of new and already extracted data
    Then only the changed booking data is extracted

  @wip
  Scenario: Capturing all changes made to booking data
    When booking data has changed since it was previously extracted
    Then the changed booking data is extracted

  @wip
  Scenario: Tag changed data to distinguish corrections from updates

  @wip
  Scenario: Support compliance tracking with additional metadata

Feature: Extract booking data
  In order to know how many bookings Pension Wise have made
  The booking manager will need booking data extracted from the booking system

  @wip
  Scenario: Data is extracted from the booking system api
    Given the booking system contains booking data
    When a list of bookings is requested from the booking api
    Then a list of bookings is extracted from the booking api

  @wip
  Scenario: Data is written to disk before any restructuring takes place
    When booking data is extracted from the booking api
    Then the extracted booking data is persisted to disk

  @wip
  Scenario: Isolating the changed data to allow selective processing
    When the booking data is a mix of new and already extracted data
    Then only the changed booking data is extracted

  @wip
  Scenario: Extracting new booking bug data entry
    Given the booking bug data has new entries since the last extract
    When the booking bug data is extracted
    Then only the new entries are extracted
    And the pre existing entries are not effected

  @wip
  Scenario: Extracting edited booking bug data entry
    Given the booking bug data has edited entries since the last extract
    When the booking bug data is extracted
    Then only the edited entries are extracted
    And the pre existing entries are not effected

  @wip
  Scenario: No changes - booking bug data extract
    Given the booking bug data has not changed since the last extract
    Then no booking bug data is extracted
    And the pre existing entires are not effected

  @wip
  Scenario: Capturing all changes made to booking data
    When booking data has changed since it was previously extracted
    Then the changed booking data is extracted

  @wip
  Scenario: Tag changed data to distinguish corrections from updates

  @wip
  Scenario: Support compliance tracking with additional metadata

Add specific scenarios around new and edited data


Feature:
    In order to embed images into pages on LANager
    As a LAN organiser
    I need to upload images to LANager

    Scenario:

Feature:
    In order to embed images into pages on LANager
    As a LAN organiser
    I need to upload images to LANager

    Background:
        Given an admin with username "Zero Cool" exists

    Scenario: Admin uploads an image
        Given I am logged in as "Zero Cool"

        When I go to the homepage
        And I go to "/images"
        And I attach the file "public/img/bg.jpg" to "images"
        And I press "Upload"

        Then I should see "Image(s) successfully uploaded"
        And I should see "bg.jpg"

    Scenario: Admin deletes an image
        # TODO: Requires Selenium due to Javascript being used for "delete" button

Add test scenarios for image uploads

Add test scenarios for image uploads


Feature: image fallbacks

  @normal
  Scenario: Image fallbacks look vaguely correct
    Given I am benchmarking
    When I GET https://spotlight.{GOVUK_APP_DOMAIN}/performance/carers-allowance/volumetrics.png
    Then I should receive an HTTP 200
     And the image should be between 950 and 970 pixels wide
     And the image should be between 400 and 410 pixels high

Feature: image fallbacks

  @normal
  Scenario: Image fallbacks look vaguely correct
    Given I am benchmarking
    When I GET https://spotlight.{GOVUK_APP_DOMAIN}/performance/carers-allowance/volumetrics.png
    Then I should receive an HTTP 410

Update screenshot as a service test.

Update screenshot as a service test.

Screenshot as a service has been disabled. The test has been updated
to reflect that.


@managing_customers
Feature: Editing a customer
    In order to change information about a customer
    As an Administrator
    I want to be able to edit the customer

    Background:
        Given I am logged in as an administrator

    @ui
    Scenario: Changing first and last name of an existing customer
        Given the store has customer "Frodo Baggins" with email "f.baggins@example.com"
        And I want to edit this customer
        When I specify his first name as "Jon"
        And I specify his last name as "Snow"
        And I save my changes
        Then I should be notified that it has been successfully edited
        And this customer with name "Jon Snow" should appear in the store

    @ui
    Scenario: Removing first and last name from an existing customer
        Given the store has customer "Luke Skywalker" with email "l.skywalker@gmail.com"
        And I want to edit this customer
        When I remove its first name
        And I remove its last name
        And I save my changes
        Then I should be notified that it has been successfully edited
        And this customer should have an empty first name
        And this customer should have an empty last name

    @todo
    Scenario: Making an existing customer subscribed to the newsletter
        Given the store has customer "Mike Ross" with email "ross@teammike.com"
        When I want to edit this customer
        And I make them subscribed to the newsletter
        And I save my changes
        Then I should be notified that it has been successfully edited
        And this customer should subscribe to the newsletter

[Admin][Customer] Add scenario for making customer subscribed to the newsletter


Feature: GZIP sitemap build

  Scenario: Sitemap should be gzipped by default
    Given a successfully built app at "gzip-app"
    Then the following files should exist:
      | build/sitemap.xml.gz |
      | build/sitemap.xml |

  Scenario: Sitemap should not be gzipped when option set to false
    Given a fixture app "gzip-app"
    And a file named "config.rb" with:
      """
      activate :sitemap, :gzip => false
      """
    And a successfully built app at "gzip-app"
    When I cd to "build"
    Then the following files should not exist:
      | build/sitemap.xml.gz |

  Scenario: Sitemap should not be gzipped when option set to false
    Given a fixture app "gzip-app"
    And a file named "config.rb" with:
      """
      activate :sitemap, :hostname => "http://www.apple.com"
      """
    And a successfully built app at "gzip-app"
    When I cd to "build"
    Then the file "sitemap.xml" should contain "http://www.apple.com"

  Scenario: Site that has been gzipped
    Given a fixture app "gzip-app"
    And a file named "config.rb" with:
    """
    activate :gzip
    activate :sitemap, :hostname => "http://www.apple.com"
    """
    And a successfully built app at "gzip-app"
    When I cd to "build"
    Then the file "sitemap.xml" should contain "http://www.apple.com"

Add test around GZIP extension

Add test around GZIP extension


@polymer-bond
Feature: Sass mixin files

  In order to make Polymer awesome
  It should generate Sass mixins

  Scenario: Creating a Sass mixin with a sprite
    Given I have a default project
      And I have 1 source in sources/fry
    When I run "polymer bond"
    Then the exit status should be 0
      And a Sass mixin should exist
      And the stdout should contain "written  Sass"

  Scenario: When nothing is generated
    Given I have a default project
      And I have 1 source in sources/fry
      And I run "polymer bond"
    When I run "polymer bond"
    Then the stdout should not contain "written  Sass"

  Scenario: Disabling Sass in the config file
    Given I have a project with config:
    """
    ---
      config.sass false

      sprites 'sources/:name/*' => 'sprites/:name.png'
    """
    Then a Sass mixin should not exist

@polymer-bond
Feature: Sass mixin files

  In order to make Polymer awesome
  It should generate Sass mixins

  Scenario: Creating a Sass mixin with a sprite
    Given I have a default project
      And I have 1 source in sources/fry
    When I run "polymer bond"
    Then the exit status should be 0
      And a Sass mixin should exist
      And the stdout should contain "written  Sass"

  Scenario: When nothing is generated
    Given I have a default project
      And I have 1 source in sources/fry
      And I run "polymer bond"
    When I run "polymer bond"
    Then the stdout should not contain "written  Sass"

  Scenario: Disabling Sass in the config file
    Given I have a project with config:
    """
    config.sass false
    sprites 'sources/:name/*' => 'sprites/:name.png'
    """
    Then a Sass mixin should not exist

Clean up Sass mixin feature.

Clean up Sass mixin feature.


Feature: Recording a prescription

  Rules:
  - The administration (e.g. injection) of certain drugs requires a trained professional
   (i.e. Nurse) and the HD session provides this opportunity.

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

  @web @javascript
  Scenario: A clinician recorded the prescription for a patient
    When Clyde records the prescription for Patty
    Then the prescription is recorded for Patty

  @web @javascript
  Scenario: A clinician recorded the prescription for a patient with a termination date
    When Clyde records the prescription for Patty with a termination date
    Then the prescription is recorded for Patty
    And Clyde is recorded as the user who terminated the prescription

 @web @javascript
  Scenario: A clinician flagged a prescription to be administered during an HD session
    When Clyde flags the prescription for Patty to be administered during an HD session
    Then Clyde is prompted to administer the prescription during Patty's future HD sessions

Feature: Recording a prescription

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

  @web @javascript
  Scenario: A clinician recorded the prescription for a patient
    When Clyde records the prescription for Patty
    Then the prescription is recorded for Patty

  @web @javascript
  Scenario: A clinician recorded the prescription for a patient with a termination date

    The administration (e.g. injection) of certain drugs requires a trained professional
    (i.e. Nurse) and the HD session provides this opportunity.

    When Clyde records the prescription for Patty with a termination date
    Then the prescription is recorded for Patty
    And Clyde is recorded as the user who terminated the prescription

 @web @javascript
  Scenario: A clinician flagged a prescription to be administered during an HD session
    When Clyde flags the prescription for Patty to be administered during an HD session
    Then Clyde is prompted to administer the prescription during Patty's future HD sessions

Reposition rule as a description of the scenario

This is not an enforced business rule and only applies to this scenario


@administrator_login
Feature: Resetting an administrator's password
    In order to login to my administrator account when I forget my password
    As a not logged in Administrator
    I want to be able to reset my password

    Background:
        Given there is an administrator "sylius@example.com" identified by "sylius"

    @todo
    Scenario: Sending an administrator's password reset request
        When I want to reset password
        And I specify email as "sylius@example.com"
        And I reset it
        Then I should be notified that email with reset instruction has been sent
        And an email with instructions on how to reset the password should be sent to "sylius@example.com"

    @todo
    Scenario: Changing my administrator's password
        Given I have already received an administrator's password resetting email
        When I reset my password using the received instructions
        And I specify my new password as "newp@ssw0rd"
        And I confirm my new password as "newp@ssw0rd"
        And I reset it
        Then I should be notified that my password has been successfully changed
        And I should be able to log in as "sylius@example.com" with "newp@ssw0rd" password

    @todo
    Scenario: Trying to change my administrator's password twice without sending a new password reset request
        Given I already reset my administrator's password
        When I try to reset my password again using the same email
        Then I should not be able to change my password again without sending a new password reset request

@administrator_login
Feature: Resetting an administrator's password
    In order to login to my administrator account when I forget my password
    As a not logged in Administrator
    I want to be able to reset my password

    Background:
        Given there is an administrator "sylius@example.com" identified by "sylius"

    @todo
    Scenario: Sending an administrator's password reset request
        When I want to reset password
        And I specify email as "sylius@example.com"
        And I reset it
        Then I should be notified that email with reset instruction has been sent
        And an email with instructions on how to reset the password should be sent to "sylius@example.com"

    @todo
    Scenario: Changing my administrator's password
        Given I have already received an administrator's password resetting email
        When I reset my password using the received instructions
        And I specify my new password as "newp@ssw0rd"
        And I confirm my new password as "newp@ssw0rd"
        And I reset it
        Then I should be notified that my password has been successfully changed
        And I should be able to log in as "sylius@example.com" with "newp@ssw0rd" password

    @todo
    Scenario: Trying to change my administrator's password twice without sending a new password reset request
        Given I already reset my administrator's password
        When I try to reset my password again using the same email
        Then I should not be able to change it again without sending a new password reset request

Improve the wording of the behat scenario

Co-authored-by: Adam Kasperczak <aeaefbc00060cf6cede0b3e241b2b613fb9fefa0@gmail.com>


Feature: AmiGO search start pages show counts consistent with data loads

 ## No Background necessary.

 Scenario Outline: the search page shows counts consistent with data loads
   Given I go to search page "<searchpage>"
    then the total should be within 10% of recent count "<count>"
   Examples: search pages
    | searchpage               | count                    |
#   |--------------------------+--------------------------|
    | /amigo/search/annotation | 4722464                  |
    | /amigo/search/ontology   | 1319364                    |
    | /amigo/search/bioentity  | 828474                   |
##

Feature: AmiGO search pages show counts consistent with data loads

 ## No Background necessary.

 @production
 Scenario Outline: the search pages on the production server show counts consistent with data loads
   Given I go to search page "<searchpage>"
    then the total should be within 10% of recent count "<count>"
   Examples: search pages
    | searchpage               | count                    |
#   |--------------------------+--------------------------|
    | /amigo/search/annotation | 4715870                  |
    | /amigo/search/ontology   | 74795                    |
    | /amigo/search/bioentity  | 828351                   |
##

 @labs
 Scenario Outline: the search pages on the labs server show counts consistent with data loads
   Given I go to search page "<searchpage>"
    then the total should be within 10% of recent count "<count>"
   Examples: search pages
    | searchpage               | count                    |
#   |--------------------------+--------------------------|
    | /amigo/search/annotation | 4724502                  |
    | /amigo/search/ontology   | 1319608                  |
    | /amigo/search/bioentity  | 828489                   |
##

Tag test for labs or production

Tag test for labs or production