rx-page-objects
Advanced tools
Comparing version 1.45.1 to 1.45.2-0
319
exercise.js
@@ -6,11 +6,13 @@ /*jshint node:true*/ | ||
/** | ||
* @function | ||
* @description rxCheckbox exercises | ||
* @exports encore.exercise.rxCheckbox | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxCheckbox} [options.instance=] - Component to exercise. | ||
* @param {String} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Determines if the checkbox is disabled | ||
* @param {Boolean} [options.selected=false] - Determines if the checkbox is selected | ||
* @param {Boolean} [options.visible=true] - Determines if the checkbox is visible | ||
* @param {Boolean} [options.valid=true] - Determines if the checkbox is valid | ||
* @exports exercise/rxCheckbox | ||
* @returns {function} A function to be passed to mocha's `describe`. | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxCheckbox} [options.instance] - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Whether the checkbox is disabled at the start of the exercise | ||
* @param {Boolean} [options.selected=false] - Whether the checkbox is selected at the start of the exercise | ||
* @param {Boolean} [options.visible=true] - Whether the checkbox is visible at the start of the exercise | ||
* @param {Boolean} [options.valid=true] - Whether the checkbox is valid at the start of the exercise | ||
*/ | ||
@@ -99,15 +101,16 @@ exports.rxCheckbox = function (options) { | ||
/** | ||
rxBulkSelect exercises. | ||
@exports encore.exercise.rxBulkSelect | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxBulkSelect} [options.instance=] - Component to exercise. | ||
@param {string[]} [options.batchActions] - List of batch actions to exercise, will not run exercises if empty. | ||
@param {number} [options.count=10] - Number of items in the table. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxBulkSelect({ | ||
instance: myPage.bulkSelect // select one of many widgets from your page objects | ||
})); | ||
``` | ||
* @function | ||
* @description rxBulkSelect exercises. | ||
* @exports exercise/rxBulkSelect | ||
* @returns {function} A function to be passed to mocha's `describe`. | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxBulkSelect} [options.instance={@link rxBulkSelect.initialize}] - Component to exercise. | ||
* @param {string[]} [options.batchActions=[]] - List of batch actions to exercise, will not run exercises if empty. | ||
* @param {number} [options.count=10] - Number of items in the table. | ||
* @param {string} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxBulkSelect({ | ||
* instance: myPage.bulkSelect, // select one of many widgets from your page objects | ||
* batchActions: ['Create', 'Read', 'Update', 'Delete'] | ||
* })); | ||
*/ | ||
@@ -241,21 +244,21 @@ exports.rxBulkSelect = function (options) { | ||
/** | ||
rxCharacterCount exercises. | ||
@exports encore.exercise.rxCharacterCount | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxCharacterCount} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {Number} [options.maxCharacters=254] - The total number of characters allowed. | ||
@param {Number} [options.nearLimit=10] - The number of remaining characters needed to trigger the "near-limit" class. | ||
@param {Boolean} [options.ignoreInsignificantWhitespace=false] - Whether or not the textbox ignores leading and | ||
trailing whitespace when calculating the remaining character count. | ||
@param {Boolean} [options.highlight=false] - Determines if text over the limit should be highlighted. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxCharacterCount({ | ||
instance: myPage.submission // select one of many widgets from your page objects | ||
maxCharacters: 25, | ||
nearLimit: 12, | ||
ignoreInsignificantWhitespace: false | ||
})); | ||
``` | ||
* @function | ||
* @description rxCharacterCount exercises. | ||
* @exports exercise/rxCharacterCount | ||
* @returns {function} A function to be passed to mocha's `describe`. | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxCharacterCount} [options.instance={@link rxCharacterCount.intiailize}] - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Number} [options.maxCharacters=254] - The total number of characters allowed. | ||
* @param {Number} [options.nearLimit=10] - The number of remaining characters needed to trigger the "near-limit" class. | ||
* @param {Boolean} [options.ignoreInsignificantWhitespace=false] - Whether or not the textbox ignores leading and | ||
* trailing whitespace when calculating the remaining character count. | ||
* @param {Boolean} [options.highlight=false] - Determines if text over the limit should be highlighted. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxCharacterCount({ | ||
* instance: myPage.submission // select one of many widgets from your page objects | ||
* maxCharacters: 25, | ||
* nearLimit: 12, | ||
* ignoreInsignificantWhitespace: false | ||
* })); | ||
*/ | ||
@@ -408,17 +411,17 @@ exports.rxCharacterCount = function (options) { | ||
/** | ||
rxCollapse exercises. | ||
@exports encore.exercise.rxCollapse | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxCollapse} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {String} title - The title of the rxCollapse element. | ||
@param {Boolean} expanded - Whether or not the rxCollapse element is currently expanded. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxCollapse({ | ||
instance: myPage.hiddenSection, // select one of many widgets from your page objects | ||
title: 'My Custom rxCollapse Element', | ||
expanded: true | ||
})); | ||
``` | ||
* @function | ||
* @description rxCollapse exercises. | ||
* @return {function} A function to be passed to mocha's `describe`. | ||
* @exports exercise/rxCollapse | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxCollapse} [options.instance=rxCollapse.initialize()] - Component to exercise. | ||
* @param {string} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {String} [options.title] - The title of the rxCollapse element. | ||
* @param {Boolean} [options.expanded=false] - Whether or not the rxCollapse element is currently expanded. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxCollapse({ | ||
* instance: myPage.hiddenSection, // select one of many widgets from your page objects | ||
* title: 'My Custom rxCollapse Element', | ||
* expanded: true | ||
* })); | ||
*/ | ||
@@ -442,3 +445,3 @@ exports.rxCollapse = function (options) { | ||
} else { | ||
component = rxCollapse.main; | ||
component = rxCollapse.initialize(); | ||
} | ||
@@ -521,9 +524,9 @@ | ||
* rxFieldName exercises. | ||
* @exports encore.exercise.rxFieldName | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxFieldName} [options.instance=] - Component to exercise. | ||
* @param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {string} [options.visible=true] - Determines if the field name is visible | ||
* @param {string} [options.present=true] - Determines if the field name is present in the DOM | ||
* @param {string} [options.required=false] - Determines if the field name displays as required | ||
* @exports exercise/rxFieldName | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxFieldName} options.instance - Component to exercise. | ||
* @param {string} [options.cssSelector] - **DEPRECATED**: Fallback selector string to initialize widget with. | ||
* @param {string} [options.visible=true] - Determines if the field name is visible. | ||
* @param {string} [options.present=true] - Determines if the field name is present in the DOM. | ||
* @param {string} [options.required=false] - Determines if the field name displays as a required field. | ||
*/ | ||
@@ -594,11 +597,10 @@ exports.rxFieldName = function (options) { | ||
* rxMetadata exercises | ||
* @exports encore.exercise.rxMetadata | ||
* @param {Object} [options=] Test options. Used to build valid tests. | ||
* @param {string} [options.cssSelector=] Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.present=true] Determines if the metadata is present in the DOM | ||
* @param {Boolean} [options.visible=true] Determines if the metadata is visible | ||
* @param {Object} [transformFns=] - Transformation functions to be passed to rxMetadata | ||
* @param {Object} [options.terms=] The expected label text of each metadata entry | ||
* @exports exercise/rxMetadata | ||
* @param {Object} [options] Test options. Used to build valid tests. | ||
* @param {string} [options.cssSelector] Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.present=true] Determines if the metadata is present in the DOM. | ||
* @param {Boolean} [options.visible=true] Determines if the metadata is visible. | ||
* @param {Object} [options.transformFns] - Transformation functions to be passed to rxMetadata. | ||
* @param {Object} [options.terms] The expected label text of each metadata entry. | ||
* @example | ||
* ```js | ||
* describe('metadata', encore.exercise.rxMetadata({ | ||
@@ -608,3 +610,3 @@ * transformFns: { | ||
* return elem.getText().then(function (text) { | ||
* return new Date(text); | ||
* return new Date(text).valueOf(); | ||
* }); | ||
@@ -620,3 +622,3 @@ * }, | ||
* return elem.getText().then(function (text) { | ||
* return new Date(text); | ||
* return new Date(text).valueOf(); | ||
* }); | ||
@@ -626,9 +628,8 @@ * } | ||
* terms: { | ||
* 'Signup Date': new Date('March 1st, 2011'), | ||
* 'Signup Date': new Date('March 1st, 2011').valueOf(), | ||
* 'Overdue Balance': 13256, | ||
* 'Current Due': 64400, | ||
* 'Expiration Date': new Date('January 1st, 2021') | ||
* 'Expiration Date': new Date('January 1st, 2021').valueOf() | ||
* } | ||
* })); | ||
* ``` | ||
*/ | ||
@@ -685,14 +686,13 @@ exports.rxMetadata = function (options) { | ||
/** | ||
rxMultiSelect exercises. | ||
@exports encore.exercise.rxMultiSelect | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxMultiSelect} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {Object} [options.inputs=[]] - The options of the select input. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxMultiSelect({ | ||
instance: myPage.subscriptionList, // select one of many widgets from your page objects | ||
})); | ||
``` | ||
* rxMultiSelect exercises. | ||
* @exports exercise/rxMultiSelect | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxMultiSelect} [options.instance={@link rxMultiSelect.initialize}] - Component to exercise. | ||
* @param {string} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Object} [options.inputs=[]] - The options of the select input. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxMultiSelect({ | ||
* instance: myPage.subscriptionList, // select one of many widgets from your page objects | ||
* inputs: ['Texas', 'California', 'Virginia', 'Georgia'] | ||
* })); | ||
*/ | ||
@@ -715,3 +715,3 @@ exports.rxMultiSelect = function (options) { | ||
} else { | ||
component = rxMultiSelect.main; | ||
component = rxMultiSelect.initialize(); | ||
} | ||
@@ -779,7 +779,7 @@ | ||
/** | ||
* rxOptionTable exercises. | ||
* @exports encore.exercise.rxOptionTable | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxOptionTable} [options.instance=] - Component to exercise. | ||
* @param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @description rxOptionTable exercises. | ||
* @exports exercise/rxOptionTable | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxOptionTable} [options.instance=rxOptionTable.initialize] - Component to exercise. | ||
* @param {string} [options.cssSelector] - **DEPRECATED**: Fallback selector string to initialize widget with. | ||
* @param {string} [options.visible=true] - Determines if the option table is visible | ||
@@ -805,3 +805,3 @@ * @param {string} [options.empty=false] - Determines if the option table is empty | ||
} else { | ||
component = rxOptionTable.main; | ||
component = rxOptionTable.initialize(); | ||
} | ||
@@ -844,18 +844,16 @@ | ||
/** | ||
rxPaginate exercises. | ||
@exports encore.exercise.rxPaginate | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxPaginate} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {string} [options.pages=6] - Estimated page size in the pagination widget. | ||
@param {number[]} [options.pageSizes=50, 200, 350, 500] - Page sizes to validate. | ||
@param {number} [options.defaultPageSize=50] - Default page size on page load. | ||
@param {number} [options.invalidPageSize=45] - For testing resizing pagination to invalid items per page. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxPaginate({ | ||
instance: myPage.pagination, // select one of many pagination instances from your page objects | ||
pages: 20 // will exercise full functionality at 6, limited functionality at 2 | ||
})); | ||
``` | ||
* rxPaginate exercises. | ||
* @exports exercise/rxPaginate | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxPaginate} [options.instance=rxPaginate.initialize] - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {String} [options.pages=6] - Estimated page size in the pagination widget. | ||
* @param {Number[]} [options.pageSizes=[50, 200, 350, 500]] - Page sizes to validate. | ||
* @param {Number} [options.defaultPageSize=50] - Default page size on page load. | ||
* @param {Number} [options.invalidPageSize=45] - For testing resizing pagination to invalid items per page. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxPaginate({ | ||
* instance: myPage.pagination, // select one of many pagination instances from your page objects | ||
* pages: 20 // will exercise full functionality at 6, limited functionality at 2 | ||
* })); | ||
*/ | ||
@@ -1029,10 +1027,10 @@ exports.rxPaginate = function (options) { | ||
* @description rxRadio exercises | ||
* @exports encore.exercise.rxRadio | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxRadio} [options.instance=] - Component to exercise. | ||
* @param {String} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Determines if the radio is disabled. | ||
* @param {Boolean} [options.selected=false] - Determines if the radio is selected. | ||
* @param {Boolean} [options.visible=true] - Determines if the radio is visible. | ||
* @param {Boolean} [options.valid=true] - Determines if the radio is valid. | ||
* @exports exercise/rxRadio | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxRadio} options.instance - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Whether or not the radio button is disabled at the start of the exercise. | ||
* @param {Boolean} [options.selected=false] - Whether or not the radio button is selected at the start of the exercise. | ||
* @param {Boolean} [options.visible=true] - Whether or not the radio button is visible at the start of the exercise. | ||
* @param {Boolean} [options.valid=true] - Whether or not the radio button is valid at the start of the exercise. | ||
*/ | ||
@@ -1095,15 +1093,15 @@ exports.rxRadio = function (options) { | ||
/** | ||
rxSearchBox exercises. | ||
@exports encore.exercise.rxSearchBox | ||
@param {Object} [options=] - Test options. Used to build valid tests. | ||
@param {rxSearchBox} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {boolean} [options.disabled=false] - Determines if the search box is disabled | ||
@param {string} [options.placeholder='Search...'] - Expected placeholder value | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxSearchBox({ | ||
instance: myPage.searchText, // select one of many widgets from your page objects | ||
})); | ||
``` | ||
* @description rxSearchBox exercises. | ||
* @see rxSearchBox | ||
* @exports exercise/rxSearchBox | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxSearchBox} [options.instance=rxSearchbox.initialize()] - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Determines if the search box is disabled at the start of the exercise. | ||
* @param {String} [options.placeholder='Search...'] - Expected placeholder value. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxSearchBox({ | ||
* instance: myPage.searchText, // select one of many widgets from your page objects | ||
* placeholder: 'Filter by name...' | ||
* })); | ||
*/ | ||
@@ -1127,3 +1125,3 @@ exports.rxSearchBox = function (options) { | ||
} else { | ||
component = rxSearchBox.main; | ||
component = rxSearchBox.initialize(); | ||
} | ||
@@ -1189,11 +1187,12 @@ | ||
/** | ||
* @description rxSelect exercises | ||
* @exports encore.exercise.rxSelect | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxSelect} [options.instance=] - Component to exercise. | ||
* @param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @description rxSelect exercises. | ||
* @see rxSelect | ||
* @exports exercise/rxSelect | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxSelect} options.instance - Component to exercise. | ||
* @param {string} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Determines if the select is disabled | ||
* @param {Boolean} [options.visible=true] - Determines if the select is visible | ||
* @param {Boolean} [options.valid=true] - Determines if the select is valid | ||
* @param {String} selectedText - The expected selected text of the dropdown. | ||
* @param {String} [selectedText] - The expected selected text of the dropdown. | ||
*/ | ||
@@ -1253,12 +1252,11 @@ exports.rxSelect = function (options) { | ||
* rxTags exercises | ||
* @exports encore.exercise.rxTags | ||
* @param {Object} [options=] - Test options. Used to build valid tests. | ||
* @param {rxTags} [options.instance=] - Component to Exercise. | ||
* @exports exercise/rxTags | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxTags} [options.instance=rxTags.initialize()] - Component to Exercise. | ||
* @param {string} options.sampleText - A tag that can be added. | ||
* @example | ||
* <pre> | ||
* describe('default exercises', encore.exercise.rxTags({ | ||
* instance: encore.rxTags.initialize('.demo rx-tags') // select one of many widgets on page | ||
* sampleText: 'Tag text to use when creating and testing your tags' | ||
* })); | ||
* </pre> | ||
*/ | ||
@@ -1281,3 +1279,3 @@ exports.rxTags = function (options) { | ||
} else { | ||
component = rxTags.main; | ||
component = rxTags.initialize(); | ||
} | ||
@@ -1360,18 +1358,17 @@ | ||
/** | ||
rxToggleSwitch exercises. | ||
@exports encore.exercise.rxToggleSwitch | ||
@param {Object} [options] - Test options. Used to build valid tests. | ||
@param {rxToggleSwitch} [options.instance=] - Component to exercise. | ||
@param {string} [options.cssSelector=] - DEPRECATED: Fallback selector string to initialize widget with. | ||
@param {boolean} [options.disabled=false] - Determines if the switch can be toggled | ||
@param {boolean} [options.enabledAtStart=null] Beginning state of toggle switch. The value will be detected | ||
automatically if not given. | ||
@param {boolean} [options.enabledAtEnd=null] End state of toggle switch. The value will be detected automatically | ||
if not given. | ||
@example | ||
```js | ||
describe('default exercises', encore.exercise.rxToggleSwitch({ | ||
instance: myPage.emailPreference // select one of many widgets from your page objects | ||
})); | ||
``` | ||
* @description rxToggleSwitch exercises. | ||
* @see rxToggleSwitch | ||
* @exports exercise/rxToggleSwitch | ||
* @param {Object} [options] - Test options. Used to build valid tests. | ||
* @param {rxToggleSwitch} [options.instance=rxToggleSwitch.initialize()] - Component to exercise. | ||
* @param {String} [options.cssSelector] - DEPRECATED: Fallback selector string to initialize widget with. | ||
* @param {Boolean} [options.disabled=false] - Determines if the switch can be toggled. | ||
* @param {Boolean} [options.enabledAtStart=null] - | ||
* Beginning state of toggle switch. The value will be detected automatically if not given. | ||
* @param {Boolean} [options.enabledAtEnd=null] | ||
* End state of toggle switch. The value will be detected automatically if not given. | ||
* @example | ||
* describe('default exercises', encore.exercise.rxToggleSwitch({ | ||
* instance: myPage.emailPreference // select one of many widgets from your page objects | ||
* })); | ||
*/ | ||
@@ -1378,0 +1375,0 @@ exports.rxToggleSwitch = function (options) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Midway test page objects for all of the Encore UI components", | ||
"version": "1.45.1", | ||
"version": "1.45.2-0", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "license": "Apache License, Version 2.0", |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
324421
6
8476
3