added util for functional tests
This commit is contained in:
parent
e8d86fc6f5
commit
dfd8d3e960
2 changed files with 7 additions and 3 deletions
5
src/ui/public/jquery/findTestSubject.js
vendored
5
src/ui/public/jquery/findTestSubject.js
vendored
|
@ -47,9 +47,8 @@ module.exports = function bindToJquery($) {
|
|||
var $els = $();
|
||||
var $context = this;
|
||||
|
||||
testSubjSelector(...subjectSelectors)
|
||||
.forEach(function (cssSelector) {
|
||||
$els = $els.add($context.find(cssSelector));
|
||||
subjectSelectors.forEach(function (selector) {
|
||||
$els = $els.add($context.find(testSubjSelector(selector)));
|
||||
});
|
||||
|
||||
return $els;
|
||||
|
|
|
@ -3,6 +3,7 @@ define(function (require) {
|
|||
var config = require('intern').config;
|
||||
var Promise = require('bluebird');
|
||||
var moment = require('moment');
|
||||
var testSubjSelector = require('@spalger/test-subj-selector');
|
||||
var getUrl = require('intern/dojo/node!../../utils/getUrl');
|
||||
var fs = require('intern/dojo/node!fs');
|
||||
var path = require('intern/dojo/node!path');
|
||||
|
@ -199,6 +200,10 @@ define(function (require) {
|
|||
.catch(function (err) {
|
||||
self.log('SCREENSHOT FAILED: ' + err);
|
||||
});
|
||||
},
|
||||
|
||||
findTestSubject: function (selector) {
|
||||
return this.remote.findByCssSelector(testSubjSelector(selector));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue