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