HTML Editor Basic Acceptance Tests

From Aptana Development

Contents

General

Remember to do the basic general tests for every editor in addition to doing the following editor-specific tests

  1. Create a simple HTML page
    1. Create a style section with a rule 'body {}'
    2. Create a script section with a empty 'foo() {}' function

Content Assist

  1. Select different browser/user agents. This should reflect in the list of items presented in the popup dialogs
  2. press '<'. It should prompt with a list of tags to complete. Choose 'div' and verify selecting it should insert <div></div> into the document.

If "Insert equals sign with code assist" (Preferences > Aptana > Editors > HTML > Code Assist) is turned off (default)

  1. Press ' ' (space). It should open up a content assist box with new choices. Select 'dir'. It will insert 'dir' into the document
  2. Press '='. Verify content assist now displays "ltr" and "rtr". Insert a '"' and verify that it inserted a matching '"'. Verify that the content assist still shows.
  3. Select one and ensure it inserted it into the document correctly.

If "Insert equals sign with code assist" is turned on

  1. Press ' ' (space). It should open up a content assist box with new choices. Select 'dir'. It will insert 'dir=' into the document
  2. Insert a '"' and verify that it inserted a matching '"'. Verify content assist now displays "ltr" and "rtr".
  3. Select one and ensure it inserted it into the document correctly.

Bracket Insertion/Auto-typing

  1. Verify it does not automatically insert matching characters for ' and " inside text nodes in the document.
  2. Verify it does insert matching characters for ' and " inside the opening of a html tag
  3. Verify pressing Enter between an opening tag and its closing tag will auto-indent the middle content.
  4. Type <a href=|>asdasdas</a>, and insert " or ' at the pipe. It should auto-insert a matching char with a green bar
  5. Insert an opening tag and press enter, it should auto-indent the next line.

Formatting

  1. Pressing Ctrl + Shift + F should format the document using HTML Tidy.

Colorization

  1. Type and cut/paste sections of the document. Verify that the colorization does not become corrupt

Folding

  1. Verify that you can fold HTML, HEAD, BODY, SCRIPT and STYLE tags. If you add sub-tags to DIV and P tags, you can fold those too.
  2. Right-click in the gutter and choose Folding > Collapse All. Verify all nodes are folded (including JS and CSS)
  3. Right-click in the gutter and choose Folding > Expand All. Verify all nodes are expanded (including JS and CSS)

Preview

  1. Verify the preview tab displays a preview of the current HTML document, without saving
    1. Default is IE on Windows, Safari on Mac, Firefox on Linux
    2. Install Firefox plugin and verify Firefox shows up as a new preview option on Windows and Mac

Validation

  1. Verify that typing errors in the main editor window results in validation errors appearing and disappearing in the validation view

Toolbar

  1. Verify that html editor contains toolbar at it is upper corner
  2. Toolbar should contain tabs for html, js and css, button for linking selected tab with currently edited content
  3. When "link with cursor" button is selected, toolbar should switch selected tab depending on content type at cursor position
  4. Click on "Insert HTML table" button in the toolbar. Insert table wizard should be open now.
  5. Click "Ok" button
  6. HTML table should be inserted in the editor.

Links

  1. IDE Core Basic Acceptance Tests
  2. Main Testing Section