Skip to content
Snippets Groups Projects
Commit 62ee3c55 authored by makoto suzuki's avatar makoto suzuki Committed by Yas Naoi
Browse files

Issue #3291627 by makoto suzuki, yas, kumikoono: Add a BDD test suite for...

Issue #3291627 by makoto suzuki, yas, kumikoono: Add a BDD test suite for VMware VMs (Create, Read and Delete)
parent 504845e1
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
@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 }}"
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment