Commit 7b956604 authored by Tamaki Fujino's avatar Tamaki Fujino Committed by Yas Naoi
Browse files

Issue #3312996 by TamakiFujino, yas: Add a BDD test scenario for reading and...

Issue #3312996 by TamakiFujino, yas: Add a BDD test scenario for reading and updating AWS Cloud carrier gateway
parent 9e4592dd
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
@ci_job
Feature: Create and view a carrier gateway as "Authenticated User"

  @api
  Scenario: Add a 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_name_operate }}" for "Name"
    And I enter "{{ ipv4_cidr }}" 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_name_operate }}" in the table

  @api
  Scenario: Create a carrier gateway
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway/add"
    And I should see the heading "Add AWS Cloud carrier gateway"
    And I enter "{{ carrier_gateway_name_operate }}" for "Name"
    And I select "{{ vpc_name_operate }}" from "VPC CIDR (ID)"
    And I press "Save"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway"
    And I should see the success message "has been created"
    And I should see neither error nor warning messages
    And I should see "available" in the "{{ carrier_gateway_name_operate }}" row

  @api
  Scenario: View the carrier gateway
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway"
    And I click "Refresh"
    And I should see the heading "AWS Cloud carrier gateways"
    And I should see "{{ carrier_gateway_name_operate }}" in the table
    And I wait {{ wait }} milliseconds
    And I click "{{ carrier_gateway_name_operate }}"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway/"
    And I should see "{{ carrier_gateway_name_operate }}" in the "page_header"
    And I should see "{{ carrier_gateway_name_operate }}" in the "Tag name"
    And I should see "{{ user_name }}" in the "Authored by"
    And I should see neither error nor warning messages

  @api
  Scenario: Update the carrier gateway
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway"
    And I click "Refresh"
    And I should see the heading "AWS Cloud carrier gateways"
    And I should see "{{ carrier_gateway_name_operate }}" in the table
    And I wait {{ wait }} milliseconds
    And I click "{{ carrier_gateway_name_operate }}"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway/"
    And I click "Edit" in the "actions"
    And the url should match "/edit"
    And I enter "{{ carrier_gateway_name_operate_updated }}" for "Name"
    And I press "Save"
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway"
    And I should see the success message "has been updated"
    And I should see neither error nor warning messages

  @api
  Scenario: Delete the carrier gateway
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway"
    And I click "Refresh"
    And I wait {{ wait }} milliseconds
    And I should see the link "{{ carrier_gateway_name_operate_updated }}"
    And I click "{{ carrier_gateway_name_operate_updated }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/carrier_gateway/"
    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 }}/carrier_gateway"
    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 "{{ carrier_gateway_name_operate_updated }}"

  @api @javascript
  Scenario: Delete the VPC
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/vpc"
    And I click "Refresh"
    And I should see the link "{{ vpc_name_operate }}"
    And I wait {{ wait }} milliseconds
    And I click "{{ vpc_name_operate }}"
    And the url should match "/clouds/aws_cloud/{{ cloud_context }}/vpc/"
    And I should see "{{ vpc_name_operate }}" in the "page_header"
    And I press "Others"
    And I should see "{{ user_name }}" in the "Authored by"
    And I should see neither error nor warning messages
    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"
    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.
    # Without @javascript, the following step fails.
    And I should not see the link "{{ vpc_name_operate }}"
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ account_id:
account_id_switch_to:
  # You need to change the value here, or define the key-value in a separate file.
  your_account_id_switch_to
carrier_gateway_name_operate:
  BDD_CG_@Random_Operate
carrier_gateway_name_operate_updated:
  BDD_CG_@Random_Updated_Operate
cloud_service_provider_name_entered:
  # Corresponding to cloud_context and cloud_service_provider_name suffix.
  BDD_AWS_@Random