Tyler Wendlandt b8347ae8c6
ui: Add ServerExternalAddresses to peer token create form (#15555)
* ui: Add ServerExternalAddresses field to token generation

* Add test for ServerExternalAddresses on peer token create

* Add changelog entry

* Update translations

* Format hbs files

* Update translations
2022-11-30 11:42:36 -07:00

47 lines
1.4 KiB
Gherkin

@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
ServerExternalAddresses: []
---
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
ServerExternalAddresses: "1.1.1.1:123,1.2.3.4:3202"
---
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
ServerExternalAddresses: ["1.1.1.1:123","1.2.3.4:3202"]
---
Then I see the text "another-encoded-token" in ".consul-peer-form-generate code"