Skip to content
Snippets Groups Projects
Commit 8184e6f4 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 dca6720f
Branches
Tags
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!880Issue #3276704: Add a BDD test suite for Namespaces (1) (Create)
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