diff --git a/src/components/Dialog/NodeDetailsDialog/NodeDetailsDialog.tsx b/src/components/Dialog/NodeDetailsDialog/NodeDetailsDialog.tsx
index 3a01066a..926ff6e1 100644
--- a/src/components/Dialog/NodeDetailsDialog/NodeDetailsDialog.tsx
+++ b/src/components/Dialog/NodeDetailsDialog/NodeDetailsDialog.tsx
@@ -62,8 +62,7 @@ export const NodeDetailsDialog = ({
onOpenChange,
}: NodeDetailsDialogProps) => {
const { t } = useTranslation("dialog");
- const { setDialogOpen, connection, setActivePage, getNodeError } =
- useDevice();
+ const { setDialogOpen, connection, setActivePage } = useDevice();
const { setNodeNumToBeRemoved } = useAppStore();
const { setChatType, setActiveChat } = useMessageStore();
@@ -320,7 +319,7 @@ export const NodeDetailsDialog = ({
{t("locationResponse.altitude")}
{node.position.altitude}
- {t("unit.meter")}
+ {t("unit.meter.one")}
)}
>
diff --git a/src/components/Dialog/RebootOTADialog.test.tsx b/src/components/Dialog/RebootOTADialog.test.tsx
index 94cc5e7c..4ded7def 100644
--- a/src/components/Dialog/RebootOTADialog.test.tsx
+++ b/src/components/Dialog/RebootOTADialog.test.tsx
@@ -60,7 +60,8 @@ describe("RebootOTADialog", () => {
it("renders dialog with default input value", () => {
render( {}} />);
expect(screen.getByPlaceholderText(/enter delay/i)).toHaveValue(5);
- expect(screen.getByText(/schedule reboot/i)).toBeInTheDocument();
+ expect(screen.getByRole("heading", { name: /schedule reboot/i, level: 1 }))
+ .toBeInTheDocument();
expect(screen.getByText(/reboot to ota mode now/i)).toBeInTheDocument();
});
@@ -72,7 +73,7 @@ describe("RebootOTADialog", () => {
target: { value: "3" },
});
- fireEvent.click(screen.getByText(/schedule reboot/i));
+ fireEvent.click(screen.getByTestId("scheduleRebootBtn"));
expect(screen.getByText(/reboot has been scheduled/i)).toBeInTheDocument();
@@ -99,12 +100,11 @@ describe("RebootOTADialog", () => {
it("does not call reboot if connection is undefined", async () => {
const onOpenChangeMock = vi.fn();
- // simulate no connection
mockConnection = undefined;
render();
- fireEvent.click(screen.getByText(/schedule reboot/i));
+ fireEvent.click(screen.getByTestId("scheduleRebootBtn"));
vi.advanceTimersByTime(5000);
await waitFor(() => {
@@ -112,7 +112,6 @@ describe("RebootOTADialog", () => {
expect(onOpenChangeMock).not.toHaveBeenCalled();
});
- // reset connection for other tests
mockConnection = { rebootOta: rebootOtaMock };
});
});
diff --git a/src/components/Dialog/RebootOTADialog.tsx b/src/components/Dialog/RebootOTADialog.tsx
index 78670aa6..5276b81b 100644
--- a/src/components/Dialog/RebootOTADialog.tsx
+++ b/src/components/Dialog/RebootOTADialog.tsx
@@ -94,7 +94,7 @@ export const RebootOTADialog = (
/>