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