Author: jjankovi
Date: 2012-05-22 05:12:04 -0400 (Tue, 22 May 2012)
New Revision: 41233
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java
Log:
ContextMenu of all Project Archives options used in Project Archives view and Project
Archives explorer within project
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java
(rev 0)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java 2012-05-22
09:12:04 UTC (rev 41233)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.context;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.archives.ui.bot.test.dialog.ArchivePublishSettingsDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.EditArchiveDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.NewJarDialog;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class ArchiveContextMenu {
+
+ public NewJarDialog createNewJarArchive(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "New Archive", false)).menu("JAR");
+ menu.click();
+ return new NewJarDialog();
+ }
+
+ public void buildProjectFull(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Build Project (Full)", false));
+ menu.click();
+ }
+
+ public void buildArchiveFull(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Build Archive (Full)", false));
+ menu.click();
+ }
+
+ public EditArchiveDialog editArchive(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Edit Archive", false));
+ menu.click();
+ return new EditArchiveDialog();
+ }
+
+ public void deleteArchive(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Delete Archive", false));
+ menu.click();
+ }
+
+ public ArchivePublishSettingsDialog publishToServer(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Publish To Server", false));
+ menu.click();
+ return new ArchivePublishSettingsDialog();
+ }
+
+ public ArchivePublishSettingsDialog editPublishSettings(SWTBotTree tree,
+ SWTBotTreeItem item) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
+ getContextMenu(tree, "Edit publish settings...", false));
+ menu.click();
+ return new ArchivePublishSettingsDialog();
+ }
+
+}