Contents

manage doubles via ui

@ui

In order to use double data in development As a developer I want to have a manual interface for managing doubles

Scenario: view existing doubles

  • Given the following doubles exist:
    fullpathpathpatterndescriptioncontentverbdelay
    /url1/aaatwittertest contentGET0
    /url2/bbbgeo locationmore contentPOST1
    /u/b?c=1wikipediaarticlePUT2
    ^/api/foo\?nocache=123$patternpattern contentGET0
  • When I visit "doubles" page
  • Then I should see existing doubles:
    fullpathpathpatterndescriptionverbdelay
    /url1/aaatwitterGET0
    /url2/bbbgeo locationPOST1
    /u/b?c=1wikipediaPUT2
    ^/api/foo\?nocache=123$patternGET0

Scenario: add new double

  • Given I am on "doubles" page
  • When I choose to create a double
  • And I enter double details:
    fullpathpathpatterndescriptioncontentverbstatusdelay
    /url2/bb?a=b5google apitest contentPOST2001
  • And I save it
  • Then I should see "Double created"
  • And I should see existing doubles:
    fullpathdescriptionverbstatusdelay
    /url2/bb?a=b5google apiPOST2001

Scenario: add a new double with a path pattern

  • Given I am on "doubles" page
  • When I choose to create a double
  • And I enter double details:
    fullpathpathpatterndescriptioncontentverbstatusdelay
    ^\/api\/.*$pattern apitest content 1GET2000
  • And I save it
  • Then I should see "Double created"
  • And I should see existing doubles:
    pathpatterndescriptionverbstatusdelay
    ^\/api\/.*$pattern apiGET2001

Scenario: choose active double

@javascript

  • Given there are two doubles for the same fullpath
  • When I visit "doubles" page
  • And I make first double active
  • Then first double should be served
  • When I make second double active
  • Then second double should be served

Scenario: edit double

  • Given the following doubles exist:
    fullpathdescriptioncontentverbstatusdelay
    /url1/aaatwittertest contentPOST4040
  • And I visit "doubles" page
  • And I choose to edit double
  • When I change "double" "description" to "google"
  • And I save it
  • Then I should see existing doubles:
    fullpathdescriptionverbstatusdelay
    /url1/aaagooglePOST4040

Scenario: delete double

@javascript

  • Given the following doubles exist:
    fullpathdescriptioncontentdelay
    /url1/aaatwittertest content0
    /url/cc/bbgoogleother content1
  • And I visit "doubles" page
  • And I choose to delete double with fullpath "/url1/aaa"
  • Then I should be asked to confirm delete
  • And I should see "Double deleted"
  • And I should not see "/url1/aaa"
  • And I should see "/url/cc/bb"

Source: features/web_ui/doubles.feature at commit 63ec7a17, Rest Assured (Apache-2.0 license).