mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-21 21:33:11 +01:00
* new method to check for device firmware updates * moved mixin * generate firmware update payload * new method to check for devices firmware updates * removed unused function * moved firmware tests to own file * added firmware test cases * return device id on response * updated credentials list * version bump
61 lines
1.2 KiB
JavaScript
61 lines
1.2 KiB
JavaScript
const loginExpectations = {
|
|
at: expect.any(String),
|
|
user: { email: expect.any(String) },
|
|
region: expect.any(String),
|
|
};
|
|
|
|
const allDevicesExpectations = {
|
|
name: expect.any(String),
|
|
deviceid: expect.any(String),
|
|
apikey: expect.any(String),
|
|
params: expect.any(Object),
|
|
showBrand: expect.any(Boolean),
|
|
extra: {
|
|
extra: {
|
|
uiid: expect.any(Number),
|
|
model: expect.any(String),
|
|
},
|
|
},
|
|
};
|
|
|
|
const specificDeviceExpectations = {
|
|
name: expect.any(String),
|
|
deviceid: expect.any(String),
|
|
apikey: expect.any(String),
|
|
online: expect.any(Boolean),
|
|
extra: {
|
|
extra: {
|
|
uiid: expect.any(Number),
|
|
model: expect.any(String),
|
|
},
|
|
},
|
|
};
|
|
|
|
const rawPowerUsageExpectations = {
|
|
status: 'ok',
|
|
data: {
|
|
hundredDaysKwhData: expect.any(String),
|
|
},
|
|
};
|
|
|
|
const currentMonthPowerUsageExpectations = {
|
|
status: 'ok',
|
|
monthly: expect.any(Number),
|
|
daily: expect.any(Array),
|
|
};
|
|
|
|
const firmwareExpectations = {
|
|
status: expect.any(String),
|
|
deviceId: expect.any(String),
|
|
msg: expect.any(String),
|
|
};
|
|
|
|
module.exports = {
|
|
loginExpectations,
|
|
allDevicesExpectations,
|
|
specificDeviceExpectations,
|
|
rawPowerUsageExpectations,
|
|
currentMonthPowerUsageExpectations,
|
|
firmwareExpectations,
|
|
};
|