Logo: Relish

  1. Sign in

Project: My-project2

Search form submission

In order to submit a search form
As a user
I need to submit my desired location and origin into the forms field

Scenarios
  • @homepage
Submit a search form from homepage
Given
I am on "/"
And
print current URL
Then
I fill in "depart-date-webform-client-form-126151126151-4" with "30/11/2015"
Then
I fill in "return-date-webform-client-form-126151126151-4" with "05/12/2015"
Then
I fill in "flights-dest-str-string-startCity" with "SYD"
And
I select "SYD" from autocomplete box
Then
I fill in "flights-dest-str-string-endCity" with "London"
And
I select "LCY" from autocomplete box
Then
I fill in "flights-dest-str-string-startCity" with "SYD"
And
I select "SYD" from autocomplete box
Then
I fill in "flights-dest-str-string-endCity" with "London"
And
I select "LCY" from autocomplete box
And
I click element with css ".fc-search-form-flights input.form-submit"
Then
the url should match "/tundra/ibe/flights/book"
  • @flights
Submit a search form from flights search page
Given
I am on "location"
And
print current URL
Then
I fill in "flights-dest-str-string-startCity" with "start city"
And
I select "start city flight code" from autocomplete box
Then
I fill in "flights-dest-str-string-endCity" with "end city"
And
I select "end city flight code" from autocomplete box
Then
I fill in "flights-dest-str-string-startCity" with "start city"
And
I select "start city flight code" from autocomplete box
Then
I fill in "flights-dest-str-string-endCity" with "end city"
And
I select "end city flight code" from autocomplete box
Then
I fill in "depart-date-webform-client-form-126151126151-4" with "30/11/2015"
Then
I fill in "return-date-webform-client-form-126151126151-4" with "05/12/2015"
Then
I click element with css ".fc-form input.form-submit"
Then
the url should match "/tundra/ibe/flights/book"
Examples:
location start city start city flight code end city end city flight code
/flights Sydney SYD London LON
/flights/domestic Brisbane BNE Perth PER
flights/international-flights/ Melbourne MEL Stockholm STO
  • @holidays
Submit a search form from holidays search page
Given
I am on "location"
And
print current URL
And
I select "start city" from "edit-submitted-fdeparture"
Then
I fill in "ajax-dest-str-string-destination_in" with "end city"
And
I select "London, United Kingdom" from autocomplete box
Then
I fill in "ajax-dest-str-string-destination_in" with "end city"
And
I select "London, United Kingdom" from autocomplete box
And
I select "price" from "edit-submitted-fprice"
Then
I click element with css ".webform-fcl-forms-holiday-search input.form-submit"
Then
the url should match "/holidays/search"
Examples:
location start city end city price
/holidays Brisbane London $1001 to $3000
/holidays/australian-holidays Sydney Brisbane $0 to $500
/holidays/international-holidays Melbourne London $1001 to $3000
  • @hotels
Submit a search form from Australian hotels search page
Given
I am on "/accommodation/australian-hotels"
And
print current URL
Then
I fill in "ajax-dest-str-string-RegionId" with "Sydney CBD"
And
I select "Sydney CBD" from autocomplete box
Then
I fill in "ajax-dest-str-string-RegionId" with "Sydney CBD"
And
I select "Sydney CBD" from autocomplete box
Then
I fill in "depart-date-webform-client-form-124221124221-5" with "30/11/2015"
Then
I fill in "return-date-webform-client-form-124221124221-5" with "05/12/2015"
And
I select "1 Adult" from "edit-submitted-third-adults"
And
I select "0 children" from "edit-submitted-third-under-18-years"
Then
I click element with css ".webform-client-form-accommodation-domestic input.form-submit"
Then
I wait for a period of time
Then
the url should match "/hotels/australia/nsw/sydney/sydney-central/sydney-cbd"
  • @rail
