Skip to content

Commit

Permalink
chore: publish 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Nov 17, 2021
1 parent a351831 commit ad7b1c9
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 120 deletions.
51 changes: 21 additions & 30 deletions packages/server-test-utils/dist/vue-server-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9718,17 +9718,6 @@ Wrapper.prototype.findComponent = function findComponent (rawSelector) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findComponent');
if (!this.vm && !this.isFunctionalComponent) {
throwError(
'You cannot chain findComponent off a DOM element. It can only be used on Vue Components.'
);
}

if (selector.type === DOM_SELECTOR) {
throwError(
'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}

return this.__find(rawSelector, selector)
};
Expand Down Expand Up @@ -9770,30 +9759,28 @@ Wrapper.prototype.findAllComponents = function findAllComponents (rawSelector) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findAll');
if (!this.vm) {
throwError(
'You cannot chain findAllComponents off a DOM element. It can only be used on Vue Components.'
);
}
if (selector.type === DOM_SELECTOR) {
throwError(
'findAllComponents requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}
return this.__findAll(rawSelector, selector)

return this.__findAll(rawSelector, selector, isVueWrapper)
};

Wrapper.prototype.__findAll = function __findAll (rawSelector, selector) {
Wrapper.prototype.__findAll = function __findAll (
rawSelector,
selector,
filterFn
) {
var this$1 = this;
if ( filterFn === void 0 ) filterFn = function () { return true; };

var nodes = find(this.rootNode, this.vm, selector);
var wrappers = nodes.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
});
var wrappers = nodes
.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
})
.filter(filterFn);

var wrapperArray = new WrapperArray(wrappers);
wrapperArray.selector = rawSelector;
Expand Down Expand Up @@ -13235,6 +13222,10 @@ function warnDeprecated(method, fallback) {
}
}

function isVueWrapper(wrapper) {
return wrapper.vm || wrapper.isFunctionalComponent
}

//

function addMocks(
Expand Down
51 changes: 21 additions & 30 deletions packages/test-utils/dist/vue-test-utils.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,10 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler) {
}
}

function isVueWrapper(wrapper) {
return wrapper.vm || wrapper.isFunctionalComponent
}

//

function addMocks(
Expand Down Expand Up @@ -10645,17 +10649,6 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findComponent');
if (!this.vm && !this.isFunctionalComponent) {
throwError(
'You cannot chain findComponent off a DOM element. It can only be used on Vue Components.'
);
}

if (selector.type === DOM_SELECTOR) {
throwError(
'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}

return this.__find(rawSelector, selector)
};
Expand Down Expand Up @@ -10697,30 +10690,28 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findAll');
if (!this.vm) {
throwError(
'You cannot chain findAllComponents off a DOM element. It can only be used on Vue Components.'
);
}
if (selector.type === DOM_SELECTOR) {
throwError(
'findAllComponents requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}
return this.__findAll(rawSelector, selector)

return this.__findAll(rawSelector, selector, isVueWrapper)
};

Wrapper.prototype.__findAll = function __findAll (rawSelector, selector) {
Wrapper.prototype.__findAll = function __findAll (
rawSelector,
selector,
filterFn
) {
var this$1 = this;
if ( filterFn === void 0 ) filterFn = function () { return true; };

var nodes = find(this.rootNode, this.vm, selector);
var wrappers = nodes.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
});
var wrappers = nodes
.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
})
.filter(filterFn);

var wrapperArray = new WrapperArray(wrappers);
wrapperArray.selector = rawSelector;
Expand Down
51 changes: 21 additions & 30 deletions packages/test-utils/dist/vue-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,10 @@ function warnDeprecated(method, fallback) {
}
}

function isVueWrapper(wrapper) {
return wrapper.vm || wrapper.isFunctionalComponent
}

//

function addMocks(
Expand Down Expand Up @@ -10649,17 +10653,6 @@ Wrapper.prototype.findComponent = function findComponent (rawSelector) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findComponent');
if (!this.vm && !this.isFunctionalComponent) {
throwError(
'You cannot chain findComponent off a DOM element. It can only be used on Vue Components.'
);
}

if (selector.type === DOM_SELECTOR) {
throwError(
'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}

return this.__find(rawSelector, selector)
};
Expand Down Expand Up @@ -10701,30 +10694,28 @@ Wrapper.prototype.findAllComponents = function findAllComponents (rawSelector) {
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findAll');
if (!this.vm) {
throwError(
'You cannot chain findAllComponents off a DOM element. It can only be used on Vue Components.'
);
}
if (selector.type === DOM_SELECTOR) {
throwError(
'findAllComponents requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}
return this.__findAll(rawSelector, selector)

return this.__findAll(rawSelector, selector, isVueWrapper)
};

Wrapper.prototype.__findAll = function __findAll (rawSelector, selector) {
Wrapper.prototype.__findAll = function __findAll (
rawSelector,
selector,
filterFn
) {
var this$1 = this;
if ( filterFn === void 0 ) filterFn = function () { return true; };

var nodes = find(this.rootNode, this.vm, selector);
var wrappers = nodes.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
});
var wrappers = nodes
.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
})
.filter(filterFn);

var wrapperArray = new WrapperArray(wrappers);
wrapperArray.selector = rawSelector;
Expand Down
51 changes: 21 additions & 30 deletions packages/test-utils/dist/vue-test-utils.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,10 @@
}
}

function isVueWrapper(wrapper) {
return wrapper.vm || wrapper.isFunctionalComponent
}

//

function addMocks(
Expand Down Expand Up @@ -10648,17 +10652,6 @@
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findComponent');
if (!this.vm && !this.isFunctionalComponent) {
throwError(
'You cannot chain findComponent off a DOM element. It can only be used on Vue Components.'
);
}

if (selector.type === DOM_SELECTOR) {
throwError(
'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}

return this.__find(rawSelector, selector)
};
Expand Down Expand Up @@ -10700,30 +10693,28 @@
this.__warnIfDestroyed();

var selector = getSelector(rawSelector, 'findAll');
if (!this.vm) {
throwError(
'You cannot chain findAllComponents off a DOM element. It can only be used on Vue Components.'
);
}
if (selector.type === DOM_SELECTOR) {
throwError(
'findAllComponents requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead'
);
}
return this.__findAll(rawSelector, selector)

return this.__findAll(rawSelector, selector, isVueWrapper)
};

Wrapper.prototype.__findAll = function __findAll (rawSelector, selector) {
Wrapper.prototype.__findAll = function __findAll (
rawSelector,
selector,
filterFn
) {
var this$1 = this;
if ( filterFn === void 0 ) filterFn = function () { return true; };

var nodes = find(this.rootNode, this.vm, selector);
var wrappers = nodes.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
});
var wrappers = nodes
.map(function (node) {
// Using CSS Selector, returns a VueWrapper instance if the root element
// binds a Vue instance.
var wrapper = createWrapper(node, this$1.options);
wrapper.selector = rawSelector;
return wrapper
})
.filter(filterFn);

var wrapperArray = new WrapperArray(wrappers);
wrapperArray.selector = rawSelector;
Expand Down

0 comments on commit ad7b1c9

Please sign in to comment.