Skip to content
Snippets Groups Projects
Commit f15b670e authored by Kumiko Ono's avatar Kumiko Ono Committed by Yas Naoi
Browse files

Issue #3276704 by kumikoono, yas: Add a BDD test suite for Namespaces (Create and Delete)

parent d76c9d46
No related branches found
No related tags found
4 merge requests!1759Issue #3356778: Release 5.1.1,!1679Issue #3349074: Fix the OpenStack Project create and edit form in SPA that "Member" cannot be saved due to a validation error,!1607Issue #3343582: Add the function to preview OpenStack stack in the SPA,!1032Issue #3284576: Release 5.0.0-alpha2
Feature: Create a namespace for K8s as "Authenticated User"
@api @javascript
Scenario: Create a namespace
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/namespace/add"
And I should see the heading "Add Namespace"
And I enter "{{ namespace }}" for "Name"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/namespace"
And I should see the success message "{{ namespace }} has been created"
And I should see the link "{{ namespace }}"
And I should see the link "{{ namespace }}" in the table
@api
Scenario: Update the role
Given I am logged in as a user with the "Administrator" role
When I visit "admin/people/permissions/{{ role_name_machine }}"
And I check the box "Access entities belonging to k8s namespace {{ namespace }}"
And I press "Save permissions"
And I should see "The changes have been saved."
Feature: Delete the created namespace for K8s as "Authenticated User"
@api @javascript
Scenario: Delete the created namespace
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/namespace"
And I should see the heading "K8s Namespaces"
And I click "Refresh"
And I should see the link "{{ namespace }}"
And I wait {{ wait }} milliseconds
And I click "{{ namespace }}"
And the url should match "/namespace/"
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/k8s/{{ cloud_context }}/namespace"
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 see the link "{{ namespace }}" in the table
And I should see the text "Terminating" in the "{{ namespace }}" row
......@@ -18,7 +18,7 @@ k8s_cloud_service_provider_name_entered:
k8s_cloud_service_provider_name:
BDD_K8s_@Random
namespace:
default
bdd-namespace-@random
pod_name:
nginx-@random
port:
......@@ -33,3 +33,5 @@ user_name:
BDD_user_@Random
user_password:
BDD_pwd_@Random
wait:
500
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment