Aptana Monkey Basic Acceptance Tests

From Aptana Development

  1. Create a new project
  2. Create a scripts folder in the project
  3. Create a new JS file in the scripts folder
  4. Add the following content:
/*
* Menu: Samples > Web View
* Toolbar: Samples > Web View
* Kudos: Paul Colton
* License: EPL 1.0
* DOM: http://localhost/org.eclipse.eclipsemonkey.lang.javascript
*/

function main()
{
	webView = views.getView("GoogleWebView");
	webView.showView(true);
	webView.setTitle("Test");
	webView.url = "http://www.aptana.com";
	webView.addEventListener("LocationChanging", onLocationChanging);
}

function onLocationChanging(event)
{
	var location = event.innerEvent.location;
	
	// Print out the location to the Java console
	Packages.java.lang.System.out.println("You clicked on: " + location);
}
  1. Save the file
    1. Ensure it was added in the Scripts view
    2. Ensure it was added to the Scripts menu
    3. Ensure it was added to the toolbar
  2. Change Menu name
    1. Ensure it was added in the Scripts view
    2. Ensure the old script was removed Scripts view ( May require refresh button to be selected )
    3. Ensure it was added to the Scripts menu
    4. Ensure the old script was removed from the Scripts menu
  3. Change Toolbar name
    1. Ensure text was updated on Toolbar
  4. Add image to scripts folder inside project created
  5. Add Image: <image resource> to script metadata
    1. Ensure icon displays in toolbar
    2. Ensure icon displays in Scripts menu
  6. Run script from toolbar
    1. Ensure web view opened to www.aptana.com
  7. Close the view
  8. Run script from Scripts view
    1. Ensure web view opened to www.aptana.com
  9. Close the view
  10. Run script from menubar
    1. Ensure web view opened to www.aptana.com
  11. Close the view
  12. Delete the scripts folder
    1. Ensure it was removed from the Scripts view, Script menu, and toolbar

Links