Files
ewelink-api/test/_setup/expectations.js
Martin M e6f60724f1 Release v1.8.0 (#23)
* 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
2019-11-02 22:42:55 -03:00

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,
};