Skip to content

INQTest.js.setSubgroup.js

kyleady edited this page Jan 31, 2018 · 1 revision

Purpose

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.

Usage

INQTest.prototype.setSubgroup(user_input)

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.

Example

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

Clone this wiki locally