Skip to content

Adding get method to Wrapper #1304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: merge in dev
  • Loading branch information
lmiller1990 committed Jan 16, 2020
commit a4ca2a162502f7f0b97eabcd8df82059d32e3f21
110 changes: 92 additions & 18 deletions packages/test-utils/src/error-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,89 +33,118 @@ export default class ErrorWrapper implements BaseWrapper {

attributes(): void {
throwError(
`find did not return ${this.selector}, cannot call attributes() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call attributes() on empty Wrapper`
)
}

classes(): void {
throwError(
`find did not return ${this.selector}, cannot call classes() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call classes() on empty Wrapper`
)
}

contains(): void {
throwError(
`find did not return ${this.selector}, cannot call contains() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call contains() on empty Wrapper`
)
}

emitted(): void {
throwError(
`find did not return ${this.selector}, cannot call emitted() on empty Wrapper`
)
`find did not return ${buildSelectorString(
this.selector
)}, cannot call emitted() on empty Wrapper`
)
}

emittedByOrder(): void {
throwError(
`find did not return ${this.selector}, cannot call emittedByOrder() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call emittedByOrder() on empty Wrapper`
)
}

exists(): boolean {
return false
)
}

filter(): void {
throwError(
`find did not return ${this.selector}, cannot call filter() on empty Wrapper`
)
`find did not return ${buildSelectorString(
this.selector
)}, cannot call filter() on empty Wrapper`
)
}

visible(): void {
throwError(
`find did not return ${this.selector}, cannot call visible() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call visible() on empty Wrapper`
)
}

hasAttribute(): void {
throwError(
`find did not return ${this.selector}, cannot call hasAttribute() on empty Wrapper`
)
`find did not return ${buildSelectorString(
this.selector
)}, cannot call hasAttribute() on empty Wrapper`
)
}

hasClass(): void {
throwError(
`find did not return ${this.selector}, cannot call hasClass() on empty Wrapper`
)
`find did not return ${buildSelectorString(
this.selector
)}, cannot call hasClass() on empty Wrapper`
)
}

hasProp(): void {
throwError(
`find did not return ${this.selector}, cannot call hasProp() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call hasProp() on empty Wrapper`
)
}

hasStyle(): void {
throwError(
`find did not return ${this.selector}, cannot call hasStyle() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call hasStyle() on empty Wrapper`
)
}

findAll(): void {
throwError(
`find did not return ${this.selector}, cannot call findAll() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call findAll() on empty Wrapper`
)
}

find(): void {
throwError(
`find did not return ${this.selector}, cannot call find() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call find() on empty Wrapper`
)
}

html(): void {
throwError(
`find did not return ${this.selector}, cannot call html() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call html() on empty Wrapper`
)
}

Expand All @@ -130,90 +159,135 @@ export default class ErrorWrapper implements BaseWrapper {
isEmpty(): void {
throwError(
`find did not return ${this.selector}, cannot call isEmpty() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call isEmpty() on empty Wrapper`
)
}

isVisible(): void {
throwError(
`find did not return ${this.selector}, cannot call isVisible() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call isVisible() on empty Wrapper`
)
}

isVueInstance(): void {
throwError(
`find did not return ${this.selector}, cannot call isVueInstance() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call isVueInstance() on empty Wrapper`
)
}

name(): void {
throwError(
`find did not return ${this.selector}, cannot call name() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call name() on empty Wrapper`
)
}

props(): void {
throwError(
`find did not return ${this.selector}, cannot call props() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call props() on empty Wrapper`
)
}

text(): void {
throwError(
`find did not return ${this.selector}, cannot call text() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call text() on empty Wrapper`
)
}

setComputed(): void {
throwError(
`find did not return ${this.selector}, cannot call setComputed() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setComputed() on empty Wrapper`
)
}

setData(): void {
throwError(
`find did not return ${this.selector}, cannot call setData() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setData() on empty Wrapper`
)
}

setMethods(): void {
throwError(
`find did not return ${this.selector}, cannot call setMethods() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setMethods() on empty Wrapper`
)
}

setProps(): void {
throwError(
`find did not return ${this.selector}, cannot call setProps() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setProps() on empty Wrapper`
)
}

setValue(): void {
throwError(
`find did not return ${this.selector}, cannot call setValue() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setValue() on empty Wrapper`
)
}

setChecked(): void {
throwError(
`find did not return ${this.selector}, cannot call setChecked() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setChecked() on empty Wrapper`
)
}

setSelected(): void {
throwError(
`find did not return ${this.selector}, cannot call setSelected() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call setSelected() on empty Wrapper`
)
}

trigger(): void {
throwError(
`find did not return ${this.selector}, cannot call trigger() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call trigger() on empty Wrapper`
)
}

destroy(): void {
throwError(
`find did not return ${this.selector}, cannot call destroy() on empty Wrapper`
`find did not return ${buildSelectorString(
this.selector
)}, cannot call destroy() on empty Wrapper`
)
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.