Loading modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/templates/AWS-ATDD-00-13-UserResourceSecurityGroup.feature +10 −17 Original line number Diff line number Diff line Loading @@ -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 tests/src/Behat/features/bootstrap/FeatureContext.php +11 −0 Original line number Diff line number Diff line Loading @@ -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(); } } Loading
modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/templates/AWS-ATDD-00-13-UserResourceSecurityGroup.feature +10 −17 Original line number Diff line number Diff line Loading @@ -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
tests/src/Behat/features/bootstrap/FeatureContext.php +11 −0 Original line number Diff line number Diff line Loading @@ -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(); } }