3
3
import { throwError } from 'shared/util'
4
4
5
5
export default class ErrorWrapper implements BaseWrapper {
6
- selector : string
6
+ selectorString : string
7
7
8
- constructor ( selector : string ) {
9
- this . selector = selector
8
+ constructor ( selectorString : string ) {
9
+ this . selectorString = selectorString
10
10
}
11
11
12
12
at ( ) : void {
13
13
throwError (
14
- `find did not return ${ this . selector } , cannot call at() on empty Wrapper`
14
+ `find did not return ${
15
+ this . selectorString
16
+ } , cannot call at() on empty Wrapper`
15
17
)
16
18
}
17
19
18
20
attributes ( ) : void {
19
21
throwError (
20
- `find did not return ${ this . selector } , cannot call attributes() on empty Wrapper`
22
+ `find did not return ${
23
+ this . selectorString
24
+ } , cannot call attributes() on empty Wrapper`
25
+
21
26
)
22
27
}
23
28
24
29
classes ( ) : void {
25
30
throwError (
26
- `find did not return ${ this . selector } , cannot call classes() on empty Wrapper`
31
+ `find did not return ${
32
+ this . selectorString
33
+ } , cannot call classes() on empty Wrapper`
34
+
27
35
)
28
36
}
29
37
30
38
contains ( ) : void {
31
39
throwError (
32
- `find did not return ${ this . selector } , cannot call contains() on empty Wrapper`
40
+ `find did not return ${
41
+ this . selectorString
42
+ } , cannot call contains() on empty Wrapper`
33
43
)
34
44
}
35
45
36
46
emitted ( ) : void {
37
47
throwError (
38
- `find did not return ${ this . selector } , cannot call emitted() on empty Wrapper`
48
+ `find did not return ${
49
+ this . selectorString
50
+ } , cannot call emitted() on empty Wrapper`
39
51
)
40
52
}
41
53
42
54
emittedByOrder ( ) : void {
43
55
throwError (
44
- `find did not return ${ this . selector } , cannot call emittedByOrder() on empty Wrapper`
56
+ `find did not return ${
57
+ this . selectorString
58
+ } , cannot call emittedByOrder() on empty Wrapper`
45
59
)
46
60
}
47
61
@@ -51,151 +65,201 @@ export default class ErrorWrapper implements BaseWrapper {
51
65
52
66
filter ( ) : void {
53
67
throwError (
54
- `find did not return ${ this . selector } , cannot call filter() on empty Wrapper`
68
+ `find did not return ${
69
+ this . selectorString
70
+ } , cannot call filter() on empty Wrapper`
55
71
)
56
72
}
57
73
58
74
visible ( ) : void {
59
75
throwError (
60
- `find did not return ${ this . selector } , cannot call visible() on empty Wrapper`
76
+ `find did not return ${
77
+ this . selectorString
78
+ } , cannot call visible() on empty Wrapper`
61
79
)
62
80
}
63
81
64
82
hasAttribute ( ) : void {
65
83
throwError (
66
- `find did not return ${ this . selector } , cannot call hasAttribute() on empty Wrapper`
84
+ `find did not return ${
85
+ this . selectorString
86
+ } , cannot call hasAttribute() on empty Wrapper`
67
87
)
68
88
}
69
89
70
90
hasClass ( ) : void {
71
91
throwError (
72
- `find did not return ${ this . selector } , cannot call hasClass() on empty Wrapper`
92
+ `find did not return ${
93
+ this . selectorString
94
+ } , cannot call hasClass() on empty Wrapper`
73
95
)
74
96
}
75
97
76
98
hasProp ( ) : void {
77
99
throwError (
78
- `find did not return ${ this . selector } , cannot call hasProp() on empty Wrapper`
100
+ `find did not return ${
101
+ this . selectorString
102
+ } , cannot call hasProp() on empty Wrapper`
79
103
)
80
104
}
81
105
82
106
hasStyle ( ) : void {
83
107
throwError (
84
- `find did not return ${ this . selector } , cannot call hasStyle() on empty Wrapper`
108
+ `find did not return ${
109
+ this . selectorString
110
+ } , cannot call hasStyle() on empty Wrapper`
85
111
)
86
112
}
87
113
88
114
findAll ( ) : void {
89
115
throwError (
90
- `find did not return ${ this . selector } , cannot call findAll() on empty Wrapper`
116
+ `find did not return ${
117
+ this . selectorString
118
+ } , cannot call findAll() on empty Wrapper`
91
119
)
92
120
}
93
121
94
122
find ( ) : void {
95
123
throwError (
96
- `find did not return ${ this . selector } , cannot call find() on empty Wrapper`
124
+ `find did not return ${
125
+ this . selectorString
126
+ } , cannot call find() on empty Wrapper`
97
127
)
98
128
}
99
129
100
130
html ( ) : void {
101
131
throwError (
102
- `find did not return ${ this . selector } , cannot call html() on empty Wrapper`
132
+ `find did not return ${
133
+ this . selectorString
134
+ } , cannot call html() on empty Wrapper`
103
135
)
104
136
}
105
137
106
138
is ( ) : void {
107
139
throwError (
108
- `find did not return ${ this . selector } , cannot call is() on empty Wrapper`
140
+ `find did not return ${
141
+ this . selectorString
142
+ } , cannot call is() on empty Wrapper`
109
143
)
110
144
}
111
145
112
146
isEmpty ( ) : void {
113
147
throwError (
114
- `find did not return ${ this . selector } , cannot call isEmpty() on empty Wrapper`
148
+ `find did not return ${
149
+ this . selectorString
150
+ } , cannot call isEmpty() on empty Wrapper`
115
151
)
116
152
}
117
153
118
154
isVisible ( ) : void {
119
155
throwError (
120
- `find did not return ${ this . selector } , cannot call isVisible() on empty Wrapper`
156
+ `find did not return ${
157
+ this . selectorString
158
+ } , cannot call isVisible() on empty Wrapper`
121
159
)
122
160
}
123
161
124
162
isVueInstance ( ) : void {
125
163
throwError (
126
- `find did not return ${ this . selector } , cannot call isVueInstance() on empty Wrapper`
164
+ `find did not return ${
165
+ this . selectorString
166
+ } , cannot call isVueInstance() on empty Wrapper`
127
167
)
128
168
}
129
169
130
170
name ( ) : void {
131
171
throwError (
132
- `find did not return ${ this . selector } , cannot call name() on empty Wrapper`
172
+ `find did not return ${
173
+ this . selectorString
174
+ } , cannot call name() on empty Wrapper`
133
175
)
134
176
}
135
177
136
178
props ( ) : void {
137
179
throwError (
138
- `find did not return ${ this . selector } , cannot call props() on empty Wrapper`
180
+ `find did not return ${
181
+ this . selectorString
182
+ } , cannot call props() on empty Wrapper`
139
183
)
140
184
}
141
185
142
186
text ( ) : void {
143
187
throwError (
144
- `find did not return ${ this . selector } , cannot call text() on empty Wrapper`
188
+ `find did not return ${
189
+ this . selectorString
190
+ } , cannot call text() on empty Wrapper`
145
191
)
146
192
}
147
193
148
194
setComputed ( ) : void {
149
195
throwError (
150
- `find did not return ${ this . selector } , cannot call setComputed() on empty Wrapper`
196
+ `find did not return ${
197
+ this . selectorString
198
+ } , cannot call setComputed() on empty Wrapper`
151
199
)
152
200
}
153
201
154
202
setData ( ) : void {
155
203
throwError (
156
- `find did not return ${ this . selector } , cannot call setData() on empty Wrapper`
204
+ `find did not return ${
205
+ this . selectorString
206
+ } , cannot call setData() on empty Wrapper`
157
207
)
158
208
}
159
209
160
210
setMethods ( ) : void {
161
211
throwError (
162
- `find did not return ${ this . selector } , cannot call setMethods() on empty Wrapper`
212
+ `find did not return ${
213
+ this . selectorString
214
+ } , cannot call setMethods() on empty Wrapper`
163
215
)
164
216
}
165
217
166
218
setProps ( ) : void {
167
219
throwError (
168
- `find did not return ${ this . selector } , cannot call setProps() on empty Wrapper`
220
+ `find did not return ${
221
+ this . selectorString
222
+ } , cannot call setProps() on empty Wrapper`
169
223
)
170
224
}
171
225
172
226
setValue ( ) : void {
173
227
throwError (
174
- `find did not return ${ this . selector } , cannot call setValue() on empty Wrapper`
228
+ `find did not return ${
229
+ this . selectorString
230
+ } , cannot call setValue() on empty Wrapper`
175
231
)
176
232
}
177
233
178
234
setChecked ( ) : void {
179
235
throwError (
180
- `find did not return ${ this . selector } , cannot call setChecked() on empty Wrapper`
236
+ `find did not return ${
237
+ this . selectorString
238
+ } , cannot call setChecked() on empty Wrapper`
181
239
)
182
240
}
183
241
184
242
setSelected ( ) : void {
185
243
throwError (
186
- `find did not return ${ this . selector } , cannot call setSelected() on empty Wrapper`
244
+ `find did not return ${
245
+ this . selectorString
246
+ } , cannot call setSelected() on empty Wrapper`
187
247
)
188
248
}
189
249
190
250
trigger ( ) : void {
191
251
throwError (
192
- `find did not return ${ this . selector } , cannot call trigger() on empty Wrapper`
252
+ `find did not return ${
253
+ this . selectorString
254
+ } , cannot call trigger() on empty Wrapper`
193
255
)
194
256
}
195
257
196
258
destroy ( ) : void {
197
259
throwError (
198
- `find did not return ${ this . selector } , cannot call destroy() on empty Wrapper`
260
+ `find did not return ${
261
+ this . selectorString
262
+ } , cannot call destroy() on empty Wrapper`
199
263
)
200
264
}
201
265
}
0 commit comments