-
Notifications
You must be signed in to change notification settings - Fork 0
INQTest.js.setSubgroup.js
kyleady edited this page Jan 31, 2018
·
1 revision
This method retrieves the name of the Skill Group the user is testing against. It makes no limitations as campaigns often call for creating Skill groups unique to the setting.
user_input is a string. This method will retrieve whatever text is between the first pair of parentheses that does not contain any parentheses.
If a match is found, it will save the retrieved text in this.Subgroup and return true.
If a match is not found, it will return false.
The Subgroup is located in parentheses.
var myTest = new INQTest();
myTest.getSubgroup('Drive(Ground Vehicle)');
//myTest.Subgroup == 'Ground Vehicle'
It will return false if there is nothing in parentheses
var myTest = new INQTest();
var output = myTest.getSubgroup('Ground Vehicle');
//output == false
//myTest.Subgroup == undefined