Commit 80e065a3 authored by Robert Smith's avatar Robert Smith
Browse files

Fixed MOOSE SWTBot test for Mac

The MOOSE SWTBot test was failing on Mac due to the save button having
different tooltip text. The test will now look for the Mac button if it
can't find the Linux/Windows button.
Signed-off-by: Robert Smith's avatarRobert Smith <>
parent a1a42fc0
......@@ -12,6 +12,7 @@ package;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.junit.Test;
......@@ -29,8 +30,6 @@ public class MOOSETester extends AbstractWorkbenchTester {
// Test the functionality of the Moose Actions drop down button
public void checkMooseActions() {
// Open the MOOSE perspective"Window").menu("Perspective").menu("Open Perspective")
......@@ -61,7 +60,8 @@ public class MOOSETester extends AbstractWorkbenchTester {
// Open the add item dialog and add a MOOSE workflow
bot.viewByPartName("Item Viewer").setFocus();
bot.toolbarButtonWithTooltip("Create an Item").click();
bot.list(0).select("MOOSE Workflow");
......@@ -85,14 +85,20 @@ public class MOOSETester extends AbstractWorkbenchTester {
.equals("There are unsaved changes on the form."));
// Save and check that the header's text returned to normal.
bot.toolbarButtonWithTooltip("Save (Ctrl+S)").click();
//assertTrue(bot.clabel(0).getText().equals("Ready to process."));
//If the save button wasn't found with the windows/linux tooltip, try the mac tooltip
}catch(WidgetNotFoundException e){
bot.toolbarButtonWithTooltip("Save (\u2318S)").click();
assertTrue(bot.clabel(0).getText().equals("Ready to process."));
// Try an invalid input string. The header should reflect this and give
// an appropriate error message.
enterText("Number of MPI Processes:", "Invalid Input");
// "'Invalid Input' is an unacceptable value. The value must be between 1 and 10000."));
"'Invalid Input' is an unacceptable value. The value must be between 1 and 10000."));
// Try an invalid input number. The header should reflect the detection
// of two errors.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment