Commit c8510172 authored by Tomohiro Ono's avatar Tomohiro Ono Committed by Yas Naoi
Browse files

Issue #3269370 by onotm, yas, kumikoono: Add a BDD test scenario for copying a...

Issue #3269370 by onotm, yas, kumikoono: Add a BDD test scenario for copying a security group (Delete)
parent 3f9e462a
Loading
Loading
Loading
Loading
+10 −17
Original line number Diff line number Diff line
@@ -40,26 +40,19 @@ Feature: Copying/editing a security group as "Authenticated User"
    When I visit "/clouds/aws_cloud/{{ cloud_context }}/security_group"
    And I click "Refresh"
    And I should see the link "{{ security_group_name_to_copy }}"
    And I wait {{wait}} milliseconds
    And I click "{{ security_group_name_to_copy }}"
    And the url should match "/security_group/"
    And I click "Delete" in the "actions"
    And the url should match "/delete"
    And I press "Delete"
    And I wait for AJAX to finish
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/security_group"
    And I should see "has been deleted"
    And I click "Refresh"
    And I should not see the link "{{ security_group_name_to_copy }}" in the table
    And I check the box in the "{{ security_group_name_to_copy }}" row
    And I should see the link "{{ security_group_name_copied }}"
    And I wait {{wait}} milliseconds
    And I click "{{ security_group_name_copied }}"
    And the url should match "/security_group/"
    And I click "Delete" in the "actions"
    And the url should match "/delete"
    And I check the box in the "{{ security_group_name_copied }}" row
    And I select "Delete security group(s)" from "Action"
    And I press "Apply to selected items"
    And the url should match "/delete_multiple"
    And I should see the text "{{ security_group_name_to_copy }}"
    And I should see the text "{{ security_group_name_copied }}"
    And I press "Delete"
    And I wait for AJAX to finish
    Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/security_group"
    Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/security_group"
    And I should see "has been deleted"
    And I should see "Deleted 2 items"
    And I click "Refresh"
    And I should not see the link "{{ security_group_name_to_copy }}" in the table
    And I should not see the link "{{ security_group_name_copied }}" in the table
+11 −0
Original line number Diff line number Diff line
@@ -40,4 +40,15 @@ class FeatureContext extends DrupalContext {
    }
  }

  /**
   * Check a box in a table row containing given text.
   *
   * @When I check the box in the :rowText row
   */
  public function checkBoxInTableRow($rowText): void {
    $row = $this->getTableRow($this->getSession()->getPage(), $rowText);
    $input = $row->find('css', 'input');
    $input->check();
  }

}