Loading modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/VMware-ATDD-00-02-CreateDrupalResource.feature +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ Feature: Create a Drupal role for VMware as "Administrator" Then I should be on "/admin/people/roles" And I should see "{{ drupal_role_name }}" And I visit "/admin/people/permissions/{{ drupal_role_name_machine }}" # Access entities And I check the box "Delete own VMware VM" And I check the box "Edit own VMware VM" And I check the box "View any VMware Host" And I check the box "View own VMware VM" # Allow to see the cloud service provider And I check the box "Access {{ cloud_service_provider_name }}" # Allow to launch an instance. Loading modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/VMware-ATDD-02-01-OperateVMs.feature 0 → 100644 +53 −0 Original line number Diff line number Diff line @minimal @ci_job Feature: Create, Read, Delete a VMs for VMware as "Authenticated User" @api @javascript Scenario: Create a VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm/add" And I should see the heading "Add VM" And I enter "{{ vm_name }}" for "Name" And I select "{{ host_name }}" from "Host" And I select "{{ vm_folder }}" from "Folder" And I select "{{ vm_datastore }}" from "Datastore" And I select "{{ vm_guest_os }}" from "Guest OS" And I enter "{{ vm_disk_size }}" for "Disk Size (GiB)" And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/vmware/{{ cloud_context }}/vm" And I should see "{{ vm_name }}" in the "POWERED_OFF" row 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 "{{ vm_name }}" in the table @api @javascript Scenario: Read the VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ vm_name }}" And I click "{{ vm_name }}" Then the url should match "/clouds/vmware/{{ cloud_context }}/vm" And I should see "{{ vm_name }}" And I should see "POWERED_OFF" And I should see "{{ vm_disk_size }}" @api @javascript Scenario: Delete the VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ vm_name }}" And I click "{{ vm_name }}" And the url should match "/vmware/{{ cloud_context }}/vm/" 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/vmware/{{ cloud_context }}/vm" 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 not see the link "{{ vm_name }}" modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/params/vmware_params.yml +17 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ drupal_user_name: BDD_user_@Random drupal_user_password: BDD_pwd_@Random host_name: # You need to change the value here, or define it in a sepate file. your_host_name vcenter_password: # You need to change the value here, or define it in a sepate file. your_vcenter_pwd Loading @@ -30,5 +33,19 @@ vcenter_url: vcenter_username: # You need to change the value here, or define it in a sepate file. your_vcenter_username vm_datastore: # You need to change the value here, or define it in a sepate file. your_datestore vm_disk_size: # You need to change the value here, or define it in a sepate file. your_disk_size vm_folder: # You need to change the value here, or define it in a sepate file. your_folder vm_guest_os: # You need to change the value here, or define it in a sepate file. your_guest_os vm_name: BDD_vm_@Random wait: 500 Loading
modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/VMware-ATDD-00-02-CreateDrupalResource.feature +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ Feature: Create a Drupal role for VMware as "Administrator" Then I should be on "/admin/people/roles" And I should see "{{ drupal_role_name }}" And I visit "/admin/people/permissions/{{ drupal_role_name_machine }}" # Access entities And I check the box "Delete own VMware VM" And I check the box "Edit own VMware VM" And I check the box "View any VMware Host" And I check the box "View own VMware VM" # Allow to see the cloud service provider And I check the box "Access {{ cloud_service_provider_name }}" # Allow to launch an instance. Loading
modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/VMware-ATDD-02-01-OperateVMs.feature 0 → 100644 +53 −0 Original line number Diff line number Diff line @minimal @ci_job Feature: Create, Read, Delete a VMs for VMware as "Authenticated User" @api @javascript Scenario: Create a VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm/add" And I should see the heading "Add VM" And I enter "{{ vm_name }}" for "Name" And I select "{{ host_name }}" from "Host" And I select "{{ vm_folder }}" from "Folder" And I select "{{ vm_datastore }}" from "Datastore" And I select "{{ vm_guest_os }}" from "Guest OS" And I enter "{{ vm_disk_size }}" for "Disk Size (GiB)" And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/vmware/{{ cloud_context }}/vm" And I should see "{{ vm_name }}" in the "POWERED_OFF" row 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 "{{ vm_name }}" in the table @api @javascript Scenario: Read the VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ vm_name }}" And I click "{{ vm_name }}" Then the url should match "/clouds/vmware/{{ cloud_context }}/vm" And I should see "{{ vm_name }}" And I should see "POWERED_OFF" And I should see "{{ vm_disk_size }}" @api @javascript Scenario: Delete the VMs Given I am logged in as user "{{ drupal_user_name }}" When I visit "/clouds/vmware/{{ cloud_context }}/vm" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ vm_name }}" And I click "{{ vm_name }}" And the url should match "/vmware/{{ cloud_context }}/vm/" 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/vmware/{{ cloud_context }}/vm" 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 not see the link "{{ vm_name }}"
modules/cloud_service_providers/vmware/tests/src/Behat/features/templates/params/vmware_params.yml +17 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ drupal_user_name: BDD_user_@Random drupal_user_password: BDD_pwd_@Random host_name: # You need to change the value here, or define it in a sepate file. your_host_name vcenter_password: # You need to change the value here, or define it in a sepate file. your_vcenter_pwd Loading @@ -30,5 +33,19 @@ vcenter_url: vcenter_username: # You need to change the value here, or define it in a sepate file. your_vcenter_username vm_datastore: # You need to change the value here, or define it in a sepate file. your_datestore vm_disk_size: # You need to change the value here, or define it in a sepate file. your_disk_size vm_folder: # You need to change the value here, or define it in a sepate file. your_folder vm_guest_os: # You need to change the value here, or define it in a sepate file. your_guest_os vm_name: BDD_vm_@Random wait: 500