mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-24 00:01:36 +01:00
Fix tests
This commit is contained in:
parent
dfdaadeb65
commit
84097fa8e0
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { CheckBox } from "../CheckBox";
|
||||
import CheckBox from "../CheckBox";
|
||||
|
||||
describe("<Checkbox/>", () => {
|
||||
it("Render checkbox", () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { DownloadButton } from "../DownloadButton";
|
||||
import DownloadButton from "../DownloadButton";
|
||||
|
||||
describe("<DownloadButton />", () => {
|
||||
it("should have download attribute", () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render, fireEvent, getByLabelText, wait } from "customTestRender";
|
||||
|
||||
import { NumberInput } from "../NumberInput";
|
||||
import NumberInput from "../NumberInput";
|
||||
|
||||
describe("<NumberInput/>", () => {
|
||||
const onChangeMock = jest.fn();
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { PasswordInput } from "../PasswordInput";
|
||||
import PasswordInput from "../PasswordInput";
|
||||
|
||||
describe("<PasswordInput/>", () => {
|
||||
it("Render password input", () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { RadioSet } from "../RadioSet";
|
||||
import RadioSet from "../RadioSet";
|
||||
|
||||
const TEST_CHOICES = [
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
render,
|
||||
} from "customTestRender";
|
||||
|
||||
import { Select } from "../Select";
|
||||
import Select from "../Select";
|
||||
|
||||
const TEST_CHOICES = {
|
||||
1: "one",
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { Switch } from "../Switch";
|
||||
import Switch from "../Switch";
|
||||
|
||||
describe("<Switch/>", () => {
|
||||
it("Render switch", () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { render } from "customTestRender";
|
||||
|
||||
import { TextInput } from "../TextInput";
|
||||
import TextInput from "../TextInput";
|
||||
|
||||
describe("<TextInput/>", () => {
|
||||
it("Render text input", () => {
|
||||
|
|
|
@ -9,12 +9,12 @@ import React from "react";
|
|||
import { render, fireEvent, wait } from "customTestRender";
|
||||
|
||||
import mockAxios from "jest-mock-axios";
|
||||
import { WebSockets } from "webSockets/WebSockets";
|
||||
import WebSockets from "webSockets/WebSockets";
|
||||
import { mockJSONError } from "testUtils/network";
|
||||
import { mockSetAlert } from "testUtils/alertContextMock";
|
||||
import { ALERT_TYPES } from "../../../bootstrap/Alert";
|
||||
|
||||
import { ResetWiFiSettings } from "../ResetWiFiSettings";
|
||||
import ResetWiFiSettings from "../ResetWiFiSettings";
|
||||
|
||||
describe("<ResetWiFiSettings/>", () => {
|
||||
const webSockets = new WebSockets();
|
||||
|
|
|
@ -10,7 +10,7 @@ import diffSnapshot from "snapshot-diff";
|
|||
import mockAxios from "jest-mock-axios";
|
||||
|
||||
import { fireEvent, render, wait } from "customTestRender";
|
||||
import { WebSockets } from "webSockets/WebSockets";
|
||||
import WebSockets from "webSockets/WebSockets";
|
||||
import { mockJSONError } from "testUtils/network";
|
||||
|
||||
import {
|
||||
|
@ -19,7 +19,7 @@ import {
|
|||
twoDevices,
|
||||
threeDevices,
|
||||
} from "./__fixtures__/wifiSettings";
|
||||
import { WiFiSettings, validator, byteCount } from "../WiFiSettings";
|
||||
import WiFiSettings, { validator, byteCount } from "../WiFiSettings";
|
||||
|
||||
describe("<WiFiSettings/>", () => {
|
||||
let firstRender;
|
||||
|
|
|
@ -18,7 +18,7 @@ import mockAxios from "jest-mock-axios";
|
|||
import { mockJSONError } from "testUtils/network";
|
||||
import { mockSetAlert } from "testUtils/alertContextMock";
|
||||
|
||||
import { RebootButton } from "../RebootButton";
|
||||
import RebootButton from "../RebootButton";
|
||||
|
||||
describe("<RebootButton/>", () => {
|
||||
let componentContainer;
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from "react";
|
|||
|
||||
import { act, fireEvent, render, waitForElement } from "customTestRender";
|
||||
import mockAxios from "jest-mock-axios";
|
||||
import { WebSockets } from "webSockets/WebSockets";
|
||||
import WebSockets from "webSockets/WebSockets";
|
||||
import ForisForm from "../components/ForisForm";
|
||||
|
||||
// It's possible to unittest each hooks via react-hooks-testing-library.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* See /LICENSE for more information.
|
||||
*/
|
||||
|
||||
import { toLocaleDateString } from "../datetime";
|
||||
import toLocaleDateString from "../datetime";
|
||||
|
||||
describe("toLocaleDateString", () => {
|
||||
it("should work with different locale", () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user