Logo: Relish

  1. Sign in

Project: Rest-assured

manage redirects via ui

  • @ui

In order to set up 'pass through' for requests that don't match any double
As a developer
I want to have a ui to set up redirects

Scenarios
view existing redirects
Given
the following redirects exist:
pattern to
/url1/.* http://google.com/api
/url2/bbb http://twitter.com/api
When
I visit "redirects" page
Then
I should see that I am on "redirects" page
And
I should see existing redirects:
pattern to
/url1/.* http://google.com/api
/url2/bbb http://twitter.com/api
add new redirect
Given
I visit "redirects" page
When
I choose to create a redirect
And
I enter redirect details:
pattern to
/url1/.* http://google.com/api
And
I save it
Then
I should see "Redirect created"
And
I should see existing redirects:
pattern to
/url1/.* http://google.com/api
edit redirect
Given
the following redirects exist:
pattern to
/url1/.* http://google.com/api
And
I visit "redirects" page
And
I choose to edit redirect
When
I change "redirect" "pattern" to "/some/remote.*"
And
I save it
Then
I should see that I am on "redirects" page
And
I should see existing redirects:
pattern to
/some/remote.* http://google.com/api
  • @javascript
reorder redirects
Given
the following redirects exist:
pattern to
/api/.* http://google.com/api
/api/bbb http://twitter.com/api
And
I am on "redirects" page
When
I reorder second redirect to be the first one
Then
"/api/bbb/ccc" should be redirected to "http://twitter.com/api/ccc"
When
I reorder second redirect to be the first one
Then
"/api/bbb/ccc" should be redirected to "http://google.com/api"
  • @javascript
delete redirect
Given
the following redirects exist:
pattern to
/url1/.* http://google.com/api
/url2/bbb http://twitter.com/api
And
I visit "redirects" page
And
I choose to delete redirect with pattern "/url1/.*"
Then
I should be asked to confirm delete
And
I should see "Redirect deleted"
And
I should not see "/url1/.*"
And
I should see "/url2/bbb"

Last published almost 7 years ago by artemave.