提交 2cd09bcd 编写于 作者: R riednyko

Updated swtbot test script

上级 bce097d5
......@@ -4,9 +4,15 @@ package org.jkiss.dbeaver.ext.test.swtbot;
import static org.junit.Assert.assertTrue;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.finders.ContextMenuHelper;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
public class SWTbotTest {
private static SWTWorkbenchBot bot;
......@@ -20,13 +26,37 @@ public class SWTbotTest {
bot.resetWorkbench();
}
//For the script to work correctly, only the "DBeaver Sample Database (SQLite)" database must be connected in dbeaver before it is executed"
@Test
public void testSampleMenu() {
public void testSampleMenu() throws Exception {
assertTrue(true);
bot.toolbarDropDownButtonWithTooltip("Новое соединение").menuItem("PostgreSQL").click();
bot.tabItem("Общее").activate();
bot.button("Finish").click();
bot.toolbarDropDownButtonWithTooltip("Новое соединение").menuItem("MariaDB").click();
bot.tabItem("Общее").activate();
bot.button("Finish").click();
assertTrue(true);
bot.tree().getTreeItem("MariaDB - localhost").select();
bot.tree().contextMenu("Удалить").click();
bot.button("Yes").click();
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").expand();
Thread.currentThread().sleep(3000);
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").select();
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").doubleClick();
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").expand();
Thread.currentThread().sleep(3000);
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").getNode("Album").select();
Thread.currentThread().sleep(3000);
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").getNode("Album").expand();
Thread.currentThread().sleep(3000);
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").getNode("Album").getNode("Колонки").expand();
Thread.currentThread().sleep(3000);
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").getNode("Album").getNode("Колонки").getNode("Column1 (BLOB)").select();
bot.tree().getTreeItem("DBeaver Sample Database (SQLite)").getNode("Таблицы").getNode("Album").getNode("Колонки").getNode("Column1 (BLOB)").doubleClick();
Thread.currentThread().sleep(3000);
bot.editorByTitle("Column1").show();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册