mirror of
https://github.com/prymitive/karma
synced 2026-05-21 04:33:07 +00:00
fix(ui): get rid of mobx-stored
This commit is contained in:
committed by
Łukasz Mierzwa
parent
1cee18465d
commit
ec1b05cd37
@@ -1,4 +1,10 @@
|
||||
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
|
||||
import {
|
||||
act,
|
||||
render,
|
||||
screen,
|
||||
fireEvent,
|
||||
waitFor,
|
||||
} from "@testing-library/react";
|
||||
|
||||
import { Settings } from "Stores/Settings";
|
||||
import { AnimationsConfiguration } from "./AnimationsConfiguration";
|
||||
@@ -26,7 +32,9 @@ describe("<AnimationsConfiguration />", () => {
|
||||
renderConfiguration();
|
||||
const checkbox = screen.getByRole("checkbox");
|
||||
|
||||
settingsStore.themeConfig.setAnimations(true);
|
||||
act(() => {
|
||||
settingsStore.themeConfig.setAnimations(true);
|
||||
});
|
||||
expect(settingsStore.themeConfig.config.animations).toBe(true);
|
||||
fireEvent.click(checkbox);
|
||||
await waitFor(() => {
|
||||
@@ -38,7 +46,9 @@ describe("<AnimationsConfiguration />", () => {
|
||||
renderConfiguration();
|
||||
const checkbox = screen.getByRole("checkbox");
|
||||
|
||||
settingsStore.themeConfig.setAnimations(false);
|
||||
act(() => {
|
||||
settingsStore.themeConfig.setAnimations(false);
|
||||
});
|
||||
expect(settingsStore.themeConfig.config.animations).toBe(false);
|
||||
fireEvent.click(checkbox);
|
||||
await waitFor(() => {
|
||||
|
||||
Reference in New Issue
Block a user