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 RestaurantButtonTest()
 {
     Robot.SetDelayBetweenActions(500);
     Robot.ClickButton(ACCESSIBLE.RestaurantSideFormButton.ToString());
     Robot.AssertButtonEnable(ACCESSIBLE.RestaurantSideFormButton.ToString(), false);
     Robot.CloseWindow(FORM.RestaurantSideForm.ToString());
     Robot.AssertButtonEnable(ACCESSIBLE.RestaurantSideFormButton.ToString(), true);
 }