Feature: Advanced Search

  Scenario: User goes to advanced search page
    Given I go to the root page
     When I click "Advanced Search"
     Then I should see the advanced search form
      But I should not see the simple search form

  Scenario: User submits empty advanced search form
    Given I'm on the advanced search page
     When I click "Find it"
     Then I should see the advanced search form

  Scenario: User submits filled in advanced search form
    Given I'm on the advanced search page
     When I search for "water" in the "Title" field
     Then I should see the result page
      And I should see "Refine Advanced Search"
    
  Scenario: Paging on show document keeps advanced result set
    Given I'm on the advanced search page
     When I search for "water" in the "Everything" field
      And I click on the first document
     Then I should see the document titled "Photocatalysis of Naphthenic Acids in Water"
      # TODO: remove previous line and enable the following lines when issue with no next/prev for show document has been solved
      #And I go to the next document
     #Then I should see the document titled "Environmental Risk Imposed by Diverted Flood Waters on Water and Soils in Emergency Retention Basins"


Feature: Advanced Search

  Scenario: This feature is disabled
      Given I go to the root page

  # Scenario: User goes to advanced search page
  #   Given I go to the root page
  #    When I click "Advanced Search"
  #    Then I should see the advanced search form
  #     But I should not see the simple search form

  # Scenario: User submits empty advanced search form
  #   Given I'm on the advanced search page
  #    When I click "Find it"
  #    Then I should see the advanced search form

  # Scenario: User submits filled in advanced search form
  #   Given I'm on the advanced search page
  #    When I search for "water" in the "Title" field
  #    Then I should see the result page
  #     And I should see "Refine Advanced Search"
    
  # Scenario: Paging on show document keeps advanced result set
  #   Given I'm on the advanced search page
  #    When I search for "water" in the "Everything" field
  #     And I click on the first document
  #    Then I should see the document titled "Photocatalysis of Naphthenic Acids in Water"
  #     # TODO: remove previous line and enable the following lines when issue with no next/prev for show document has been solved
  #     #And I go to the next document
  #    #Then I should see the document titled "Environmental Risk Imposed by Diverted Flood Waters on Water and Soils in Emergency Retention Basins"


Disable advanced search cucumber features
Disable advanced search cucumber features
