Commit 5979b50e authored by Yas Naoi's avatar Yas Naoi Committed by Yas Naoi
Browse files

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

Issue #3312215 by yas, TamakiFujino, kumikoono: Add a BDD test scenario for creating and deleting AWS Cloud VPC peering connection
parent 4550b4e4
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
@ci_job
Feature: Create and view a VPC peering connection as "Authenticated User"

  @api
  Scenario: Add a requester VPC
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc/add"
    And I should see the heading "Add AWS Cloud VPC"
    And I enter "{{ vpc_requester_name }}" for "Name"
    And I enter "{{ ipv4_cidr_requester }}" for "IPv4 CIDR block"
    And I press "Save"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/vpc"
    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 "{{ vpc_requester_name }}" in the table

  @api
  Scenario: Add an accepter VPC
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc/add"
    And I should see the heading "Add AWS Cloud VPC"
    And I enter "{{ vpc_accepter_name }}" for "Name"
    # needs an VPC with a different cidr rance from the first VPC
    And I enter "{{ ipv4_cidr_accepter }}" for "IPv4 CIDR block"
    And I press "Save"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/vpc"
    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 "{{ vpc_accepter_name }}" in the table

  @api
  Scenario: Create a VPC peering connection
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection/add"
    And I should see the heading "Add AWS Cloud VPC peering connection"
    And I enter "{{ vpc_peering_connection_name }}" for "Name"
    And I select "{{ vpc_requester_name }}" from "Requester VPC ID"
    And I select "{{ vpc_accepter_name }}" from "Accepter VPC ID"
    And I press "Save"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection"
    And I should see the success message "has been created"
    And I should see neither error nor warning messages
    And I should see "pending-acceptance" in the "{{ vpc_peering_connection_name }}" row

  @api
  Scenario: Accept the VPC peering connection
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection"
    And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ vpc_peering_connection_name }}"
    And I should see "pending-acceptance" in the "{{ vpc_peering_connection_name }}" row
    And I click "{{ vpc_peering_connection_name }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection/"
    And I click "Accept" in the "actions"
    And the url should match "/accept"
    And I press "Accept"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection"
    And I should see the success message "has been accepted"
    And I should see neither error nor warning messages
    And I should see "active" in the "{{ vpc_peering_connection_name }}" row

  @api
  Scenario: Delete the VPC peering connection
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection"
    And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ vpc_peering_connection_name }}"
    And I should see "active" in the "{{ vpc_peering_connection_name }}" row
    And I click "{{ vpc_peering_connection_name }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc_peering_connection/"
    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 }}/vpc_peering_connection"
    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 see "deleted" in the "{{ vpc_peering_connection_name }}" row

  @api
  Scenario: Delete the VPCs
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc"
    And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ vpc_requester_name }}"
    And I check the box in the "{{ vpc_requester_name }}" row
    And I should see the link "{{ vpc_accepter_name }}"
    And I check the box in the "{{ vpc_accepter_name }}" row
    And I select "Delete VPC(s)" from "Action"
    And I press "Apply to selected items"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc/delete_multiple"
    And I should see the text "{{ vpc_requester_name }}"
    And I should see the text "{{ vpc_accepter_name }}"
    And I press "Delete"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/vpc"
    And I should see the success message "has been deleted"
    And I should see the success message "Deleted 2 items"
    And I should see neither error nor warning messages
    And I click "Refresh"
    And I should not see the link "{{ vpc_requester_name }}"
    And I should not see the link "{{ vpc_accepter_name }}"
+10 −0
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@ ip_protocol:
  All traffic
ipv4_cidr:
  10.0.0.0/24
ipv4_cidr_requester:
  10.0.0.0/24
ipv4_cidr_accepter:
  172.31.0.0/16
port:
  80
resource_type:
@@ -91,6 +95,8 @@ volume_name_operate:
  BDD_Volume_@Random_Operate
volume_size:
  1
vpc_accepter_name:
  BDD_VPC_@Random_Accepter
vpc_name:
  BDD_VPC_@Random
vpc_name_operate:
@@ -99,6 +105,10 @@ vpc_name_operate_updated:
  BDD_VPC_@Random_Updated_Operate
vpc_name_1:
  BDD_VPC_1_@Random
vpc_peering_connection_name:
  BDD_VPC_PC_@Random
vpc_requester_name:
  BDD_VPC_@Random_Requester
wait:
  500
wait_dropdown: