1 package org.paneris.jammyjoes.functional; 2 3 import net.sourceforge.jwebunit.WebTestCase; 4 5 public class TestCaseFunctionalMemory extends WebTestCase { 6 7 public TestCaseFunctionalMemory(String name) { 8 super(name); 9 } 10 11 public void setUp() { 12 getTestContext().setBaseUrl("http://localhost/toys"); 13 } 14 15 public void testType2SearchPathInfo() throws Exception { 16 beginAt("/_/0"); 17 assertTextPresent("Pink Gingham Baby Shoe"); 18 beginAt("/_/25"); 19 assertTextPresent("Pink Gingham Baby Shoe"); 20 } 21 22 public void testAgeSearch() throws Exception { 23 beginAt("/"); 24 setFormElement("field_age", "7 year olds"); 25 submit(); 26 assertTextPresent("Baby Stella - Doll Carrier"); 27 } 28 29 public void testPriceSearch() throws Exception { 30 beginAt("/_/_/_/50_9999"); 31 assertTextPresent("Enchanted Palace"); 32 } 33 34 public void testPriceSearchPathInfo() throws Exception { 35 beginAt("/"); 36 setFormElement("field_price", "50_9999"); 37 submit(); 38 assertTextPresent("Enchanted Palace"); 39 } 40 41 public void testSingleItemRelatedLinks() throws Exception { 42 beginAt("/2233"); 43 assertTextPresent("Accessories For Kitchen"); 44 assertTextPresent("Similar items now in stock"); 45 assertTextPresent("A 36 piece dolls house accessory set"); 46 } 47 48 // 49 // public void testDiscontinuedSingleItem() throws Exception { 50 // beginAt("/1025"); 51 // assertTextPresent("Sorry, we no longer stock this item"); 52 // } 53 // 54 // public void testDiscontinued() throws Exception { 55 // beginAt("/_/_/_/_/Zipperella Mouse"); 56 // assertTextPresent("no products"); 57 // } 58 // 59 // public void testTroidSearch() throws Exception { 60 // beginAt("/2233"); 61 // assertTextPresent("Accessories For Kitchen"); 62 // assertTextPresent("1 matches"); 63 // } 64 // 65 // public void testNameSearch() throws Exception { 66 // beginAt("/Accessories For Kitchen"); 67 // assertTextPresent("Accessories For Kitchen"); 68 // assertTextPresent("1 matches"); 69 // } 70 // 71 // public void testOutOfStockSearch() throws Exception { 72 // beginAt("/_/_/_/_/_/_/oos"); 73 // assertTextPresent("Crystal Growing Kit"); 74 // } 75 // 76 // public void testDescriptionSearch() throws Exception { 77 // beginAt("/"); 78 // setFormElement("field_description", "Wooden Noah's Ark"); 79 // submit(); 80 // assertTextPresent("Wooden Noah's Ark"); 81 // } 82 // 83 // public void testDescriptionSearchPathInfo() throws Exception { 84 // beginAt("/_/_/_/_/Bathroom Furniture"); 85 // assertTextPresent("Bathroom Furniture"); 86 // } 87 // 88 // public void testTypeSearch() throws Exception { 89 // beginAt("/"); 90 // setFormElement("field_type", "44"); 91 // submit(); 92 // assertTextPresent("Brio Fuel Wagon"); 93 // } 94 // 95 // public void testTypeSearchPathInfo() throws Exception { 96 // beginAt("/_/44"); 97 // assertTextPresent("Brio Fuel Wagon"); 98 // } 99 // 100 // public void testTypeSearchPathInfoByName() throws Exception { 101 // beginAt("/_/BRIO Train"); 102 // assertTextPresent("Brio Fuel Wagon"); 103 // } 104 // 105 // public void testSupplierSearchPathInfo() throws Exception { 106 // beginAt("/_/_/_/_/_/_/_/_/_/BRIO"); 107 // assertTextPresent("Activity Bus"); 108 // } 109 // 110 // public void testManufacturerSearchPathInfo() throws Exception { 111 // beginAt("/_/_/_/_/_/_/_/_/BRIO"); 112 // assertTextPresent("Brio Fuel Wagon"); 113 // } 114 115 }