Loading modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-25-OperateClusterRoleBindigs.feature +66 −17 Original line number Diff line number Diff line @minimal @ci_job Feature: Create and delete cluster role binding for K8s as "Authenticated User" Feature: Create, read, update and delete cluster role binding for K8s as "Authenticated User" @api @javascript Scenario: Create a cluster role binding Loading @@ -24,9 +24,57 @@ Feature: Create and delete cluster role binding for K8s as "Authenticated User" And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see "has been created" And I should see the success message "has been created" And I should see neither error nor warning messages And I should see "{{ cluster_role_binding_name }}" @api @javascript Scenario: Read a cluster role binding Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I click "Refresh" And I should see the link "{{ cluster_role_binding_name }}" And I wait {{ wait }} milliseconds And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I should see "{{ cluster_role_binding_name }}" And I should see "{{ role_binding_sub_user }}" And I should see neither error nor warning messages @api @javascript Scenario: Update cluster role binding Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I click "Refresh" And I should see the link "{{ cluster_role_binding_name }}" And I wait {{ wait }} milliseconds And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I click "Edit" And I fill in "Detail" with: """ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ cluster_role_binding_name }} subjects: - kind: {{ role_binding_sub_kind }} name: {{ role_binding_sub_user_edit }} apiGroup: {{ role_binding_api }} roleRef: kind: {{ cluster_role_binding_role_kind }} name: {{ cluster_role_name }} apiGroup: {{ role_binding_api }} """ And I press "Save" And I wait for AJAX to finish And the url should match "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see the success message "has been updated" And I should see neither error nor warning messages And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I should see "{{ role_binding_sub_user_edit }}" @api @javascript Scenario: Delete a cluster role binding Given I am logged in as user "{{ user_name }}" Loading @@ -40,6 +88,7 @@ Feature: Create and delete cluster role binding for K8s as "Authenticated User" And the url should match "/delete" And I press "Delete" And I should be on "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see "has been deleted" 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 "{{ cluster_role_binding_name }}" Loading
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-25-OperateClusterRoleBindigs.feature +66 −17 Original line number Diff line number Diff line @minimal @ci_job Feature: Create and delete cluster role binding for K8s as "Authenticated User" Feature: Create, read, update and delete cluster role binding for K8s as "Authenticated User" @api @javascript Scenario: Create a cluster role binding Loading @@ -24,9 +24,57 @@ Feature: Create and delete cluster role binding for K8s as "Authenticated User" And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see "has been created" And I should see the success message "has been created" And I should see neither error nor warning messages And I should see "{{ cluster_role_binding_name }}" @api @javascript Scenario: Read a cluster role binding Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I click "Refresh" And I should see the link "{{ cluster_role_binding_name }}" And I wait {{ wait }} milliseconds And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I should see "{{ cluster_role_binding_name }}" And I should see "{{ role_binding_sub_user }}" And I should see neither error nor warning messages @api @javascript Scenario: Update cluster role binding Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I click "Refresh" And I should see the link "{{ cluster_role_binding_name }}" And I wait {{ wait }} milliseconds And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I click "Edit" And I fill in "Detail" with: """ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ cluster_role_binding_name }} subjects: - kind: {{ role_binding_sub_kind }} name: {{ role_binding_sub_user_edit }} apiGroup: {{ role_binding_api }} roleRef: kind: {{ cluster_role_binding_role_kind }} name: {{ cluster_role_name }} apiGroup: {{ role_binding_api }} """ And I press "Save" And I wait for AJAX to finish And the url should match "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see the success message "has been updated" And I should see neither error nor warning messages And I click "{{ cluster_role_binding_name }}" And the url should match "/cluster_role_binding/" And I should see "{{ role_binding_sub_user_edit }}" @api @javascript Scenario: Delete a cluster role binding Given I am logged in as user "{{ user_name }}" Loading @@ -40,6 +88,7 @@ Feature: Create and delete cluster role binding for K8s as "Authenticated User" And the url should match "/delete" And I press "Delete" And I should be on "/clouds/k8s/{{ cloud_context }}/cluster_role_binding" And I should see "has been deleted" 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 "{{ cluster_role_binding_name }}"