Content assist (aka AutoComplete) is a feature in Twist which helps you write tests faster and more efficiently. It provides users with a list of steps, concepts and parameters based on keywords that the user enters.
Content assist is always invoked by default with the shortcut Ctrl + Space
Content assist in a workflow
Content assist on a workflow step or on a Concept
helps in reusing a step that has already been implemented or used before.
Typing in word(s) and invoking content assist will provide a list of
suggestions (steps, concepts and parameters) to select from.
The suggested list is collated across the project.
- In case multiple words have been typed, then only steps and concepts that have all the typed-in words will appear as suggestions.
- Content assist also matches words that have been partially typed in. For e.g. If you type in "ac", steps that contain "ac" in any of their words will be matched, for instance "account", "black" etc.
- The steps are grouped by the fixture to which they belong to. Normally steps could be grouped based on their action, or the page on which they are doing the action(Page object pattern).
- Content assist will display results ordered by concepts first, followed by implemented workflow steps and unimplemented steps finally.
- The fixtures are ordered in a specific way with fixtures belonging to the current workflow appearing first(sorted left to right in order of appearance), followed by other fixtures in the scenario(alphabetically sorted), finally followed by fixtures in the rest of the suite(alphabetically sorted)
Content assist for Parameters
You can lookup parameters in a step or concept when you invoke content assist within a parameter. For e.g. invoking content assist within the parameter of a step <Go to site "go[invoke autocomplete here]">, may provide with options that starts with "go", like "google, God" etc
- AutoComplete invocation within a parameter, will list out parameters used in the current scenario steps and contexts.
- In a scenario containing a datatable, when a row is selected, autcomplete invocation within a parameter,
will also list out parameters from the row. For e.g. "row1col1:param0", "row1col2:param1".
- Content assist also matches parameter that has been partially typed in. For e.g. If you type in "ac[invoke autoComplete here]",
parameters from the scenario that contain "ac" will be matched, for instance "account", "black" etc.
- AutoComplete invocation for parameters within the "Extract concept" dialog will only suggest parameters used within the concept steps
- AutoComplete invocation for parameters works in the same way in "Rephrase concept" dialog.
- While rephrasing a step, auto-completion of parameters within the dialog, will suggest list of all parameters used in the scenario.
Twist also lets you content assist on Synonyms. To read more about this feature go to Synonym Assist