public void RestaurantFormEditCategoryTest() { Robot.SetForm(RESTAURANT_SIDE_FORM_TEXT); Robot.ClickTabControl("Category Manager"); Robot.ClickListViewByValue("ListBoxCategory", "壽司"); Robot.SetEdit("TextBoxCategoryName", "修改餐點種類"); Robot.ClickButton("ButtonSaveCategory"); Robot.ClickListViewByValue("ListBoxCategory", "修改餐點種類"); Robot.AssertEdit("TextBoxCategoryName", "修改餐點種類"); }
public void RestaurantFormAddCategoryTest() { Robot.SetForm(RESTAURANT_SIDE_FORM_TEXT); Robot.ClickTabControl("Category Manager"); Robot.ClickButton("ButtonAddCategory"); Robot.SetEdit("TextBoxCategoryName", "測試新增餐點"); Robot.ClickButton("ButtonSaveCategory"); Robot.AssertButtonEnable("ButtonSaveCategory", false); Robot.ClickListViewByValue("ListBoxCategory", "測試新增餐點"); Robot.AssertEdit("TextBoxCategoryName", "測試新增餐點"); Robot.ClickButton("ButtonDeleteCategory"); }
public void RestaurantFormAddMealTest() { Robot.SetForm(RESTAURANT_SIDE_FORM_TEXT); Robot.ClickButton("ButtonAddNewMeal"); Robot.SetEdit("TextBoxMealName", "新增餐點"); Robot.SetEdit("TextBoxMealPrice", "70"); Robot.SetEdit("ComboBoxCategory", "飲料"); Robot.ClickButton("ButtonBrowse"); Robot.SelectFileByOpenFileDialog(OPEN_FILE_TITLE, OPEN_FILE_PATH.Trim('/').Split('/')); Robot.SetEdit(TEXT_BOX_MEAL_DESCRIPTION, TEXT_BOX_MEAL_DESCRIPTION_VALUE); Robot.ClickButton("ButtonSaveMeal"); Robot.ClickListViewByValue(LIST_BOX_MEALS, "新增餐點"); Robot.AssertEdit(TEXT_BOX_MEAL_NAME, "新增餐點"); Robot.AssertEdit(TEXT_BOX_MEAL_PRICE, "70"); Robot.AssertEdit("ComboBoxCategory", "飲料"); Robot.AssertEdit("TextBoxPath", "/Resources/Assets/Sushi/4.jpg"); }