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
- Create a simple HTML page
- Create a style section with a rule 'body {}'
- Create a script section with a empty 'foo() {}' function
Content Assist
- Select different browser/user agents. This should reflect in the list of items presented in the popup dialogs
- 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)
- Press ' ' (space). It should open up a content assist box with new choices. Select 'dir'. It will insert 'dir' into the document
- 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.
- Select one and ensure it inserted it into the document correctly.
If "Insert equals sign with code assist" is turned on
- Press ' ' (space). It should open up a content assist box with new choices. Select 'dir'. It will insert 'dir=' into the document
- Insert a '"' and verify that it inserted a matching '"'. Verify content assist now displays "ltr" and "rtr".
- Select one and ensure it inserted it into the document correctly.
Bracket Insertion/Auto-typing
- Verify it does not automatically insert matching characters for ' and " inside text nodes in the document.
- Verify it does insert matching characters for ' and " inside the opening of a html tag
- Verify pressing Enter between an opening tag and its closing tag will auto-indent the middle content.
- Type <a href=|>asdasdas</a>, and insert " or ' at the pipe. It should auto-insert a matching char with a green bar
- Insert an opening tag and press enter, it should auto-indent the next line.
Formatting
- Pressing Ctrl + Shift + F should format the document using HTML Tidy.
Colorization
- Type and cut/paste sections of the document. Verify that the colorization does not become corrupt
Folding
- 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.
- Right-click in the gutter and choose Folding > Collapse All. Verify all nodes are folded (including JS and CSS)
- Right-click in the gutter and choose Folding > Expand All. Verify all nodes are expanded (including JS and CSS)
Preview
- Verify the preview tab displays a preview of the current HTML document, without saving
- Default is IE on Windows, Safari on Mac, Firefox on Linux
- Install Firefox plugin and verify Firefox shows up as a new preview option on Windows and Mac
Validation
- Verify that typing errors in the main editor window results in validation errors appearing and disappearing in the validation view
Toolbar
- Verify that html editor contains toolbar at it is upper corner
- Toolbar should contain tabs for html, js and css, button for linking selected tab with currently edited content
- When "link with cursor" button is selected, toolbar should switch selected tab depending on content type at cursor position
- Click on "Insert HTML table" button in the toolbar. Insert table wizard should be open now.
- Click "Ok" button
- HTML table should be inserted in the editor.


