github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/ui-v2/tests/acceptance/dc/intentions/create.feature (about) 1 @setupApplicationTest 2 Feature: dc / intentions / update: Intention Create 3 In order to define intentions 4 As a user 5 I want to visit the intention create page, fill in the form and hit the create button and see a success notification 6 Scenario: 7 Given 1 datacenter model with the value "datacenter" 8 When I visit the intention page for yaml 9 --- 10 dc: datacenter 11 --- 12 Then the url should be /datacenter/intentions/create 13 # Set source 14 And I click "[data-test-source-element] .ember-power-select-trigger" 15 And I type "web" into ".ember-power-select-search-input" 16 And I click ".ember-power-select-option:first-child" 17 Then I see the text "web" in "[data-test-source-element] .ember-power-select-selected-item" 18 # Set destination 19 And I click "[data-test-destination-element] .ember-power-select-trigger" 20 And I type "db" into ".ember-power-select-search-input" 21 And I click ".ember-power-select-option:first-child" 22 Then I see the text "db" in "[data-test-destination-element] .ember-power-select-selected-item" 23 # Specifically set deny 24 And I click "[value=deny]" 25 And I submit 26 Then a POST request is made to "/v1/connect/intentions?dc=datacenter" with the body from yaml 27 --- 28 SourceName: web 29 DestinationName: db 30 Action: deny 31 --- 32 Then the url should be /datacenter/intentions 33 And "[data-notification]" has the "notification-create" class 34 And "[data-notification]" has the "success" class