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