mockaton 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Dashboard.js +9 -6
package/package.json
CHANGED
package/src/Dashboard.js
CHANGED
|
@@ -94,7 +94,6 @@ function CookieSelector({ list }) {
|
|
|
94
94
|
method: 'PATCH',
|
|
95
95
|
body: JSON.stringify(this.value)
|
|
96
96
|
})
|
|
97
|
-
.then(init)
|
|
98
97
|
.catch(console.error)
|
|
99
98
|
}
|
|
100
99
|
}, list.map(([key, selected]) =>
|
|
@@ -202,11 +201,13 @@ function MockSelector({ broker }) {
|
|
|
202
201
|
fetch(API.edit, {
|
|
203
202
|
method: 'PATCH',
|
|
204
203
|
body: JSON.stringify({ [DF.file]: this.value })
|
|
205
|
-
}).then(() => {
|
|
206
|
-
this.closest('tr').querySelector('a').click()
|
|
207
|
-
this.closest('tr').querySelector(`.${CSS.InternalServerErrorToggler}>[type=checkbox]`).checked = status === 500
|
|
208
|
-
this.className = className(this.value === this.options[0].value, status)
|
|
209
204
|
})
|
|
205
|
+
.then(() => {
|
|
206
|
+
this.closest('tr').querySelector('a').click()
|
|
207
|
+
this.closest('tr').querySelector(`.${CSS.InternalServerErrorToggler}>[type=checkbox]`).checked = status === 500
|
|
208
|
+
this.className = className(this.value === this.options[0].value, status)
|
|
209
|
+
})
|
|
210
|
+
.catch(console.error)
|
|
210
211
|
}
|
|
211
212
|
}, files.map(file => r('option', {
|
|
212
213
|
value: file,
|
|
@@ -268,7 +269,9 @@ function InternalServerErrorToggler({ broker }) {
|
|
|
268
269
|
? items.find(f => Route.parseFilename(f).status === 500)
|
|
269
270
|
: items[0]
|
|
270
271
|
})
|
|
271
|
-
})
|
|
272
|
+
})
|
|
273
|
+
.then(init)
|
|
274
|
+
.catch(console.error)
|
|
272
275
|
}
|
|
273
276
|
}),
|
|
274
277
|
r('span', null, '500')
|