/features/sort_cars_list.feature

https://bitbucket.org/Doaa_karamallah/2d · Gherkin Specification · 42 lines · 31 code · 10 blank · 1 comment · 0 complexity · ebdbc33b1eefa3128b4f15fce041ab2b MD5 · raw file

  1. Feature: Display list of cars sorted by different criteria
  2. As a car buyer
  3. So that I can quickly browse cars based on my preferences
  4. I want to see purchasable sorted by price or year
  5. Background: cars have been added to database
  6. Given the following carmodels exist:
  7. | name |customer_id|
  8. | BMW |1|
  9. | DAEWOO |1|
  10. Given the following makes exist:
  11. |name |carmodel_id |customer_id|
  12. |Astra | 1 | 1|
  13. | corsa | 1 | 1 |
  14. |corolla | 2 | 1|
  15. | librite | 2 | 1|
  16. |nubira | 2 | 1|
  17. Given the following cars exist:
  18. | carmodel_id | make_id |color|prushdate | price |transmaision| nationality|ecapacity |speed |gass| info |customer_id |isused|
  19. | 1 | 1 | black | 19-Oct-2004|$123.40 | manual|german |2000|180|95|you will so mush if you dont get it :)|1|1|
  20. | 1 | 2 | black | 10-Dec-1994|$123.40 | automatic|german |2000|180|92|you will so mush if you dont get it :)|1|0|
  21. | 2 | 3 | black | 6-Oct-1984|$123.40 | manual|german |1800|200|90|you will so mush if you dont get it :)|1|1|
  22. | 2 | 5 | black | 26-Nov-1984|$123.40 | automatic|german |1600|180|90|you will so mush if you dont get it :)|1|0|
  23. # | 1 | 1 | black | 10-Dec-1994|$123.40 | automatic|german |1600|180|92|you will so mush if you dont get it :)|1|0|
  24. And I am on the cars page
  25. Scenario: sort cars by price
  26. Given I am on the cars page
  27. And I sort by price
  28. Then I should see " $123.40 " before " $123.40 "
  29. Scenario: sort cars by Prush date
  30. Given I am on the cars page
  31. And I sort by prushdate
  32. Then I should see "1984-10-6" before "1984-11-26"