Add tz_offset_hrs to FE'

pull/598/head
Rick Carlino 2017-12-28 10:49:58 -06:00
parent bf75a987ac
commit 26aa04a7f9
6 changed files with 10 additions and 5 deletions

View File

@ -12,7 +12,8 @@ export function fakeDevice(): TaggedDevice {
"specialStatus": SpecialStatus.SAVED,
"body": {
"id": 415,
"name": "wispy-firefly-846"
"name": "wispy-firefly-846",
"tz_offset_hrs": 0
},
"uuid": "Device.415.0"
};

View File

@ -29,7 +29,8 @@ describe("refresh()", () => {
"id": 6,
"name": "summer-pond-726",
"timezone": "America/Chicago",
"last_saw_api": "2017-08-30T20:42:35.854Z"
"last_saw_api": "2017-08-30T20:42:35.854Z",
"tz_offset_hrs": 0
},
};

View File

@ -32,7 +32,8 @@ describe("successful refresh()", () => {
"id": 6,
"name": "summer-pond-726",
"timezone": "America/Chicago",
"last_saw_api": "2017-08-30T20:42:35.854Z"
"last_saw_api": "2017-08-30T20:42:35.854Z",
"tz_offset_hrs": 0
},
};

View File

@ -10,7 +10,7 @@ import { FbosDetails } from "../fbos_settings/auto_update_row";
describe("<FarmbotOsSettings/>", () => {
it("renders settings", () => {
const osSettings = mount(<FarmbotOsSettings
account={fakeResource("Device", { id: 0, name: "" })}
account={fakeResource("Device", { id: 0, name: "", tz_offset_hrs: 0 })}
dispatch={jest.fn()}
bot={bot}
auth={fakeState().auth as AuthState} />);

View File

@ -7,7 +7,8 @@ describe("<LastSeen/>", () => {
const resource = () => fakeResource("Device", {
id: 1,
name: "foo",
last_saw_api: ""
last_saw_api: "",
tz_offset_hrs: 0
});
it("blinks when loading", () => {
const r = resource();

View File

@ -39,6 +39,7 @@ export interface DeviceAccountSettings {
id: number;
name: string;
timezone?: string | undefined;
tz_offset_hrs: number;
last_saw_api?: string | undefined;
last_saw_mq?: string | undefined;
}