public void StartUpFormTest() { Robot.AssertButtonEnable(ACCESSIBLE.CustomerSideFormButton.ToString(), true); Robot.AssertButtonEnable(ACCESSIBLE.RestaurantSideFormButton.ToString(), true); Robot.ClickButton(ACCESSIBLE.ExitButton.ToString()); Robot.AssertWindowExist(ACCESSIBLE.StartUpForm.ToString(), false); }
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); }
public void TestAddButton() { Robot.SetForm("StartUp"); Robot.ClickButton("client"); Robot.SetForm("POS-Customer Side"); Robot.AssertButtonEnable("addMeal", false); Robot.ClickButton("orderButton1"); Robot.AssertButtonEnable("addMeal", true); }
public void TestPreviousPageButton() { Robot.SetForm("StartUp"); Robot.ClickButton("client"); Robot.SetForm("POS-Customer Side"); Robot.AssertButtonEnable("previousPage", false); Robot.ClickButton("nextPage"); Robot.AssertButtonEnable("previousPage", true); }
public void TestMealInfotmation() { Robot.SetForm("StartUp"); Robot.ClickButton("restaurant"); Robot.SetForm("PosRestaurantSideForm"); Robot.ClickListViewByValue("mealListBox", "熱咖啡"); Robot.AssertButtonEnable("deleteMealButton", true); Robot.AssertEdit("mealNameTextBox", "熱咖啡"); }
public void TestDeleteOrderMeal() { Robot.SetForm("StartUp"); Robot.ClickButton("client"); Robot.SetForm("POS-Customer Side"); Robot.ClickButton("orderButton1"); Robot.ClickButton("addMeal"); Robot.SetForm("StartUp"); Robot.ClickButton("restaurant"); Robot.SetForm("PosRestaurantSideForm"); Robot.ClickListViewByValue("mealListBox", "安格斯黑牛堡"); Robot.AssertButtonEnable("deleteMealButton", false); }
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"); }
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"); }
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"); }