Submit a search form from holidays search page
Given
I am on "location"
And
print current URL
And
I select "destination" from "edit-submitted-destination"
And
I select "price" from "edit-submitted-price"
And
I select "duration" from "edit-submitted-fduration"
Then
I click element with css ".fc-search-form-rail input.form-submit"
Then
the url should match "/rail/search"
Examples:
location destination price duration
/rail Australia $1001 to $1500 4-7 days
/rail/australia Australia $1501 to $2000 8-10 days
/rail/international Asia $2001 to $2500 11-14 days
  • @tours
Submit a search form from tours search page
Given
I am on "/tours"
And
print current URL
Then
I fill in "ajax-dest-str-string-destination_in" with "London"
Then
I select "London" from autocomplete box
Then
I fill in "ajax-dest-str-string-destination_in" with "London"
Then
I select "London" from autocomplete box
And
I select "$1001 to $1500" from "edit-submitted-half-2-price"
And
I select "4 to 7 days" from "edit-submitted-duration"
And
I select "Trafalgar" from "edit-submitted-half-2-fsupplier"
Then
I click element with css ".webform-fcl-forms-tours-search input.form-submit"
Then
the url should match "/tours/search"
  • @tours
Submit a search form from american tours search page
Given
I am on "location"
And
print current URL
And
I select "price" from "edit-submitted-half-2-price"
And
I select "duration" from "edit-submitted-duration"
And
I select "company" from "edit-submitted-half-2-fsupplier"
Then
I click element with css ".webform-fcl-forms-tours-search input.form-submit"
Then
the url should match "/tours/search"
Examples:
location price duration company
/tours/americas $1001 to $1500 4 to 7 days Contiki
/tours/australia $1001 to $1500 4 to 7 days Contiki
/tours/europe $1001 to $1500 4 to 7 days Contiki
/tours/bali $501 to $1000 8 to 14 days G Adventures
/tours/phuket $501 to $1000 4 to 7 days G Adventures
/tours/vietnam $1001 to $1500 8 to 14 days Contiki
/tours/fiji $1001 to $1500 4 to 7 days Contiki
/tours/bangkok $1001 to $1500 8 to 14 days G Adventure
  • @cruise
Submit a search form from cruise search page
Given
I am on "location"
And
print current URL
And
I select "destination" from "edit-submitted-destination"
And
I select "departure date" from "fdeparting"
And
I select "flexibility" from "edit-submitted-third-3-flexible-dates"
And
I select "duration" from "edit-submitted-third-3-duration"
And
I select "cruise line" from "edit-submitted-half-shipline-shipline"
And
I select "cruise ship" from "edit-submitted-half-cruise-ships-cruiseships"
Then
I click element with css ".webform-fcl-forms-cruise-search input.form-submit"
Then
the url should match "/cruises/search"
Examples:
location destination departure date flexibility duration cruise line cruise ship
/cruises Australia Feb 2015 Flexible All durations All Cruise Lines All Cruise Ships
/cruises/specials Alaska Feb 2015 Flexible All durations All Cruise Lines All Cruise Ships
  • @validation
Validate text when not entering text into search fields on the homepage
Given
I am on "location"
And
I click on the webform element with xpath "//*[@value='Find deals »']"
Then
I should see "THIS FIELD IS REQUIRED." in the "start city" element
Then
I should see "THIS FIELD IS REQUIRED." in the "end city" element
Then
I should see "THIS FIELD IS REQUIRED." in the "start date" element
Then
I should see "THIS FIELD IS REQUIRED." in the "end date" element
Examples:
location start city end city start date end date
/ #startCity-string-error #endCity-string-error #startDate-error #endDate-error
/flights #startCity-string-error #endCity-string-error #startDate-error #endDate-error
/flights/domestic #startCity-string-error #endCity-string-error #startDate-error #endDate-error
/flights/international-flights #startCity-string-error #endCity-string-error #startDate-error #endDate-error
  • @validation
