consul/ui/packages/consul-ui/tests/acceptance/dc/peers/create.feature

44 lines
1.2 KiB
Gherkin
Raw Normal View History

@setupApplicationTest
Feature: dc / peers / create: Peer Create Token
Scenario:
Given 1 datacenter model with the value "dc-1"
And the url "/v1/peering/token" responds with from yaml
---
body:
PeeringToken: an-encoded-token
---
When I visit the peers page for yaml
---
dc: dc-1
---
Then the url should be /dc-1/peers
And I click create
Then I fill in with yaml
---
Name: new-peer
---
When I click ".peer-create-modal .modal-dialog-footer button"
Then a POST request was made to "/v1/peering/token" from yaml
---
body:
PeerName: new-peer
---
Then I see the text "an-encoded-token" in ".consul-peer-form-generate code"
When I click ".consul-peer-form-generate button[type=reset]"
And the url "/v1/peering/token" responds with from yaml
---
body:
PeeringToken: another-encoded-token
---
Then I fill in with yaml
---
Name: another-new-peer
---
When I click ".peer-create-modal .modal-dialog-footer button"
Then a POST request was made to "/v1/peering/token" from yaml
---
body:
PeerName: another-new-peer
---
Then I see the text "another-encoded-token" in ".consul-peer-form-generate code"