Merge branch 'main' into renovate/docker-setup-buildx-action-3.x
Build image / build (pull_request) Failing after 5m13s
Details
Build image / build (pull_request) Failing after 5m13s
Details
This commit is contained in:
commit
3883d21e86
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
node_modules/
|
||||
dist/
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
],
|
||||
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["react-refresh"],
|
||||
rules: {
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
import { GlobalRegistrator } from "@happy-dom/global-registrator";
|
||||
|
||||
GlobalRegistrator.register();
|
File diff suppressed because it is too large
Load Diff
|
@ -14,9 +14,6 @@
|
|||
"vite": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@happy-dom/global-registrator": "^15.0.0",
|
||||
"@testing-library/jest-dom": "^6.4.2",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useState } from "react";
|
||||
import "./App.css";
|
||||
import ImageModerator from "./components/ImageModerator/ImageModerator";
|
||||
import Login from "./components/Login/Login";
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import { render, screen } from "@testing-library/react";
|
||||
import { expect, it } from "bun:test";
|
||||
import React from "react";
|
||||
import ImageModerator, {
|
||||
ImageModeratorProps,
|
||||
} from "../../src/components/ImageModerator/ImageModerator";
|
||||
|
||||
const properties: ImageModeratorProps = {
|
||||
acceptLabel: "Accept",
|
||||
discardLabel: "Discard",
|
||||
};
|
||||
|
||||
it("should render into the document", () => {
|
||||
render(<ImageModerator {...properties} />);
|
||||
});
|
||||
|
||||
it("should show a new image when accept button is clicked", () => {
|
||||
const acceptButton = screen.getByText(properties.acceptLabel);
|
||||
const imgElement = screen.getByRole("img");
|
||||
const imgElementSrcBefore = imgElement.getAttribute("src");
|
||||
acceptButton.click();
|
||||
expect(imgElement.getAttribute("src")).not.toEqual(imgElementSrcBefore);
|
||||
});
|
||||
|
||||
it("should show a new image when discard button is clicked", () => {
|
||||
const discardButton = screen.getByText(properties.discardLabel);
|
||||
const imgElement = screen.getByRole("img");
|
||||
const imgElementSrcBefore = imgElement.getAttribute("src");
|
||||
discardButton.click();
|
||||
expect(imgElement.getAttribute("src")).not.toEqual(imgElementSrcBefore);
|
||||
});
|
Loading…
Reference in New Issue