Commit 3530e8c2 authored by shota niioka's avatar shota niioka Committed by Yas Naoi
Browse files

Issue #3288063 by shota niioka, kumikoono, yas: Add a BDD test suite for key...

Issue #3288063 by shota niioka, kumikoono, yas: Add a BDD test suite for key pairs (Create and Delete)
parent 3f212ab2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ Feature: Create a cloud service provider for OpenStack as "Cloud administrator"
    And I enter "{{ api_neutron }}" for "Network API endpoint"
    And I enter "{{ api_cinder }}" for "Volume API endpoint"
    And I press "Save"
    And I wait {{ wait }} seconds
    Then I should be on "/admin/structure/cloud_config"
    And I should see the success message "has been created"
    And I should see neither error nor warning messages
+17 −0
Original line number Diff line number Diff line
@minimal @ci_job
Feature: Create resources for OpenStack as "Authenticated User"

  @api @javascript
  Scenario: Create a key pair
    Given I am logged in as user "{{ drupal_user_name }}"
    When I visit "/clouds/openstack/{{ cloud_context }}/key_pair/add"
    And I should see the heading "Add OpenStack key pair"
    And I enter "{{ key_name }}" for "Key pair name"
    And I press "Save"
    And I wait for AJAX to finish
    Then the url should match "/clouds/openstack/{{ cloud_context }}/key_pair"
    And I should see the success message "has been created"
    And I should see the warning message "Download private key. Once downloaded, the key will be deleted from the server."
    And I should see no error message
    And I click "Download private key" in the warning_message
    And I should see the link "{{ key_name }}"
+20 −0
Original line number Diff line number Diff line
@minimal @ci_job
Feature: Delete the created resources for OpenStack as "Authenticated user"

  @api @javascript
  Scenario: Delete a key pair
    Given I am logged in as user "{{ drupal_user_name }}"
    When I visit "/clouds/openstack/{{ cloud_context }}/key_pair"
    And I click "Refresh"
    And I should see the link "{{ key_name }}"
    And I wait {{ wait }} milliseconds
    And I click "{{ key_name }}"
    Then the url should match "/clouds/openstack/{{ cloud_context }}/key_pair/"
    And I click "Delete"
    Then the url should match "/delete"
    And I press "Delete"
    Then I should be on "/clouds/openstack/{{ cloud_context }}/key_pair"
    And I should see the success message "has been deleted"
    And I should see neither error nor warning messages
    And I click "Refresh"
    And I should not see the link "{{ key_name }}"
+2 −0
Original line number Diff line number Diff line
@@ -45,3 +45,5 @@ user_name:
  # You need to change the value here, or define the key-value
user_password:
  # You need to change the value here, or define the key-value
wait:
  500
 No newline at end of file