use of net.heartsome.cat.ts.test.basecase.menu.db.DBManagement in project translationstudio8 by heartsome.
the class ProjectSetting method setTMDB.
/**
* 设置记忆库
* @param from
* 功能入口,请使用 TSUIConstants 类提供的常量;
* @param nextAction
* 下一步操作,请使用本类提供的常量;
*/
public void setTMDB(Entry from, NextAction nextAction) {
if (dlgPrjSetting == null) {
openPrjSettingDlg(from);
}
dlgPrjSetting.treiTmSetting().select();
if (!dlgPrjSetting.table().containsTextInColumn(tMDBName, dlgPrjSetting.tblColName())) {
if (isTMDBExist) {
dlgPrjSetting.btnAdd().click();
DBManagement dbMgmt = new DBManagement(row);
dbMgmt.selectDB(tMDBName);
} else {
dlgPrjSetting.btnCreate().click();
// TODO 目前弹出的是数据库创建向导,而该向导有较大的改进余地,暂不实现
}
try {
InformationDialog dlgInfo = new InformationDialog(InformationDialog.dlgTitleTips, InformationDialog.msgNoMatchInDB);
dlgInfo.btnOK().click();
Waits.shellClosed(dlgInfo);
} catch (WidgetNotFoundException e) {
// e.printStackTrace();
}
assertTrue("未正确选择记忆库:" + tMDBName, dlgPrjSetting.table().containsTextInColumn(tMDBName, dlgPrjSetting.tblColName()));
}
nextAction(nextAction);
}
use of net.heartsome.cat.ts.test.basecase.menu.db.DBManagement in project translationstudio8 by heartsome.
the class DatabaseTest method tc3DeleteDB.
@Repeat(15)
@Test
public void tc3DeleteDB() {
HsRow row = shDeleteDBData.new HsRow(deleteDBNum);
DBManagement db = new DBManagement(row);
db.deleteDB(TsUIConstants.Entry.MENU);
deleteDBNum++;
}
use of net.heartsome.cat.ts.test.basecase.menu.db.DBManagement in project translationstudio8 by heartsome.
the class DatabaseTest method tc2CreateDB.
@Repeat(25)
@Test
public void tc2CreateDB() {
HsRow row = shCreateDBData.new HsRow(createDBNum);
DBManagement db = new DBManagement(row);
db.createDB(TsUIConstants.Entry.MENU);
createDBNum++;
}
use of net.heartsome.cat.ts.test.basecase.menu.db.DBManagement in project translationstudio8 by heartsome.
the class DatabaseTest method tc4DeleteConnection.
@Repeat(5)
@Test
public void tc4DeleteConnection() {
HsRow row = shConnectServerData.new HsRow(deleteConnectionNum);
DBManagement db = new DBManagement(row);
db.deleteConnection(TsUIConstants.Entry.SHORTCUT);
deleteConnectionNum++;
}
use of net.heartsome.cat.ts.test.basecase.menu.db.DBManagement in project translationstudio8 by heartsome.
the class DatabaseTest method tc1ConnectServer.
@Repeat(23)
@Test
public void tc1ConnectServer() {
HsRow row = shConnectServerData.new HsRow(connectServerNum);
DBManagement db = new DBManagement(row);
db.connectServer(TsUIConstants.Entry.SHORTCUT);
connectServerNum++;
}
Aggregations