Check that after selecting a date in the departing date that the same date is automatically filled in for return date
Given
I am on "/flights"
And
I click element with css "#depart-date-webform-client-form-126151126151-4"
Then
I click element with css ".ui-state-highlight"
Then
I check that the value of "#depart-date-webform-client-form-126151126151-4" element matches that of "#return-date-webform-client-form-126151126151-4" element
Given
I am on "/flights/international-flights"
And
I follow "under 15 years old travelling alone »"
Then
I should be on "/flights/unaccompanied-minors"
And
I should see "Unaccompanied Minors" in the "h1" element
Given
I am on "/flights/domestic"
And
I follow "under 15 years old travelling alone »"
Then
I should be on "/flights/unaccompanied-minors"
And
I should see "Unaccompanied Minors" in the "h1" element
  • @validation
  • @test
Validate text when not selecting an option from autocomplete box
Given
I am on "/"
Then
I fill in "flights-dest-str-string-startCity" with "Syndey"
Then
I fill in "flights-dest-str-string-endCity" with "London"
And
I click on the webform element with xpath "//*[@value='Find deals »']"
Then
I should see text matching "Please pick an option from provided list"
Then
I should see "Please pick an option from provided list" in the "#endCity-string-error" element
  • @validation
  • @test
Submit a search form from Australian hotels search page
Given
I am on "/accommodation/"
And
I click on the webform element with xpath "//*[@value='Search Hotels »']"
Then
I should see "PLEASE SELECT A DESTINATION" in the "#submitted-City-RegionId-string-error" element
Then
I should see "THIS FIELD IS REQUIRED." in the "#submitted-Date-error" element
Then
I should see "THIS FIELD IS REQUIRED." in the "#submitted-Date2-error" element
  • @careers
Submit a search form from careers page
Given
I am on "/careers"
Then
I fill in "edit-submitted-description" with "Sales"
And
I select "Sales/Travel Consultants" from "edit-submitted-sector-name"
And
I select "Queensland" from "edit-submitted-location-state"
Then
I click element with css ".fc-form input.form-submit"
Then
I should see text matching "Travel Jobs at Flight Centre"
  • @careers
Submit a search form from careers page
Given
I am on "/careers/why-work-for-flight-centre"
Then
I fill in "edit-submitted-description" with "Sales"
And
I select "Sales/Travel Consultants" from "edit-submitted-sector-name"
And
I select "Queensland" from "edit-submitted-location-state"
Then
I click element with css ".fc-form input.form-submit"
And
I should see text matching "Travel Jobs at Flight Centre"
  • @insurance
Submit a search form from travel insurance page
Given
I am on "/travel-extras/insurance"
Then
I select "Worldwide (inc. Americas and Africa)" from "area-181296"
And
I select "Japan" from "country-181296"
Then
I fill in "depart-date-webform-client-form-181296181296-4" with "20/12/2015"
And
I fill in "return-date-webform-client-form-181296181296-4" with "31/12/2015"
And
I fill in "edit-age1" with "25"
And
I click on the webform element with xpath "//*[@value='Get a Quote »']"
Then
I wait for a period of time
Then
the url should match "/flight-centre/ChoosePlan.aspx"
Then
I should see text matching "Please select a plan and excess level"
  • @stores
Submit a search form from stores page
Given
I am on "/stores"
Then
I fill in "fcl-stores-google-places-box" with "Queen Street, Brisbane QLD, Australia"
And
I click element with css "#fcl-stores-google-places-submit"
Then
I should see text matching "Flight Centre Cba Flagship Brisbane"
Then
I follow "Flight Centre Cba Flagship Brisbane"
Then
the url should match "/stores/brisbane/fc-cba-flagship-brisbane"
And
I should see "Flight Centre Cba Flagship Brisbane : Your local Flight Centre Store" in the "h1" element
And
I should see an "#fcl-stores-locator-map" element

Last published over 4 years ago by BradForrest.