Skip to content
Snippets Groups Projects
Commit 790f47fa authored by Takumaru Sekine's avatar Takumaru Sekine Committed by Yas Naoi
Browse files

Issue #3294030 by sekinet, yas, kumikoono: Add a BDD test suite for Namespaces (Read and Update)

parent 59238717
No related branches found
No related tags found
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!1155Issue #3294030: Add a BDD test suite for Namespaces (Read and Update)
......@@ -15,6 +15,66 @@ Feature: Create a namespace for K8s as "Authenticated User"
And I should see the link "{{ namespace }}"
And I should see the link "{{ namespace }}" in the table
@api
Scenario: Read the created namespace
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/namespace"
And I should see "K8s namespaces"
And I click "Refresh"
And I should see the link "{{ namespace }}"
And I wait {{ wait }} milliseconds
And I click "{{ namespace }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/namespace/"
And I should see "{{ namespace }}" in the "page_header"
And I should see "{{ namespace }}" in the "details"
And I should see "Active" in the "details"
@api @javascript
Scenario: Update 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 }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/namespace/"
And I click "Edit"
And I fill in "{{ namespace_labels_item_key_field }}" with "{{ namespace_labels_item_key }}"
And I fill in "{{ namespace_labels_item_value_field }}" with "{{ namespace_labels_item_value }}"
And I fill in "{{ namespace_annotations_item_key_field }}" with "{{ namespace_annotations_item_key }}"
And I fill in "{{ namespace_annotations_item_value_field }}" with "{{ namespace_annotations_item_value }}"
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 "has been updated"
And I should see neither error nor warning messages
And I wait {{ wait }} milliseconds
And I click "Refresh"
And I click "{{ namespace }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/namespace/"
And I should see "{{ namespace_labels_item_key }}"
And I should see "{{ namespace_labels_item_value }}"
And I should see "{{ namespace_annotations_item_key }}"
And I should see "{{ namespace_annotations_item_value }}"
@api
Scenario: Update 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 }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/namespace/"
And I click "Edit"
And I fill in "{{ namespace_labels_item_key_field }}" with ""
And I fill in "{{ namespace_labels_item_value_field }}" with ""
And I fill in "{{ namespace_annotations_item_key_field }}" with ""
And I fill in "{{ namespace_annotations_item_value_field }}" with ""
And I press "Save"
@api
Scenario: Update the role
Given I am logged in as a user with the "Administrator" role
......
......@@ -237,3 +237,19 @@ wait:
500
wait_dropdown:
1000
namespace_labels_item_key:
label_key_@random
namespace_labels_item_key_field:
edit-labels-1-item-key
namespace_labels_item_value:
label_value_@random
namespace_labels_item_value_field:
edit-labels-1-item-value
namespace_annotations_item_key:
annotation_key_@random
namespace_annotations_item_key_field:
edit-annotations-1-item-key
namespace_annotations_item_value:
annotation_value_@random
namespace_annotations_item_value_field:
edit-annotations-1-item-value
......@@ -69,6 +69,7 @@ default:
warning_message: '.alert-warning'
inbound_rules: '.field--name-ip-permission'
outbound_rules: '.field--name-outbound-permission'
page_header: '.page-header'
selectors:
message_selector: '.alert'
error_message_selector: '.alert-error,.alert-danger,.messages--error'
......
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