private void RunScriptTestAddCategory()
 {
     Robot.ClickButton("Start the Restaurant Program (Backend)");
     Robot.SetForm("POS-Restaurant Side");
     Robot.ClickTabControl("Category Manager");
     Robot.ClickButton("addCategory");
     Robot.SetEdit("categoryNameBox", "sushi");
     Robot.ClickButton("categorySave");
     Robot.ClickButton("addCategory");
     Robot.SetEdit("categoryNameBox", "test");
     Robot.ClickButton("categorySave");
     Robot.ClickTabControl("Meal Manager");
     Robot.ClickButton("addMeal");
     Robot.SetEdit("mealNameBox", "smallsushi");
     Robot.SetEdit("mealDescriptionBox", "Delicious smallsushi!");
     Robot.SetEdit("mealPriceBox", "29");
     Robot.SetComboBox("mealCategoryBox", "sushi");
     Robot.ClickButton("Browse");
     Robot.SelectFileByOpenFileDialog("開啟", new string[] { "1.jpg" });
     Robot.ClickButton("mealSave");
     Robot.ClickTabControl("Category Manager");
     Robot.ClickListViewByValue("categoryListBox", "sushi");
     Robot.ClickListViewByValue("categoryListBox", "test");
     Robot.ClickButton("deleteCategory");
     Robot.CloseWindow("POS-Restaurant Side");
     Robot.SetForm("StartUp");
     Robot.ClickButton("Start the Cutomer Program (Frontend)");
     Robot.SetForm("POS-Customer Side");
     Robot.ClickTabControl("sushi");
     Robot.ClickButton("smallsushi\n29元");
     Robot.ClickButton("orderMeal");
 }
Exemplo n.º 2
0
 public void AddCateGoryTest()
 {
     Robot.ClickTabControl(CATEGORY_MANAMER);
     Robot.ClickButton(CATEGORY.AddNewCategoryButton.ToString());
     Robot.SetEdit(CATEGORY.CategoryNameTextBox.ToString(), "NewCat");
     Robot.ClickButton(CATEGORY.TriggerCategoryButton.ToString());
     Robot.AssertListViewItemByIndex(CATEGORY.CategoryListBox.ToString(), 4, "NewCat");
 }
Exemplo n.º 3
0
 public void EditCateGoryTest()
 {
     Robot.ClickTabControl(CATEGORY_MANAMER);
     Robot.ClickListViewItemByIndex(CATEGORY.CategoryListBox.ToString(), 0);
     Robot.AssertEdit(CATEGORY.CategoryNameTextBox.ToString(), "Hambugers");
     Robot.SetEdit(CATEGORY.CategoryNameTextBox.ToString(), "ModifyCat");
     Robot.ClickButton(CATEGORY.TriggerCategoryButton.ToString());
     Robot.AssertListViewItemByIndex(CATEGORY.CategoryListBox.ToString(), 0, "ModifyCat");
 }
Exemplo n.º 4
0
 public void AddMealTest()
 {
     Robot.ClickTabControl(MEAL_MANAMER);
     Robot.ClickButton(MEAL.AddNewMealButton.ToString());
     Robot.SetEdit(MEAL.MealNameTextBox.ToString(), "NewMeal");
     Robot.SetEdit(MEAL.MealPriceTextBox.ToString(), "999");
     Robot.SetComboBox(MEAL.MealCategoryComboBox.ToString(), "Beverage");
     Robot.ClickButton(MEAL.BrowseButton.ToString());
     Robot.SendKeyEnterToOpenFileDialog();
     Robot.ClickButton(MEAL.TriggerMealButton.ToString());
     Robot.AssertListViewItemByIndex(MEAL.MealListBox.ToString(), 29, "NewMeal");
 }
Exemplo n.º 5
0
 public void TestCategory()
 {
     string[] openFileString = { "Resources", "dessert", "Apple-Pie_thumb5.png" };
     Robot.SetForm("StartUp");
     Robot.ClickButton("restaurant");
     Robot.SetForm("PosRestaurantSideForm");
     Robot.ClickTabControl("Category Manager");
     Robot.ClickButton("addCategoryButton");
     Robot.AssertButtonEnable("saveCategoryButton", false);
     Robot.SetEdit("categoryNameTextBox", "玩具\n");
     Robot.AssertButtonEnable("saveCategoryButton", true);
     Robot.ClickButton("saveCategoryButton");
 }
Exemplo n.º 6
0
 public void TestSaveMeal()
 {
     string[] openFileString = { "Resources", "dessert", "Apple-Pie_thumb5.png" };
     Robot.SetForm("StartUp");
     Robot.ClickButton("restaurant");
     Robot.SetForm("PosRestaurantSideForm");
     Robot.ClickListViewByValue("mealListBox", "安格斯黑牛堡");
     Robot.SetEdit("mealNameTextBox", "");
     Robot.AssertButtonEnable("saveMealButton", false);
     Robot.SetEdit("mealNameTextBox", "安格斯黑牛鮑\n");
     Robot.AssertButtonEnable("saveMealButton", true);
     Robot.ClickButton("mealImageBrowseButton");
     Robot.SelectFileByOpenFileDialog("開啟", openFileString);
     Robot.ClickButton("saveMealButton");
 }
Exemplo n.º 7
0
 public void TestMeal()
 {
     string[] openFileString = { "Resources", "dessert", "Apple-Pie_thumb5.png" };
     Robot.SetForm("StartUp");
     Robot.ClickButton("restaurant");
     Robot.SetForm("PosRestaurantSideForm");
     Robot.ClickButton("addMealButton");
     Robot.SetEdit("mealNameTextBox", "蛋餅\n");
     Robot.SetEdit("mealPriceTextBox", "20\n");
     Robot.SetComboBox("mealCategoryComboBox", "甜點");
     Robot.SetEdit("mealDescriptionTextBox", "好吃的蛋餅\n");
     Robot.ClickButton("mealImageBrowseButton");
     Robot.SelectFileByOpenFileDialog("開啟", openFileString);
     Robot.AssertButtonEnable("saveMealButton", true);
     Robot.ClickButton("saveMealButton");
     Robot.ClickListViewByValue("mealListBox", "蛋餅");
     Robot.ClickButton("deleteMealButton");
 }
 private void RunScriptTestModifiedMeal()
 {
     Robot.ClickButton("Start the Cutomer Program (Frontend)");
     Robot.ClickButton("Start the Restaurant Program (Backend)");
     Robot.SetForm("POS-Customer Side");
     Robot.ClickButton("大麥克\n69元");
     Robot.ClickButton("orderMeal");
     Robot.SetForm("POS-Restaurant Side");
     Robot.ClickTabControl("Meal Manager");
     Robot.ClickListViewByValue("mealListBox", "大麥克");
     Robot.SetEdit("mealNameBox", "Bigmac");
     Robot.SetEdit("mealDescriptionBox", "Delicious bigmac!");
     Robot.SetEdit("mealPriceBox", "99");
     Robot.SetComboBox("mealCategoryBox", "點心");
     Robot.ClickButton("Browse");
     Robot.SelectFileByOpenFileDialog("開啟", new string[] { "temp.jpg" });
     Robot.ClickButton("mealSave");
     Robot.SetForm("POS-Customer Side");
 }