Commit 13013e29 authored by Tamaki Fujino's avatar Tamaki Fujino Committed by Yas Naoi
Browse files

Issue #3310768 by TamakiFujino, yas, kumikoono: Add a BDD test scenario for...

Issue #3310768 by TamakiFujino, yas, kumikoono: Add a BDD test scenario for creating and deleting AWS Cloud snapshots
parent 4355a266
Loading
Loading
Loading
Loading
+68 −0
Original line number Diff line number Diff line
@ci_job
Feature: Create and view a snapshot as "Authenticated User"

  @api
  Scenario: Create a volume
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume/add"
    And I should see the heading "Add AWS Cloud volume"
    And I enter "{{ volume_name_operate }}" for "Name"
    And I enter "{{ volume_size }}" for "Size (GiB)"
    And I select "{{ availability_zone }}" from "Availability Zone"
    And I press "Save"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/volume"
    And I should see the success message "has been created"
    And I should see neither error nor warning messages
    And I should see "creating" in the "{{ volume_name_operate }}" row

  @api
  Scenario: Create a snapshot
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/snapshot/add"
    And I should see the heading "Add AWS Cloud snapshot"
    And I enter "{{ snapshot_name_operate }}" for "Name"
    And I select "{{ volume_name_operate }}" from "Volume ID"
    And I press "Save"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/snapshot"
    And I should see the success message "has been created"
    And I should see neither error nor warning messages
    And I should see the link "{{ snapshot_name_operate }}" in the table

  @api
  Scenario: Delete the snapshot
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/snapshot"
    # And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ snapshot_name_operate }}"
    And I click "{{ snapshot_name_operate }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/snapshot/"
    And I click "Delete" in the "actions"
    And the url should match "/delete"
    And I press "Delete"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/snapshot"
    And I should see the success message "has been deleted"
    And I should see neither error nor warning messages
    And I click "Refresh"
    # No table exists.
    And I should not see the link "{{ snapshot_name_operate }}"

  @api
  Scenario: Delete the volume
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume"
    And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ volume_name_operate }}"
    And I should see "available" in the "{{ volume_name_operate }}" row
    And I click "{{ volume_name_operate }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/volume/"
    And I click "Delete" in the "actions"
    And the url should match "/delete"
    And I press "Delete"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/volume"
    And I should see the success message "has been deleted"
    And I should see neither error nor warning messages
    And I click "Refresh"
    # volume_name exists in the listing view.
    And I should not see the link "{{ volume_name_operate }}"
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ security_group_name_copied:
  BDD_SG_@Random_COPIED
security_group_source:
  IP
snapshot_name_operate:
  BDD_Snapshot_@Random_Operate
ssh_key_name:
  BDD_Key_@Random
ssh_key_name_operate:
@@ -85,6 +87,8 @@ user_password:
  BDD_pwd_@Random
volume_name:
  BDD_Volume_@Random
volume_name_operate:
  BDD_Volume_@Random_Operate
volume_size:
  1
vpc_name: