Done. Closes #1272
parent
e2b5690471
commit
ebaa3c675d
|
@ -18,7 +18,7 @@ import {
|
|||
} from "../farmware/state_to_props";
|
||||
import { getFbosConfig, getFirmwareConfig } from "../resources/getters";
|
||||
import { DevSettings } from "../account/dev/dev_support";
|
||||
import { getApiAlerts, getLocalAlerts } from "../messages/state_to_props";
|
||||
import { getAllAlerts } from "../messages/state_to_props";
|
||||
|
||||
export function mapStateToProps(props: Everything): Props {
|
||||
const { hardware } = props.bot;
|
||||
|
@ -50,9 +50,6 @@ export function mapStateToProps(props: Everything): Props {
|
|||
env,
|
||||
saveFarmwareEnv: saveOrEditFarmwareEnv(props.resources.index),
|
||||
timeSettings: maybeGetTimeSettings(props.resources.index),
|
||||
alerts: [
|
||||
...getLocalAlerts(props.resources.consumers.alerts),
|
||||
...getApiAlerts(props.resources.index)
|
||||
],
|
||||
alerts: getAllAlerts(props.resources),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,15 +23,12 @@ describe("Contextual `Alert` creation", () => {
|
|||
});
|
||||
|
||||
it("toggles off", () => {
|
||||
// OVERWRITE_RESOURCE
|
||||
const c = fakeFbosConfig();
|
||||
const s: AlertReducerState = {
|
||||
alerts: {}
|
||||
};
|
||||
const action = overwrite(c, {
|
||||
...c.body,
|
||||
firmware_hardware: "none"
|
||||
});
|
||||
const action =
|
||||
overwrite(c, { ...c.body, firmware_hardware: "none" });
|
||||
const { alerts } = alertsReducer(s, action);
|
||||
const results = Object.values(alerts);
|
||||
expect(results[0]).toEqual(undefined);
|
||||
|
|
Loading…
Reference in New Issue