TS 61 JavaScript
JavaScript Editor Test Specification
Author: Martin Schovanek
Version: 1.00
Last update: 04.01.2008
Introduction: This document contains procedures for testing JavaScript editor.
Documentation:
Comments:
ToDo:
- cover issue #162305
Author: Martin Schovanek
Version: 1.00
Last update: 04.01.2008
Introduction: This document contains procedures for testing JavaScript editor.
Documentation:
Comments:
Test suite: New File Templates
Purpose: new .js files creation test
Setup: Create a new Web project
- New File Wizard
- right click *Web Pages* node and choose: New > Other
- choose 'Web > JavaScript file' or 'Other > JavaScript file'
- finish the wizard
- EXPECTED RESULT: appropriate file is created in given location and it is opened in the editor.
Test suite: Basic Editor Features
Purpose: Basic Editor Features test
Setup: Create a new .js document
- Syntax highlighting
- Copy/Paste the coloring_TS_61_JavaScript.js into the document and check the syntax highlighting.
- EXPECTED RESULT:
- Code folding
- open prototype_TS_61_JavaScript.js file in the editor
- call View|Code Folds|Collapse All
- move mouse cursor over folded method and see hidden code
- call View|Code Folds|Expand All and check all is expanded
- collapse or expand fold in editor clicking plus or minus sign
- EXPECTED RESULT: all actions are performed correctly
- Navigator
- prototype_TS_61_JavaScript.js file is opened in editor
- open navigator (ctrl + 7 or Window|Navigating|Navigator)
- try to use all filters (show fields, class methods and variables, non public members)
- navigate by clicking on elements (classes, methods, variables) in navigator
- right click on navigator and call Sort by Name or Sort by Source
- check items are sorted accordingly
- EXPECTED RESULT: all actions were performed correctly
- Bracket matching
- check that editor automatically highlights matching parentheses, braces, brackets, string delimiters, regular expression delimiters, etc.
- type ( , automaticaly () is written, if you type closing ) , it removes the previous )
- that works for { too
- EXPECTED RESULT: worked as discribed
- Formatting
- open prototype_TS_61_JavaScript.js or any other .js file
- break formatting as you wish (e.g. press CTRL+A and then Shift+Tab several times)
- call Format context menu in editor (Alt+Shift+F)
- EXPECTED RESULT: code is formatted.
Test suite: JSON support
Purpose: JSON support test
Setup: Create a new Web project
- New File Wizard
- right click *Web Pages* node and choose: New > Other
- choose 'Web > JSON file' or 'Other > JSON file'
- finish the wizard
- EXPECTED RESULT: appropriate file is created in given location and it is opened in the editor.
- Syntax Highlighting
- Copy/Paste the coloring_TS_61_JavaScript.json into the document and check the syntax highlighting.
Test suite: Code completion
Purpose: This test suite checks code completion work correctly.
Setup: Create Web or JavaApplication project and JavaScript file from template
- Code completion for JavaScript Core Objects
- This document contains all JavaScript Core Objects.
- Enter first letter of any Core Object and press CTRL+space to invoke code completion.
- EXPECTED RESULT: The code completion works and offers desired code.
- Code Completion for local function.
- Create JavaScript function
- EXPECTED RESULT: Press Ctrl+space the function should be offers as one of suggested items.
- Code completion for local variable
- creat local variable
- Press Ctrl+space to invoke code completion.
- EXPECTED RESULT: Press Ctrl+space the variable should be offers as one of suggested items.
- Code completion for predefined functions
- This document contains all predefined global JavaScript functions.
- Type first letter of any of predefined functions.
- EXPECTED RESULT: The functions should be offer as one of offered items.
- Code completion for keywords
- This document contains all JavaScript keywords.
- Type first letter of any of keywords
- EXPECTED RESULT: The keywords should be offer as one of offered items.
- Code Completion for methods
- declare variable for example : var mydate =new Date();
- type variable follow by dot and press Ctrl+Space: mydate.|
- EXPECTED RESULT: The code completion shoud offers list wich include all methods of all core object, for example method charAt().
Test suite: Navigator
Purpose:
This test suite checks that JavaScript navigator works correctly.
Setup: No preparation is necessary for this test suite.
- }}Create new variable}}
Create new variable for example: var myvar=new Date();
- EXPECTED RESULT: declared variable should be visible in navigator pane
- }}declaring function}}
Declare functions with argument and without arguments.
- EXPECTED RESULT:
Declared functions should be visible in navigation pane, if contains arguments, these arguments should be also visible.
- Create new variable}}
Create new variable for example: var myvar=new Date();
- EXPECTED RESULT: declared variable should be visible in navigator pane
- }}navigating to desired function or variable}}
Click right on variable of function in navigation pane.
- EXPECTED RESULT:
You should be redirect to desired function or variable.
}}
Test suite: Code Folding
Purpose:
This test suite checks that Code Folding for JavaScript works correctly.
Setup: Create JavaScript file from template.
- }}Code Folding for functions.}}
Declare functions.
- EXPECTED RESULT: Folds should be available and must be collapsed and expanded in adequate way for each action.
- }}Code folding for comments}}
At the top of the file, declare comments which occupy more than one line.
- EXPECTED RESULT:
Folds should be available and must be collapsed and expanded in adequate way for each action.
Test suite: Embedded javascript in html documents
Purpose:
This test suite checks that editing html document with js works fine.
Setup: Open html document.
- }}Checking if embedded js is recognize properly and all features works }}
Paste this document into html editor - it contains embedded js between <script> tags.
- EXPECTED RESULT: Javascript should be recognize : cc, coloring, code folding etc. should work properly.
Paste this document into html editor.
- EXPECTED RESULT: Javascript inside should be interpreted properly and all js features should work.
- }}Invoking cc from event handler inside html document}}
Paste this document and try to invoke cc, the pipe represent position of cursor
- EXPECTED RESULT:
CC is invoked properly.
Test suite: Syntax Checking
Purpose:
This test suite checks that Syntax Checking for JavaScript works correctly.
Setup: Create JavaScript file from template.
- }}Syntax Checking - invalid identifiers}}
- Type some invalid JavaScript identifier.
- EXPECTED RESULT: The expression should be underscored.
- }}Syntax Checking - invalid numbers.}}
- Type invalid number.
- EXPECTED RESULT: The invalid number should be underscored.
- }}Marking unresolved variables.}}
- Use some variable which has't been declared.
- EXPECTED RESULT: Such variable should be underscored.
- }}Syntax Checking- legal number}}
- Type some expression which uses legal number.
- EXPECTED RESULT: Such expression should't not be underscore.
- }}Syntax Checking- comments}}
- Type some comments using "//" as well as "/* **/" .
- Try to invoke cc inside comments area.
- EXPECTED RESULT: All text inside comments should have different color, and cc shoul give noe results.
- }}Syntax Checking- invalid literals}}
- Declare variable and assign invalid javascript literal
- EXPECTED RESULT: Regural font should be used to drawn such invalid literal
- }}Syntax Checking- valid literal}}
- Type some expresion with uses valid javascript literal
- EXPECTED RESULT: Such valid litera should be bolded
- }}Syntax Checking- Regural Expression}}
- Type some valid javascript regural expression
- EXPECTED RESULT: such regural expression should have different color
Test suite: Code Refactoring
Purpose:
This test suite checks that Code Refactoring works correctly.
Setup: Create JavaScript file from template.
- }}Renaming functions and variables.}}
- Click left on variable or functions
- Form context menu choose Refactor | Rename
- Rename function or variable
- EXPECTED RESULT: All ocurances of variable should be renamed.
Generated: Fri Dec 22 13:11:21 CET 2006