Commit 0bffa242 authored by shota niioka's avatar shota niioka Committed by Yas Naoi
Browse files

Issue #3281266 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s Services (Read)

parent 17d6d297
Loading
Loading
Loading
Loading
+30 −17
Original line number Diff line number Diff line
@minimal @ci_job
Feature: Create and delete a service for K8s as "Authenticated User"
Feature: Create, read, update and delete a Service for K8s as "Authenticated User"

  @api @javascript
  Scenario: Create a service
  Scenario: Create a Service
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/k8s/{{ cloud_context }}/service/add"
    And I should see the heading "Add Service"
@@ -28,6 +28,19 @@ Feature: Create and delete a service for K8s as "Authenticated User"
    And I should see neither error nor warning messages
    And I should see "{{ service_name }}" in the "{{ namespace }}" row

  @api @javascript
  Scenario: Read the service
    Given I am logged in as user "{{ user_name }}"
    When I visit "/clouds/k8s/{{ cloud_context }}/service"
    And I click "Refresh"
    And I should see the link "{{ service_name }}"
    And I wait {{ wait }} milliseconds
    And I click "{{ service_name }}"
    Then the url should match "clouds/k8s/{{ cloud_context }}/service/"
    And I should see "{{ service_name }}"
    And I should see "{{ namespace }}"
    And I should see neither error nor warning messages

  @api @javascript
  Scenario: Delete the service
    Given I am logged in as user "{{ user_name }}"
@@ -36,11 +49,11 @@ Feature: Create and delete a service for K8s as "Authenticated User"
    And I should see the link "{{ service_name }}"
    And I wait {{ wait }} milliseconds
    And I click "{{ service_name }}"
    And the url should match "/service/"
    Then the url should match "clouds/k8s/{{ cloud_context }}/service/"
    And I click "Delete"
    And the url should match "/delete"
    And I press "Delete"
    And I should be on "/clouds/k8s/{{ cloud_context }}/service"
    Then I should be on "/clouds/k8s/{{ cloud_context }}/service"
    And I should see the success message "has been deleted"
    And I should see neither error nor warning messages
    And I click "Refresh"