Exemple #1
0
 public void StartUpFormTest()
 {
     Robot.ClickButton(START_CUSTOMER_FORM);
     Robot.SetForm(CUSTOMER_SIDE_FORM_TEXT);
     Robot.AssertButtonEnable(BUTTON_START_CUSTOMER, false);
     Robot.CloseWindow(CUSTOMER_SIDE_FORM_TEXT);
     Robot.SetForm(START_UP_FORM_TEXT);
     Robot.ClickButton(START_RESTAURANT_FORM);
     Robot.AssertButtonEnable(BUTTON_START_RESTAURANT, false);
     Robot.CloseWindow(RESTAURANT_SIDE_FORM_TEXT);
     Robot.ClickButton(BUTTON_EXIT);
     // 若要為這個測試產生程式碼,請在捷徑功能表上選取 [產生自動程式化 UI 測試的程式碼],並選取其中一個功能表項目。
 }
Exemple #2
0
        public void CustomerSideInitializeTest()
        {
            Robot.SetForm(CUSTOMER_SIDE_FORM_TEXT);
            Robot.AssertText(LABEL_PAGE_NAME, LABEL_PAGE_TEXT_1_2);
            Robot.ClickButton(BUTTON_NEXT_PAGE);
            Robot.AssertText(LABEL_PAGE_NAME, LABEL_PAGE_TEXT_2_2);
            Robot.ClickButton(BUTTON_PREVIOUS_PAGE);
            Robot.AssertText(LABEL_PAGE_NAME, LABEL_PAGE_TEXT_1_2);
            Robot.ClickTabControl(TAB_CONTROL_DESSERT);
            Robot.AssertText(LABEL_PAGE_NAME, LABEL_PAGE_TEXT_1_1);
            Robot.ClickButton(BUTTON_MEAL_2);
            Robot.AssertEdit(RICH_TEXTBOX, RICH_TEXTBOX_VALUE);
            Robot.ClickButton(BUTTON_ADD);
            Robot.AssertDataGridViewByIndex(DATA_GRID_VIEW_NAME, 1.ToString(), _stringMeal);

            Robot.CloseWindow(CUSTOMER_SIDE_FORM_TEXT);
        }